diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 65a20551e..ef8534215 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,6 +1,6 @@ # Generated by: gromit policy -# Generated on: Tue Nov 21 18:30:13 UTC 2023 +# Generated on: Wed Nov 29 23:09:25 UTC 2023 version: 2 updates: diff --git a/.github/workflows/release-tests.yml b/.github/workflows/release-tests.yml new file mode 100644 index 000000000..fee623216 --- /dev/null +++ b/.github/workflows/release-tests.yml @@ -0,0 +1,43 @@ +name: Smoke Tests + +on: + workflow_call: + +jobs: + smoke-tests: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: arn:aws:iam::754489498669:role/ecr_rw_tyk + role-session-name: cipush + aws-region: eu-central-1 + + - id: ecr + uses: aws-actions/amazon-ecr-login@v2 + with: + mask-password: 'true' + + - name: Run smoke tests + shell: bash + working-directory: ci + run: | + set -eaxo pipefail + if [ ! -d smoke-tests ]; then + echo "::warning No repo specific smoke tests defined" + exit 0 + fi + for d in smoke-tests/*/ + do + echo Attempting to test $d + if [ -d $d ] && [ -e $d/test.sh ]; then + cd $d + ./test.sh ${{ steps.ecr.outputs.registry }}/tyk-pump:sha-${{ github.sha }} + cd - + fi + done diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 46c44faf6..1b9168d5b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,5 @@ # Generated by: gromit policy -# Generated on: Tue Nov 21 18:30:13 UTC 2023 +# Generated on: Wed Nov 29 23:09:25 UTC 2023 # Distribution channels covered by this workflow # - Ubuntu and Debian @@ -96,7 +96,7 @@ jobs: restore-keys: | ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - - uses: goreleaser/goreleaser-action@v4 + - uses: goreleaser/goreleaser-action@v5 with: version: latest args: release --clean -f ${{ matrix.goreleaser }} ${{ !startsWith(github.ref, 'refs/tags/') && ' --snapshot' || '' }} @@ -119,7 +119,7 @@ jobs: # Don't mask to pass it across job boundaries mask-aws-account-id: false - - uses: aws-actions/amazon-ecr-login@v1 + - uses: aws-actions/amazon-ecr-login@v2 id: ecr if: ${{ matrix.golang_cross == '1.19-bullseye' }} with: @@ -188,14 +188,14 @@ jobs: - db: postgres15 markers: "and not sql" steps: - - uses: aws-actions/configure-aws-credentials@v2 + - uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: arn:aws:iam::754489498669:role/ecr_rw_tyk role-session-name: cipush aws-region: eu-central-1 - id: ecr - uses: aws-actions/amazon-ecr-login@v1 + uses: aws-actions/amazon-ecr-login@v2 with: mask-password: 'true' mask-aws-account-id: 'true' @@ -412,61 +412,14 @@ jobs: context: "." file: Dockerfile push: false - smoke-tests: + + release-tests: needs: - goreleaser permissions: id-token: write # This is required for requesting the JWT contents: read # This is required for actions/checkout - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 1 - - - uses: aws-actions/configure-aws-credentials@v2 - with: - role-to-assume: arn:aws:iam::754489498669:role/ecr_rw_tyk - role-session-name: cipush - aws-region: eu-central-1 - - - id: ecr - uses: aws-actions/amazon-ecr-login@v1 - with: - mask-password: 'true' - - - name: Run ci/tests - shell: bash - env: - GITHUB_TAG: ${{ github.ref }} /* mdcb or dash */ - run: | - set -eaxo pipefail - if [ ! -d smoke-tests ]; then - echo "::warning No repo specific smoke tests defined" - fi - if [ ! -d ci/tests ]; then - echo "::warning No ci tests defined" - exit 0 - fi - for d in ci/tests/*/ - do - echo Attempting to test $d - if [ -d $d ] && [ -e $d/test.sh ]; then - cd $d - ./test.sh ${{ steps.ecr.outputs.registry }}/tyk-pump:sha-${{ github.sha }} - cd - - fi - done - for d in smoke-tests/*/ - do - echo Attempting to test $d - if [ -d $d ] && [ -e $d/test.sh ]; then - cd $d - ./test.sh ${{ steps.ecr.outputs.registry }}/tyk-pump:sha-${{ github.sha }} - cd - - fi - done + uses: ./.github/workflows/release-tests.yml sbom: diff --git a/ci/Dockerfile.std b/ci/Dockerfile.std index d26e54a9d..810cda963 100644 --- a/ci/Dockerfile.std +++ b/ci/Dockerfile.std @@ -1,6 +1,5 @@ # Generated by: gromit policy -# Generated on: Tue Nov 21 18:30:13 UTC 2023 - +# Generated on: Wed Nov 29 23:09:25 UTC 2023 FROM debian:bullseye-slim ARG TARGETARCH diff --git a/ci/aws/byol.pkr.hcl b/ci/aws/byol.pkr.hcl index 73c8261a7..71dc51a9f 100644 --- a/ci/aws/byol.pkr.hcl +++ b/ci/aws/byol.pkr.hcl @@ -1,6 +1,6 @@ # Generated by: gromit policy -# Generated on: Tue Nov 21 18:30:13 UTC 2023 +# Generated on: Wed Nov 29 23:09:25 UTC 2023 packer { required_plugins { diff --git a/ci/goreleaser/goreleaser.yml b/ci/goreleaser/goreleaser.yml index 55316943e..a581a0595 100644 --- a/ci/goreleaser/goreleaser.yml +++ b/ci/goreleaser/goreleaser.yml @@ -1,5 +1,5 @@ # Generated by: gromit policy -# Generated on: Tue Nov 21 18:30:13 UTC 2023 +# Generated on: Wed Nov 29 23:09:25 UTC 2023 # Check the documentation at http://goreleaser.com # This project needs CGO_ENABLED=1 and the cross-compiler toolchains for @@ -8,7 +8,10 @@ builds: - id: std ldflags: - - -X github.com/TykTechnologies/tyk-pump/pumps.VERSION={{.Version}} -X github.com/TykTechnologies/tyk-pump/pumps.Commit={{.FullCommit}} -X github.com/TykTechnologies/tyk-pump/pumps.buildDate={{.Date}} -X github.com/TykTechnologies/tyk-pump/pumps.builtBy=goreleaser + - -X github.com/TykTechnologies/tyk-pump/pumps.Version={{.Version}} + - -X github.com/TykTechnologies/tyk-pump/pumps.Commit={{.FullCommit}} + - -X github.com/TykTechnologies/tyk-pump/pumps.BuildDate={{.Date}} + - -X github.com/TykTechnologies/tyk-pump/pumps.BuiltBy=goreleaser goos: - linux goarch: diff --git a/ci/install/before_install.sh b/ci/install/before_install.sh index 1c15a5e19..1d9d378f5 100755 --- a/ci/install/before_install.sh +++ b/ci/install/before_install.sh @@ -1,7 +1,7 @@ #!/bin/bash # Generated by: gromit policy -# Generated on: Tue Nov 21 18:30:13 UTC 2023 +# Generated on: Wed Nov 29 23:09:25 UTC 2023 echo "Creating user and group..." GROUPNAME="tyk" diff --git a/ci/install/post_install.sh b/ci/install/post_install.sh index c73f34f1e..4ff5aa316 100755 --- a/ci/install/post_install.sh +++ b/ci/install/post_install.sh @@ -2,7 +2,7 @@ # Generated by: gromit policy -# Generated on: Tue Nov 21 18:30:13 UTC 2023 +# Generated on: Wed Nov 29 23:09:25 UTC 2023 # If "True" the install directory ownership will be changed to "tyk:tyk" change_ownership="True" diff --git a/ci/install/post_remove.sh b/ci/install/post_remove.sh index 830aedbe4..76f83c4fe 100755 --- a/ci/install/post_remove.sh +++ b/ci/install/post_remove.sh @@ -1,7 +1,7 @@ #!/bin/sh # Generated by: gromit policy -# Generated on: Tue Nov 21 18:30:13 UTC 2023 +# Generated on: Wed Nov 29 23:09:25 UTC 2023 cleanRemove() { diff --git a/ci/install/post_trans.sh b/ci/install/post_trans.sh index bc91f5f0c..de77ca59c 100644 --- a/ci/install/post_trans.sh +++ b/ci/install/post_trans.sh @@ -1,7 +1,7 @@ #!/bin/sh # Generated by: gromit policy -# Generated on: Tue Nov 21 18:30:13 UTC 2023 +# Generated on: Wed Nov 29 23:09:25 UTC 2023 if command -V systemctl >/dev/null 2>&1; then if [ ! -f /lib/systemd/system/tyk-pump.service ]; then diff --git a/ci/tests/csvpump/confs/tyk-pump.conf b/ci/smoke-tests/csvpump/confs/tyk-pump.conf similarity index 100% rename from ci/tests/csvpump/confs/tyk-pump.conf rename to ci/smoke-tests/csvpump/confs/tyk-pump.conf diff --git a/ci/tests/csvpump/confs/tyk.conf b/ci/smoke-tests/csvpump/confs/tyk.conf similarity index 100% rename from ci/tests/csvpump/confs/tyk.conf rename to ci/smoke-tests/csvpump/confs/tyk.conf diff --git a/ci/tests/csvpump/data/api.authenabled.json b/ci/smoke-tests/csvpump/data/api.authenabled.json similarity index 100% rename from ci/tests/csvpump/data/api.authenabled.json rename to ci/smoke-tests/csvpump/data/api.authenabled.json diff --git a/ci/tests/csvpump/data/key.json b/ci/smoke-tests/csvpump/data/key.json similarity index 100% rename from ci/tests/csvpump/data/key.json rename to ci/smoke-tests/csvpump/data/key.json diff --git a/ci/tests/csvpump/data/org.json b/ci/smoke-tests/csvpump/data/org.json similarity index 100% rename from ci/tests/csvpump/data/org.json rename to ci/smoke-tests/csvpump/data/org.json diff --git a/ci/tests/csvpump/docker-compose.yml b/ci/smoke-tests/csvpump/docker-compose.yml similarity index 100% rename from ci/tests/csvpump/docker-compose.yml rename to ci/smoke-tests/csvpump/docker-compose.yml diff --git a/ci/tests/csvpump/test.sh b/ci/smoke-tests/csvpump/test.sh similarity index 100% rename from ci/tests/csvpump/test.sh rename to ci/smoke-tests/csvpump/test.sh