You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by as...@apache.org on 2022/01/31 08:58:25 UTC
[camel-k] 14/40: Converts remaining e2e tests to actions
This is an automated email from the ASF dual-hosted git repository.
astefanutti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 595f17a5527aa3287bb2dd2b2edbaa7d8fcd37bb
Author: phantomjinx <p....@phantomjinx.co.uk>
AuthorDate: Wed Nov 24 21:34:28 2021 +0000
Converts remaining e2e tests to actions
* Modifies workflows accordingly
---
.github/actions/e2e-build/action.yml | 40 +++++++++
.github/actions/e2e-builder/action.yml | 91 ++++++++++++++++++++
.github/actions/e2e-knative-yaks/action.yml | 99 ++++++++++++++++++++++
.github/actions/e2e-knative/action.yml | 93 +++++++++++++++++++++
.github/actions/e2e-local/action.yml | 43 ++++++++++
.github/actions/kamel-install-yaks/action.yml | 35 ++++++++
.github/workflows/build.yml | 16 +---
.github/workflows/builder.yml | 49 +----------
.github/workflows/knative.yml | 114 +++-----------------------
.github/workflows/local.yml | 19 +----
10 files changed, 421 insertions(+), 178 deletions(-)
diff --git a/.github/actions/e2e-build/action.yml b/.github/actions/e2e-build/action.yml
new file mode 100644
index 0000000..feaad8c
--- /dev/null
+++ b/.github/actions/e2e-build/action.yml
@@ -0,0 +1,40 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+name: e2e-build
+description: 'End-to-End tests for build use-cases'
+
+runs:
+ using: "composite"
+
+ steps:
+
+ - id: prepare-env
+ name: Prepare Test Environment
+ uses: ./.github/actions/kamel-prepare-env
+
+ - name: Cache modules
+ uses: actions/cache@v1
+ with:
+ path: ~/go/pkg/mod
+ key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
+ restore-keys: |
+ ${{ runner.os }}-go-
+
+ - name: Test
+ shell: bash
+ run: make
diff --git a/.github/actions/e2e-builder/action.yml b/.github/actions/e2e-builder/action.yml
new file mode 100644
index 0000000..68f9311
--- /dev/null
+++ b/.github/actions/e2e-builder/action.yml
@@ -0,0 +1,91 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+name: e2e-builder
+description: 'End-to-End tests for builder use-cases'
+
+inputs:
+ cluster-config-data:
+ description: 'The configuration of the underlying cluster (if cluster-type is custom)'
+ required: false
+ publisher:
+ description: 'The publishing strategy to be used'
+ required: true
+
+runs:
+ using: "composite"
+
+ steps:
+ - id: prepare-env
+ name: Prepare Test Environment
+ uses: ./.github/actions/kamel-prepare-env
+
+ - id: configure-cluster
+ name: Configure Platform
+ uses: ./.github/actions/kamel-config-cluster
+ with:
+ cluster-type: ${{ env.TEST_CLUSTER }}
+ cluster-config-data: ${{ inputs.cluster-config-data }}
+
+ - id: build-kamel
+ name: Build Kamel
+ uses: ./.github/actions/kamel-build
+ with:
+ image-registry-push-host: ${{ env.CLUSTER_IMAGE_REGISTRY_PUSH_HOST }}
+ image-registry-pull-host: ${{ env.CLUSTER_IMAGE_REGISTRY_PULL_HOST }}
+ image-namespace: ${{ env.CLUSTER_IMAGE_NAMESPACE }}
+ # Builds the bundle if an OLM is available - depends on cluster being tested
+ build-bundle: ${{ env.CLUSTER_HAS_OLM }}
+ # Can be empty and so catalog source will not be created
+ catalog-source-namespace: ${{ env.CLUSTER_CATALOG_SOURCE_NAMESPACE }}
+
+ - id: install-kamel-cluster-setup
+ name: Install Kamel Cluster Setup
+ uses: ./.github/actions/kamel-install-cluster-setup
+ with:
+ kube-admin-user-ctx: ${{ env.CLUSTER_KUBE_ADMIN_USER_CTX }}
+
+ - id: run-it
+ name: Run IT
+ shell: bash
+ env:
+ KAMEL_INSTALL_BUILD_PUBLISH_STRATEGY: ${{ inputs.publisher }}
+ run: |
+ # Cluster environment
+ export CUSTOM_IMAGE=${{ env.BUILD_BINARY_LOCAL_IMAGE_NAME }}
+ export CUSTOM_VERSION=${{ env.BUILD_BINARY_LOCAL_IMAGE_VERSION }}
+
+ #
+ # If bundle has been built and installed then use it
+ #
+ if [ -n "${{ env.BUILD_BUNDLE_CATALOG_SOURCE }}" ]; then
+ export KAMEL_INSTALL_OLM_SOURCE_NAMESPACE=${{ env.CLUSTER_IMAGE_NAMESPACE }}
+ export KAMEL_INSTALL_OLM_SOURCE=${{ env.BUILD_BUNDLE_CATALOG_SOURCE }}
+ fi
+
+ export KAMEL_INSTALL_REGISTRY=${{ env.CLUSTER_IMAGE_REGISTRY_PULL_HOST }}
+ export KAMEL_INSTALL_REGISTRY_INSECURE=${{ env.CLUSTER_IMAGE_REGISTRY_INSECURE }}
+ export KAMEL_INSTALL_OPERATOR_IMAGE=${CUSTOM_IMAGE}:${CUSTOM_VERSION}
+ export CAMEL_K_TEST_IMAGE_NAME=${CUSTOM_IMAGE}
+ export CAMEL_K_TEST_IMAGE_VERSION=${CUSTOM_VERSION}
+
+ # Then run integration tests
+ make test-builder
+
+ - name: Cleanup
+ uses: ./.github/actions/kamel-cleanup
+ if: ${{ always() }}
diff --git a/.github/actions/e2e-knative-yaks/action.yml b/.github/actions/e2e-knative-yaks/action.yml
new file mode 100644
index 0000000..e72e4ce
--- /dev/null
+++ b/.github/actions/e2e-knative-yaks/action.yml
@@ -0,0 +1,99 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+name: e2e-knative-yaks
+description: 'End-to-End tests for knative use-cases using yaks'
+
+inputs:
+ cluster-config-data:
+ description: 'The configuration of the underlying cluster (if cluster-type is custom)'
+ required: false
+
+runs:
+ using: "composite"
+
+ steps:
+ - id: prepare-env
+ name: Prepare Test Environment
+ uses: ./.github/actions/kamel-prepare-env
+
+ - id: configure-cluster
+ name: Configure Platform
+ uses: ./.github/actions/kamel-config-cluster
+ with:
+ cluster-type: ${{ env.TEST_CLUSTER }}
+ cluster-config-data: ${{ inputs.cluster-config-data }}
+
+ - name: Install YAKS
+ uses: ./.github/actions/kamel-install-yaks
+
+ - name: Install Knative
+ uses: ./.github/actions/kamel-install-knative
+
+ - id: build-kamel
+ name: Build Kamel
+ uses: ./.github/actions/kamel-build
+ with:
+ image-registry-push-host: ${{ env.CLUSTER_IMAGE_REGISTRY_PUSH_HOST }}
+ image-registry-pull-host: ${{ env.CLUSTER_IMAGE_REGISTRY_PULL_HOST }}
+ image-namespace: ${{ env.CLUSTER_IMAGE_NAMESPACE }}
+ # Builds the bundle if an OLM is available - depends on cluster being tested
+ build-bundle: ${{ env.CLUSTER_HAS_OLM }}
+ # Can be empty and so catalog source will not be created
+ catalog-source-namespace: ${{ env.CLUSTER_CATALOG_SOURCE_NAMESPACE }}
+
+ - id: install-kamel-cluster-setup
+ name: Install Kamel Cluster Setup
+ uses: ./.github/actions/kamel-install-cluster-setup
+ with:
+ kube-admin-user-ctx: ${{ env.CLUSTER_KUBE_ADMIN_USER_CTX }}
+
+ - id: run-it
+ name: Run IT
+ shell: bash
+ run: |
+ # Cluster environment
+ export CUSTOM_IMAGE=${{ env.BUILD_BINARY_LOCAL_IMAGE_NAME }}
+ export CUSTOM_VERSION=${{ env.BUILD_BINARY_LOCAL_IMAGE_VERSION }}
+
+ #
+ # If bundle has been built and installed then use it
+ #
+ if [ -n "${{ env.BUILD_BUNDLE_CATALOG_SOURCE }}" ]; then
+ export KAMEL_INSTALL_OLM_SOURCE_NAMESPACE=${{ env.CLUSTER_IMAGE_NAMESPACE }}
+ export KAMEL_INSTALL_OLM_SOURCE=${{ env.BUILD_BUNDLE_CATALOG_SOURCE }}
+ fi
+
+ export KAMEL_INSTALL_REGISTRY=${{ env.CLUSTER_IMAGE_REGISTRY_PULL_HOST }}
+ export KAMEL_INSTALL_REGISTRY_INSECURE=${{ env.CLUSTER_IMAGE_REGISTRY_INSECURE }}
+ export KAMEL_INSTALL_OPERATOR_IMAGE=${CUSTOM_IMAGE}:${CUSTOM_VERSION}
+ export CAMEL_K_TEST_IMAGE_NAME=${CUSTOM_IMAGE}
+ export CAMEL_K_TEST_IMAGE_VERSION=${CUSTOM_VERSION}
+
+ # Test options
+ export KAMEL_INSTALL_MAVEN_REPOSITORIES=$(make get-staging-repo)
+ export KAMEL_INSTALL_OPERATOR_ENV_VARS=KAMEL_INSTALL_DEFAULT_KAMELETS=false
+
+ # Install Yaks globally
+ yaks install
+
+ # Then run integration tests
+ yaks test e2e/yaks/common
+
+ - name: Cleanup
+ uses: ./.github/actions/kamel-cleanup
+ if: ${{ always() }}
diff --git a/.github/actions/e2e-knative/action.yml b/.github/actions/e2e-knative/action.yml
new file mode 100644
index 0000000..1c929d3
--- /dev/null
+++ b/.github/actions/e2e-knative/action.yml
@@ -0,0 +1,93 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+name: e2e-knative
+description: 'End-to-End tests for knative use-cases'
+
+inputs:
+ cluster-config-data:
+ description: 'The configuration of the underlying cluster (if cluster-type is custom)'
+ required: false
+
+runs:
+ using: "composite"
+
+ steps:
+ - id: prepare-env
+ name: Prepare Test Environment
+ uses: ./.github/actions/kamel-prepare-env
+
+ - id: configure-cluster
+ name: Configure Platform
+ uses: ./.github/actions/kamel-config-cluster
+ with:
+ cluster-type: ${{ env.TEST_CLUSTER }}
+ cluster-config-data: ${{ inputs.cluster-config-data }}
+
+ - name: Install Knative
+ uses: ./.github/actions/kamel-install-knative
+
+ - id: build-kamel
+ name: Build Kamel
+ uses: ./.github/actions/kamel-build
+ with:
+ image-registry-push-host: ${{ env.CLUSTER_IMAGE_REGISTRY_PUSH_HOST }}
+ image-registry-pull-host: ${{ env.CLUSTER_IMAGE_REGISTRY_PULL_HOST }}
+ image-namespace: ${{ env.CLUSTER_IMAGE_NAMESPACE }}
+ # Builds the bundle if an OLM is available - depends on cluster being tested
+ build-bundle: ${{ env.CLUSTER_HAS_OLM }}
+ # Can be empty and so catalog source will not be created
+ catalog-source-namespace: ${{ env.CLUSTER_CATALOG_SOURCE_NAMESPACE }}
+
+ - id: install-kamel-cluster-setup
+ name: Install Kamel Cluster Setup
+ uses: ./.github/actions/kamel-install-cluster-setup
+ with:
+ kube-admin-user-ctx: ${{ env.CLUSTER_KUBE_ADMIN_USER_CTX }}
+
+ - id: run-it
+ name: Run IT
+ shell: bash
+ run: |
+ # Cluster environment
+ export CUSTOM_IMAGE=${{ env.BUILD_BINARY_LOCAL_IMAGE_NAME }}
+ export CUSTOM_VERSION=${{ env.BUILD_BINARY_LOCAL_IMAGE_VERSION }}
+
+ #
+ # If bundle has been built and installed then use it
+ #
+ if [ -n "${{ env.BUILD_BUNDLE_CATALOG_SOURCE }}" ]; then
+ export KAMEL_INSTALL_OLM_SOURCE_NAMESPACE=${{ env.CLUSTER_IMAGE_NAMESPACE }}
+ export KAMEL_INSTALL_OLM_SOURCE=${{ env.BUILD_BUNDLE_CATALOG_SOURCE }}
+ fi
+
+ export KAMEL_INSTALL_REGISTRY=${{ env.CLUSTER_IMAGE_REGISTRY_PULL_HOST }}
+ export KAMEL_INSTALL_REGISTRY_INSECURE=${{ env.CLUSTER_IMAGE_REGISTRY_INSECURE }}
+ export KAMEL_INSTALL_OPERATOR_IMAGE=${CUSTOM_IMAGE}:${CUSTOM_VERSION}
+ export CAMEL_K_TEST_IMAGE_NAME=${CUSTOM_IMAGE}
+ export CAMEL_K_TEST_IMAGE_VERSION=${CUSTOM_VERSION}
+
+ # Test options
+ export KAMEL_INSTALL_MAVEN_REPOSITORIES=$(make get-staging-repo)
+ export KAMEL_INSTALL_OPERATOR_ENV_VARS=KAMEL_INSTALL_DEFAULT_KAMELETS=false
+
+ # Then run integration tests
+ make test-knative
+
+ - name: Cleanup
+ uses: ./.github/actions/kamel-cleanup
+ if: ${{ always() }}
diff --git a/.github/actions/e2e-local/action.yml b/.github/actions/e2e-local/action.yml
new file mode 100644
index 0000000..47a9d27
--- /dev/null
+++ b/.github/actions/e2e-local/action.yml
@@ -0,0 +1,43 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+name: e2e-local
+description: 'End-to-End tests for local use-cases'
+
+runs:
+ using: "composite"
+
+ steps:
+ - id: prepare-env
+ name: Prepare Test Environment
+ uses: ./.github/actions/kamel-prepare-env
+
+ - id: build-kamel
+ name: Build Kamel
+ uses: ./.github/actions/kamel-build
+ with:
+ make-rules: 'build-kamel'
+
+ - id: run-it
+ name: Run IT
+ shell: bash
+ run: |
+ # Configure staging repos
+ export KAMEL_LOCAL_RUN_MAVEN_REPOSITORIES=$(make get-staging-repo)
+
+ # Then run integration tests
+ make test-local
diff --git a/.github/actions/kamel-install-yaks/action.yml b/.github/actions/kamel-install-yaks/action.yml
new file mode 100644
index 0000000..7eb72f0
--- /dev/null
+++ b/.github/actions/kamel-install-yaks/action.yml
@@ -0,0 +1,35 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+name: kamel-install-yaks
+description: 'Install YAKS artifacts'
+runs:
+ using: "composite"
+ steps:
+ - id: get-yaks
+ name: Get YAKS
+ shell: bash
+ run: |
+ export YAKS_VERSION=0.4.0
+ curl --fail -L https://github.com/citrusframework/yaks/releases/download/v${YAKS_VERSION}/yaks-${YAKS_VERSION}-linux-64bit.tar.gz -o yaks.tar.gz
+ tar -zxf yaks.tar.gz
+ sudo mv yaks /usr/local/bin/
+
+ - name: Install YAKS
+ shell: bash
+ run: |
+ yaks install --cluster-setup
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index c8ceb9f..e5c5569 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -63,17 +63,5 @@ jobs:
persist-credentials: false
submodules: recursive
- - id: prepare-env
- name: Prepare Test Environment
- uses: ./.github/actions/kamel-prepare-env
-
- - name: Cache modules
- uses: actions/cache@v1
- with:
- path: ~/go/pkg/mod
- key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- restore-keys: |
- ${{ runner.os }}-go-
-
- - name: Test
- run: make
+ - name: Execute Build Tests
+ uses: ./.github/actions/e2e-build
diff --git a/.github/workflows/builder.yml b/.github/workflows/builder.yml
index 888e128..bd77998 100644
--- a/.github/workflows/builder.yml
+++ b/.github/workflows/builder.yml
@@ -62,49 +62,8 @@ jobs:
persist-credentials: false
submodules: recursive
- - id: prepare-env
- name: Prepare Test Environment
- uses: ./.github/actions/kamel-prepare-env
-
- - id: configure-platform
- name: Configure Platform
- uses: ./.github/actions/kamel-config-cluster
+ - name: Execute Builder Tests
+ uses: ./.github/actions/e2e-builder
with:
- cluster-type: ${{ steps.prepare-env.outputs.cluster-platform }}
- kube-config-data: ${{ secrets.KUBE_CONFIG_DATA }}
- kube-admin-user-ctx: ${{ secrets.KUBE_ADMIN_USER_CTX }}
- kube-user-ctx: ${{ secrets.KUBE_USER_CTX }}
- image-registry: ${{ secrets.IMAGE_REGISTRY }}
- image-registry-insecure: ${{ secrets.IMAGE_REGISTRY_INSECURE }}
-
-
- - id: build-kamel-binary
- name: Build Kamel Binary
- uses: ./.github/actions/kamel-build-binary
- with:
- image-registry: ${{ steps.configure-platform.outputs.image-registry }}
-
- - name: Install Kamel Cluster Setup
- uses: ./.github/actions/kamel-install-cluster-setup
- with:
- kube-admin-user-ctx: ${{ steps.configure-platform.outputs.kube-admin-user-ctx }}
-
- - name: Run IT
- env:
- KAMEL_INSTALL_BUILD_PUBLISH_STRATEGY: ${{ matrix.publisher }}
- run: |
- # Cluster environment
- export KAMEL_INSTALL_REGISTRY=${{ steps.configure-platform.outputs.image-registry }}
- export KAMEL_INSTALL_REGISTRY_INSECURE=${{ steps.configure-platform.outputs.image-registry-insecure }}
- export CUSTOM_IMAGE=${{ steps.build-kamel-binary.outputs.local-image-name }}
- export CUSTOM_VERSION=${{ steps.build-kamel-binary.outputs.local-image-version }}
- export KAMEL_INSTALL_OPERATOR_IMAGE=${CUSTOM_IMAGE}:${CUSTOM_VERSION}
- export CAMEL_K_TEST_IMAGE_NAME=${CUSTOM_IMAGE}
- export CAMEL_K_TEST_IMAGE_VERSION=${CUSTOM_VERSION}
-
- # Test options
- export KAMEL_INSTALL_MAVEN_REPOSITORIES=$(make get-staging-repo)
- export KAMEL_INSTALL_OPERATOR_ENV_VARS=KAMEL_INSTALL_DEFAULT_KAMELETS=false
-
- # Then run integration tests
- make test-builder
+ cluster-config-data: ${{ secrets.E2E_CLUSTER_CONFIG }}
+ publisher: ${{ matrix.publisher }}
diff --git a/.github/workflows/knative.yml b/.github/workflows/knative.yml
index e9048b0..d3cdfd7 100644
--- a/.github/workflows/knative.yml
+++ b/.github/workflows/knative.yml
@@ -58,111 +58,21 @@ jobs:
persist-credentials: false
submodules: recursive
- - id: prepare-env
- name: Prepare Test Environment
- uses: ./.github/actions/kamel-prepare-env
-
- - id: configure-platform
- name: Configure Platform
- uses: ./.github/actions/kamel-config-cluster
- with:
- cluster-type: ${{ steps.prepare-env.outputs.cluster-platform }}
-
- - name: Install Knative
- uses: ./.github/actions/kamel-install-knative
-
- - id: build-kamel-binary
- name: Build Kamel Binary
- uses: ./.github/actions/kamel-build-binary
+ - name: Execute KNative Tests
+ uses: ./.github/actions/e2e-knative
with:
- image-registry: ${{ steps.configure-platform.outputs.image-registry }}
-
- - name: Install Kamel Cluster Setup
- uses: ./.github/actions/kamel-install-cluster-setup
- with:
- kube-admin-user-ctx: ${{ steps.configure-platform.outputs.kube-admin-user-ctx }}
-
- - name: Run IT
- run: |
- # Cluster environment
- export KAMEL_INSTALL_REGISTRY=${{ steps.configure-platform.outputs.image-registry }}
- export KAMEL_INSTALL_REGISTRY_INSECURE=${{ steps.configure-platform.outputs.image-registry-insecure }}
- export CUSTOM_IMAGE=${{ steps.build-kamel-binary.outputs.local-image-name }}
- export CUSTOM_VERSION=${{ steps.build-kamel-binary.outputs.local-image-version }}
- export KAMEL_INSTALL_OPERATOR_IMAGE=${CUSTOM_IMAGE}:${CUSTOM_VERSION}
- export CAMEL_K_TEST_IMAGE_NAME=${CUSTOM_IMAGE}
- export CAMEL_K_TEST_IMAGE_VERSION=${CUSTOM_VERSION}
-
- # Test options
- export KAMEL_INSTALL_BUILD_PUBLISH_STRATEGY=Spectrum
- export KAMEL_INSTALL_MAVEN_REPOSITORIES=$(make get-staging-repo)
- export KAMEL_INSTALL_OPERATOR_ENV_VARS=KAMEL_INSTALL_DEFAULT_KAMELETS=false
-
- # Then run integration tests
- make test-knative
+ cluster-config-data: ${{ secrets.E2E_CLUSTER_CONFIG }}
yaks:
runs-on: ubuntu-20.04
steps:
- - name: Checkout code
- uses: actions/checkout@v2
- with:
- persist-credentials: false
- submodules: recursive
-
- - id: prepare-env
- name: Prepare Test Environment
- uses: ./.github/actions/kamel-prepare-env
-
- - name: Get YAKS
- run: |
- export YAKS_VERSION=0.4.0
- curl --fail -L https://github.com/citrusframework/yaks/releases/download/v${YAKS_VERSION}/yaks-${YAKS_VERSION}-linux-64bit.tar.gz -o yaks.tar.gz
- tar -zxf yaks.tar.gz
- sudo mv yaks /usr/local/bin/
-
- - id: configure-platform
- name: Configure Platform
- uses: ./.github/actions/kamel-config-cluster
- with:
- cluster-type: ${{ steps.prepare-env.outputs.cluster-platform }}
-
- - name: Install YAKS
- run: |
- yaks install --cluster-setup
-
- - name: Install Knative
- uses: ./.github/actions/kamel-install-knative
-
- - id: build-kamel-binary
- name: Build Kamel Binary
- uses: ./.github/actions/kamel-build-binary
- with:
- image-registry: ${{ steps.configure-platform.outputs.image-registry }}
-
- - name: Install Kamel Cluster Setup
- uses: ./.github/actions/kamel-install-cluster-setup
- with:
- kube-admin-user-ctx: ${{ steps.configure-platform.outputs.kube-admin-user-ctx }}
-
- - name: Run IT
- run: |
- # Cluster environment
- export KAMEL_INSTALL_REGISTRY=${{ steps.configure-platform.outputs.image-registry }}
- export KAMEL_INSTALL_REGISTRY_INSECURE=${{ steps.configure-platform.outputs.image-registry-insecure }}
- export CUSTOM_IMAGE=${{ steps.build-kamel-binary.outputs.local-image-name }}
- export CUSTOM_VERSION=${{ steps.build-kamel-binary.outputs.local-image-version }}
- export KAMEL_INSTALL_OPERATOR_IMAGE=${CUSTOM_IMAGE}:${CUSTOM_VERSION}
- export CAMEL_K_TEST_IMAGE_NAME=${CUSTOM_IMAGE}
- export CAMEL_K_TEST_IMAGE_VERSION=${CUSTOM_VERSION}
-
- # Test options
- export KAMEL_INSTALL_MAVEN_REPOSITORIES=$(make get-staging-repo)
- export KAMEL_INSTALL_OPERATOR_ENV_VARS=KAMEL_INSTALL_DEFAULT_KAMELETS=false
- export KAMEL_INSTALL_BUILD_PUBLISH_STRATEGY=Spectrum
-
- # Install Yaks globally
- yaks install
+ - name: Checkout code
+ uses: actions/checkout@v2
+ with:
+ persist-credentials: false
+ submodules: recursive
- # Then run integration tests
- yaks test e2e/yaks/common
+ - name: Execute KNative YAKS Tests
+ uses: ./.github/actions/e2e-knative-yaks
+ with:
+ cluster-config-data: ${{ secrets.E2E_CLUSTER_CONFIG }}
diff --git a/.github/workflows/local.yml b/.github/workflows/local.yml
index cd8a9a2..df38900 100644
--- a/.github/workflows/local.yml
+++ b/.github/workflows/local.yml
@@ -59,20 +59,5 @@ jobs:
persist-credentials: false
submodules: recursive
- - id: prepare-env
- name: Prepare Test Environment
- uses: ./.github/actions/kamel-prepare-env
-
- - id: build-kamel-binary
- name: Build Kamel Binary
- uses: ./.github/actions/kamel-build-binary
- with:
- make-rules: 'build-kamel'
-
- - name: Run IT
- run: |
- # Configure staging repos
- export KAMEL_LOCAL_RUN_MAVEN_REPOSITORIES=$(make get-staging-repo)
-
- # Then run integration tests
- make test-local
+ - name: Execute Local Tests
+ uses: ./.github/actions/e2e-local