Skip to content

Commit

Permalink
fix(ci): nightly multi arch
Browse files Browse the repository at this point in the history
  • Loading branch information
squakez committed Feb 13, 2025
1 parent f5e7ddf commit 0aa712b
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .github/actions/infra-setting/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
name: infra-setting
description: 'Setting CI infrastructure'

inputs:
skip-operator-build:
description: 'Dont build the operator'
default: "false"

runs:
using: "composite"

Expand Down Expand Up @@ -53,4 +58,9 @@ runs:
echo "Setting registry as $KAMEL_INSTALL_REGISTRY which is required by certain tests"
echo "LAST_RELEASED_VERSION=$(make get-last-released-version)" >> $GITHUB_ENV
echo "Setting last released version as as $LAST_RELEASED_VERSION which is required by certain tests"
- id: build-operator
if: ${{ inputs.skip-operator-build }} == "false"
name: Build operator image
shell: bash
run: |
NOTEST=true make images
9 changes: 8 additions & 1 deletion .github/workflows/nightly-multi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,18 @@ jobs:

- name: Infra setting
uses: ./.github/actions/infra-setting
with:
skip-operator-build: "true"

- name: Install operator
shell: bash
run: |
THIS_VERSION="$(make get-version)"
VERSION="$(make get-version | sed s/-SNAPSHOT//)-nightly"
sed "s#apache/camel-k:$THIS_VERSION#testcamelk/camel-k:$VERSION#g" install/base/config/manager/operator-deployment.yaml
kubectl create ns camel-k
make install-k8s-global
kubectl wait --for=jsonpath='{.status.phase}'=Ready itp camel-k -n camel-k --timeout=180s
kubectl wait --for=jsonpath='{.status.phase}'=Ready itp camel-k -n camel-k --timeout=120s
- name: Run test
shell: bash
Expand All @@ -79,6 +84,8 @@ jobs:

- name: Infra setting
uses: ./.github/actions/infra-setting
with:
skip-operator-build: "true"

- name: Install operator
shell: bash
Expand Down
10 changes: 10 additions & 0 deletions e2e/common/runtimes/runtimes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ package common

import (
"context"
"runtime"
"strings"
"testing"

. "github.com/onsi/gomega"
Expand All @@ -35,6 +37,10 @@ import (
)

func TestSelfManagedBuildIntegrations(t *testing.T) {
if !isAmd() {
t.Skip("This test can only run in an AMD based architecture.")
}

t.Parallel()
WithNewTestNamespace(t, func(ctx context.Context, g *WithT, ns string) {
var cmData = make(map[string]string)
Expand Down Expand Up @@ -72,3 +78,7 @@ func TestSelfManagedBuildIntegrations(t *testing.T) {
})
})
}

func isAmd() bool {
return strings.Contains(runtime.GOARCH, "amd")
}

0 comments on commit 0aa712b

Please # to comment.