From b4a8c28a2bdf2dea2f42f2f5335b31a78d584e4d Mon Sep 17 00:00:00 2001 From: Sandra Date: Wed, 13 Nov 2024 12:16:37 +0200 Subject: [PATCH] PSMDB. Run tests for all major versions --- .github/workflows/PMM_PSMDB_PBM.yml | 8 --- .github/workflows/PMM_PSMDB_PBM_FULL.yml | 71 ++++++++++++++++++++++++ pmm_psmdb-pbm_setup/Dockerfile | 2 +- 3 files changed, 72 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/PMM_PSMDB_PBM_FULL.yml diff --git a/.github/workflows/PMM_PSMDB_PBM.yml b/.github/workflows/PMM_PSMDB_PBM.yml index 65e5c5e..1432487 100644 --- a/.github/workflows/PMM_PSMDB_PBM.yml +++ b/.github/workflows/PMM_PSMDB_PBM.yml @@ -16,14 +16,6 @@ on: description: "pmm-server docker image" required: false - push: - branches: - - main - - pull_request: - branches: - - main - jobs: test_replica_set: runs-on: ubuntu-22.04 diff --git a/.github/workflows/PMM_PSMDB_PBM_FULL.yml b/.github/workflows/PMM_PSMDB_PBM_FULL.yml new file mode 100644 index 0000000..64935ed --- /dev/null +++ b/.github/workflows/PMM_PSMDB_PBM_FULL.yml @@ -0,0 +1,71 @@ +name: PMM_PSMDB_PBM_FULL + +on: + workflow_dispatch: + inputs: + pmm_version: + description: "pmm2-client version" + required: false + pmm_image: + description: "pmm-server docker image" + required: false + + push: + branches: + - main + + pull_request: + branches: + - main + +jobs: + test_replica_set: + runs-on: ubuntu-22.04 + timeout-minutes: 20 + strategy: + fail-fast: false + matrix: + psmdb: ["6.0", "7.0"] + env: + PMM_CLIENT_VERSION: ${{ github.event.inputs.pmm_version || 'latest' }} + PMM_IMAGE: ${{ github.event.inputs.pmm_image || 'perconalab/pmm-server:dev-latest' }} + steps: + - uses: actions/checkout@v2 + - name: Test RS with PSMDB ${{ matrix.psmdb }} + run: | + PSMDB_VERSION=${{ matrix.psmdb }} ./start-rs.sh + working-directory: ./pmm_psmdb-pbm_setup + + test_sharded_cluster: + runs-on: ubuntu-22.04 + timeout-minutes: 20 + strategy: + fail-fast: false + matrix: + psmdb: ["6.0", "7.0"] + env: + PMM_CLIENT_VERSION: ${{ github.event.inputs.pmm_version || 'latest' }} + PMM_IMAGE: ${{ github.event.inputs.pmm_image || 'perconalab/pmm-server:dev-latest' }} + steps: + - uses: actions/checkout@v2 + - name: Test sharded with PSMDB ${{ matrix.psmdb }} + run: | + PSMDB_VERSION=${{ matrix.psmdb }} ./start-sharded.sh + working-directory: ./pmm_psmdb-pbm_setup + + test_diff_auth: + runs-on: ubuntu-22.04 + timeout-minutes: 20 + strategy: + fail-fast: false + matrix: + psmdb: ["6.0", "7.0"] + env: + PMM_CLIENT_VERSION: ${{ github.event.inputs.pmm_version || 'latest' }} + PMM_IMAGE: ${{ github.event.inputs.pmm_image || 'perconalab/pmm-server:dev-latest' }} + steps: + - uses: actions/checkout@v3 + - name: Test auth with PSMDB ${{ matrix.psmdb }} + run: | + PSMDB_VERSION=${{ matrix.psmdb }} ./test-auth.sh + working-directory: ./pmm_psmdb_diffauth_setup diff --git a/pmm_psmdb-pbm_setup/Dockerfile b/pmm_psmdb-pbm_setup/Dockerfile index 332be54..4b6fee5 100644 --- a/pmm_psmdb-pbm_setup/Dockerfile +++ b/pmm_psmdb-pbm_setup/Dockerfile @@ -38,7 +38,7 @@ RUN set -ex; \ percona-release enable pmm2-client ${PMM_REPO} && \ yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && \ yum update --refresh -y && \ - if [ $PSMDB_VERSION == "latest" ]; then \ + if [[ $PSMDB_VERSION == "latest" || "$PSMDB_VERSION" =~ ^[0-9]\.[0-9]$ ]] ; then \ yum -y install percona-server-mongodb \ percona-server-mongodb-tools \ percona-server-mongodb-server \