From 706305917adbf90b132996a2daee08e0ef8574da Mon Sep 17 00:00:00 2001 From: bunkerity Date: Tue, 7 Mar 2023 11:40:39 +0100 Subject: [PATCH] ci/cd - fix wrong autoconf local image name, add missing secrets for tests-ui, fix wrong IMAGE_TAG for tests-k8s and try to fix pcre issue on linux --- .github/workflows/staging-tests-ui.yml | 6 +++++- .github/workflows/staging-tests.yml | 8 ++++---- .github/workflows/staging.yml | 3 +++ src/deps/install.sh | 1 + 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/staging-tests-ui.yml b/.github/workflows/staging-tests-ui.yml index 624ee39c4..3d0f29cf1 100644 --- a/.github/workflows/staging-tests-ui.yml +++ b/.github/workflows/staging-tests-ui.yml @@ -6,7 +6,11 @@ on: MODE: required: true type: string - + secrets: + PRIVATE_REGISTRY: + required: true + PRIVATE_REGISTRY_TOKEN: + required: true jobs: tests: runs-on: ubuntu-latest diff --git a/.github/workflows/staging-tests.yml b/.github/workflows/staging-tests.yml index 97079c2d0..da5655dcd 100644 --- a/.github/workflows/staging-tests.yml +++ b/.github/workflows/staging-tests.yml @@ -34,12 +34,12 @@ jobs: password: ${{ secrets.PRIVATE_REGISTRY_TOKEN }} - name: Pull BW image run: docker pull ${{ secrets.PRIVATE_REGISTRY }}/infra/bunkerweb-tests:staging && docker tag ${{ secrets.PRIVATE_REGISTRY }}/infra/bunkerweb-tests:staging local/bunkerweb-tests:latest - if: contains(fromJSON('["linux", "k8s"]'), inputs.TYPE) != true + if: ! contains(fromJSON('["linux", "k8s"]'), inputs.TYPE) != true - name: Pull Scheduler image run: docker pull ${{ secrets.PRIVATE_REGISTRY }}/infra/scheduler-tests:staging && docker tag ${{ secrets.PRIVATE_REGISTRY }}/infra/scheduler-tests:staging local/scheduler-tests:latest - if: contains(fromJSON('["linux", "k8s"]'), inputs.TYPE) != true + if: ! contains(fromJSON('["linux", "k8s"]'), inputs.TYPE) != true - name: Pull Autoconf image - run: docker pull ${{ secrets.PRIVATE_REGISTRY }}/infra/autoconf-tests:staging && docker tag ${{ secrets.PRIVATE_REGISTRY }}/infra/autoconf-tests:staging local/scheduler-tests:latest + run: docker pull ${{ secrets.PRIVATE_REGISTRY }}/infra/autoconf-tests:staging && docker tag ${{ secrets.PRIVATE_REGISTRY }}/infra/autoconf-tests:staging local/autoconf-tests:latest if: contains(fromJSON('["autoconf", "swarm"]'), inputs.TYPE) - name: Push images to local repo run: docker tag local/bunkerweb-tests:latest 192.168.42.100:5000/bunkerweb-tests:latest && docker push 192.168.42.100:5000/bunkerweb-tests:latest && docker tag local/scheduler-tests:latest 192.168.42.100:5000/scheduler-tests:latest && docker push 192.168.42.100:5000/scheduler-tests:latest && docker tag local/autoconf-tests:latest 192.168.42.100:5000/autoconf-tests:latest && docker push 192.168.42.100:5000/autoconf-tests:latest @@ -99,7 +99,7 @@ jobs: ROOT_DOMAIN: ${{ secrets.ROOT_DOMAIN }} KUBECONFIG: "/tmp/k8s/kubeconfig" PRIVATE_REGISTRY: ${{ secrets.PRIVATE_REGISTRY }} - IMAGE_TAG: "latest" + IMAGE_TAG: "staging" - name: Run Linux ubuntu tests if: inputs.TYPE == 'linux' run: export $(echo "$TEST_DOMAINS" | xargs) && ./tests/main.py "linux" "ubuntu" diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index 5dc7cdc5f..a61b89d8a 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -202,6 +202,9 @@ jobs: uses: ./.github/workflows/staging-tests-ui.yml with: MODE: STAGING + secrets: + PRIVATE_REGISTRY: ${{ secrets.PRIVATE_REGISTRY }} + PRIVATE_REGISTRY_TOKEN: ${{ secrets.PRIVATE_REGISTRY_TOKEN }} # Delete infrastructures delete-infra-docker: diff --git a/src/deps/install.sh b/src/deps/install.sh index 394129fb2..daf8bb4c3 100755 --- a/src/deps/install.sh +++ b/src/deps/install.sh @@ -128,6 +128,7 @@ echo "ℹ️ Compiling and installing dynamic modules" CONFARGS="$(nginx -V 2>&1 | sed -n -e 's/^.*arguments: //p')" CONFARGS="${CONFARGS/-Os -fomit-frame-pointer -g/-Os}" CONFARGS="$(echo -n "$CONFARGS" | sed "s/--with-ld-opt=-Wl/--with-ld-opt='-lpcre -Wl'/")" +CONFARGS="$(echo -n "$CONFARGS" | sed "s/--with-ld-opt='-Wl/--with-ld-opt='-lpcre -Wl/")" if [ "$OS" = "fedora" ] ; then CONFARGS="$(echo -n "$CONFARGS" | sed "s/--with-ld-opt='.*'/--with-ld-opt=-lpcre/" | sed "s/--with-cc-opt='.*'//")" fi