From 0de15afdfaa239521ca9c78e4e16e21cd78a0f37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Dan=C4=9Bk?= Date: Wed, 9 Mar 2022 19:53:47 +0100 Subject: [PATCH 1/6] Run Skupper integration tests with the skupper-router image --- .../skupper-integration-tests/action.yml | 147 ++++++++++++++++++ .github/workflows/build.yaml | 17 ++ 2 files changed, 164 insertions(+) create mode 100644 .github/actions/skupper-integration-tests/action.yml diff --git a/.github/actions/skupper-integration-tests/action.yml b/.github/actions/skupper-integration-tests/action.yml new file mode 100644 index 000000000..ee03f40ec --- /dev/null +++ b/.github/actions/skupper-integration-tests/action.yml @@ -0,0 +1,147 @@ +# +# 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: Test skupper-router main +description: Execute skupper integration testing + +inputs: + + qdrouterdImage: + required: true + description: Image to use in skupper integration tests + + skupperGitRef: + required: false + description: Reference to skupper version + default: "master" + +runs: + using: "composite" + steps: + + - name: Install gotestsum + run: | + curl -OL https://github.com/gotestyourself/gotestsum/releases/download/v1.8.0/gotestsum_1.8.0_linux_amd64.tar.gz + sudo tar -xvf gotestsum_1.8.0_linux_amd64.tar.gz -C /usr/bin gotestsum + shell: bash + + - name: Get Go cache paths + id: go-cache-paths + run: | + echo "::set-output name=go-build::$(go env GOCACHE)" + echo "::set-output name=go-mod::$(go env GOMODCACHE)" + shell: bash + + - name: Install microk8s + run: | + sudo snap install microk8s --classic --channel=1.23/stable + sudo microk8s enable dns ingress storage registry:size=20Gi host-access:ip=10.0.1.1 metallb:10.64.140.18-10.64.140.88 + sudo microk8s status --wait-ready + shell: bash + + - name: Export microk8s config + if: "${{ always() }}" + run: | + mkdir -p $HOME/.kube + sudo microk8s config > $HOME/.kube/config + shell: bash + + - name: Push image into microk8s + run: | + docker tag "${{ inputs.qdrouterdImage }}" localhost:32000/skupper-router:registry + timeout 5m bash -c 'until nc -z localhost 32000; do sleep 1; done' || : + docker push localhost:32000/skupper-router:registry + podman pull --tls-verify=false localhost:32000/skupper-router:registry + shell: bash + + - name: Checkout Skupper + uses: actions/checkout@v2 + with: + repository: 'skupperproject/skupper' + ref: "${{ inputs.skupperGitRef }}" + path: 'skupper' + + - name: Restore Go cache + uses: actions/cache@v2 + with: + path: | + ${{ steps.go-cache-paths.outputs.go-build }} + ${{ steps.go-cache-paths.outputs.go-mod }} + key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }} + + - name: Compile Skupper + run: | + make all + sudo install skupper /usr/local/bin + working-directory: skupper + shell: bash + + # https://www.gnu.org/software/make/manual/make.html#Environment + - name: Build and push the controller image + run: | + make -e docker-build + make -e docker-push + shell: bash + working-directory: skupper + env: + # not used, so far; but have to build somewhere we have perms to push + TEST_IMAGE: 'localhost:32000/skupper-test:registry' + + SERVICE_CONTROLLER_IMAGE: 'localhost:32000/skupper-service-controller:registry' + SITE_CONTROLLER_IMAGE: 'localhost:32000/skupper-site-controller:registry' + CONFIG_SYNC_IMAGE: 'localhost:32000/skupper-config-sync:registry' + + - name: Run Skupper integration tests + run: | + gotestsum --format=standard-verbose -- -p=1 -count=1 -tags=integration -timeout=60m -v ./... + working-directory: skupper + shell: bash + env: + PUBLIC_1_INGRESS_HOST: '10.0.1.1' + QDROUTERD_IMAGE: 'localhost:32000/skupper-router:registry' + SKUPPER_SERVICE_CONTROLLER_IMAGE: 'localhost:32000/skupper-service-controller:registry' + SKUPPER_CONFIG_SYNC_IMAGE: 'localhost:32000/skupper-config-sync:registry' + SKUPPER_SITE_CONTROLLER_IMAGE: 'localhost:32000/skupper-site-controller:registry' + + - name: Dump microk8s log (apiserver) + if: "${{ always() }}" + run: | + sudo journalctl -u snap.microk8s.daemon-apiserver > apiserver.log + shell: bash + + - name: Dump microk8s log (kubelet) + if: "${{ always() }}" + run: | + sudo journalctl -u snap.microk8s.daemon-kubelet > kubelet.log + shell: bash + + - name: Dump microk8s log (kubelite) + if: "${{ always() }}" + run: | + sudo journalctl -u snap.microk8s.daemon-kubelite > kubelite.log + shell: bash + + - name: archive logs + if: "${{ always() }}" + uses: actions/upload-artifact@v3 + with: + name: TestLogs + path: | + **/*.tar.gz + **/*.log diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index a8e419676..9117f535f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -806,6 +806,23 @@ jobs: QDROUTERD_IMAGE: local/skupper-router:local RUST_BACKTRACE: 1 + skupper: + name: Skupper Integration Tests + runs-on: ubuntu-latest + steps: + + - uses: actions/checkout@v3 + + - name: Build the skupper-router image + run: | + docker build -t local/skupper-router:local -f ./Containerfile . + + - name: Run the Skupper integration tests with the image + uses: ./.github/actions/skupper-integration-tests + with: + qdrouterdImage: "local/skupper-router:local" + skupperGitRef: "a618477ff6f0b74dd1583f0af04eb9d8d36ecf09" + rpm: name: 'Build and test RPM (${{ matrix.container }}:${{ matrix.containerTag }})' runs-on: '${{ matrix.os }}' From bcfc8160fbe87357d846155c6438f4c5f201659d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Dan=C4=9Bk?= Date: Thu, 28 Apr 2022 22:22:21 +0200 Subject: [PATCH 2/6] fixup -p=3 --- .github/actions/skupper-integration-tests/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/skupper-integration-tests/action.yml b/.github/actions/skupper-integration-tests/action.yml index ee03f40ec..a97a08270 100644 --- a/.github/actions/skupper-integration-tests/action.yml +++ b/.github/actions/skupper-integration-tests/action.yml @@ -109,7 +109,7 @@ runs: - name: Run Skupper integration tests run: | - gotestsum --format=standard-verbose -- -p=1 -count=1 -tags=integration -timeout=60m -v ./... + gotestsum --format=standard-verbose -- -p=3 -count=1 -tags=integration -timeout=60m ./... working-directory: skupper shell: bash env: From 13e71ac8187fb2744024c65c569b97b88a9c459e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Dan=C4=9Bk?= Date: Tue, 3 May 2022 22:14:18 +0200 Subject: [PATCH 3/6] latest upstream test improvements --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9117f535f..c44e55a29 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -821,7 +821,7 @@ jobs: uses: ./.github/actions/skupper-integration-tests with: qdrouterdImage: "local/skupper-router:local" - skupperGitRef: "a618477ff6f0b74dd1583f0af04eb9d8d36ecf09" + skupperGitRef: "1439e4431a01f81e5d86bd4c8e6d1a53239b5494" rpm: name: 'Build and test RPM (${{ matrix.container }}:${{ matrix.containerTag }})' From 566cac7286880f06ce894b60463be1a5b4b99710 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Dan=C4=9Bk?= Date: Fri, 5 Aug 2022 20:36:03 +0200 Subject: [PATCH 4/6] upstream fixes --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c44e55a29..5582f4ad7 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -821,7 +821,7 @@ jobs: uses: ./.github/actions/skupper-integration-tests with: qdrouterdImage: "local/skupper-router:local" - skupperGitRef: "1439e4431a01f81e5d86bd4c8e6d1a53239b5494" + skupperGitRef: "403653c783a24127bade2ea0c838a64ff734e64e" rpm: name: 'Build and test RPM (${{ matrix.container }}:${{ matrix.containerTag }})' From 7113b83cc43c23298333459fd0fc3bee8ebc9d3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Dan=C4=9Bk?= Date: Wed, 26 Oct 2022 11:03:12 +0200 Subject: [PATCH 5/6] pull in upstream skupper latest --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 5582f4ad7..caefece1b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -821,7 +821,7 @@ jobs: uses: ./.github/actions/skupper-integration-tests with: qdrouterdImage: "local/skupper-router:local" - skupperGitRef: "403653c783a24127bade2ea0c838a64ff734e64e" + skupperGitRef: "28fbd7bbec704c8418882c32016aec6fbcb3df99" rpm: name: 'Build and test RPM (${{ matrix.container }}:${{ matrix.containerTag }})' From f12570c10e5d21c13a4d8881ae4b69cd7565dc08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Dan=C4=9Bk?= Date: Sat, 1 Apr 2023 21:03:00 +0200 Subject: [PATCH 6/6] pull in upstream skupper 1.3 --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index caefece1b..2771c9e5b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -821,7 +821,7 @@ jobs: uses: ./.github/actions/skupper-integration-tests with: qdrouterdImage: "local/skupper-router:local" - skupperGitRef: "28fbd7bbec704c8418882c32016aec6fbcb3df99" + skupperGitRef: "26da1caa6110505438f46c1749ffd871f54f9518" rpm: name: 'Build and test RPM (${{ matrix.container }}:${{ matrix.containerTag }})'