From 07ac793aa67607b54501b29628929b64df5b2924 Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Wed, 13 Dec 2023 20:14:55 +0100 Subject: [PATCH 01/31] PMM-12770 base runner shape --- .github/workflows/pmm-package-test.yml | 334 +++++++++++++------------ 1 file changed, 180 insertions(+), 154 deletions(-) diff --git a/.github/workflows/pmm-package-test.yml b/.github/workflows/pmm-package-test.yml index cac93781a..e56cf4fb9 100644 --- a/.github/workflows/pmm-package-test.yml +++ b/.github/workflows/pmm-package-test.yml @@ -1,205 +1,231 @@ --- -name: ui-tests-pipeline +name: package-test-pipeline on: - workflow_call: - inputs: - pmm_ui_tests_branch: - description: 'Target branch for pmm-ui-tests repository' - type: string - default: 'main' - required: true - pmm_test_flag: - description: 'Flag to run only specific portion of the tests.' - type: string - required: false - pmm_server_version: - description: 'Version of the pmm server used for testing' - type: string - default: 'dev-latest' - required: true - pmm_client_version: - description: 'Version of the pmm client used for testing' - type: string - default: 'dev-latest' - required: true - pmm_clients: - description: 'Clients for pmm-server' - type: string - default: '--addclient=ps,1' - required: true - pmm_qa_branch: - description: 'Branch for the pmm-qa repository.' - type: string - default: 'main' - required: true - workflow_dispatch: inputs: - pmm_ui_tests_branch: - description: 'Target branch for pmm-ui-tests repository' + package_testing_branch: + description: "Target branch for package-testing repository" type: string - default: 'main' + default: "master" required: true - pmm_test_flag: - description: 'Flag to run only specific portion of the tests.' - type: string + pmm_server_image: + description: "pmm-server docker image, default perconalab/pmm-server:dev-latest" required: false - pmm_server_version: - description: 'Version of the pmm server used for testing' type: string - default: 'dev-latest' - required: true - pmm_client_version: - description: 'Version of the pmm client used for testing' + default: "perconalab/pmm-server:dev-latest" + pmm_client_tarball: + description: "PMM Client tarball link or FB-code" type: string - default: 'dev-latest' +# package_repo: experimental | testing | main | pmm2-client-main + repository: + description: "Select Repo for Client Nodes:" required: true - pmm_clients: - description: 'Clients for pmm-server' - type: string - default: '--addclient=ps,1' + default: "dev-latest" + type: choice + options: + - release + - release candidate + - patch-release candidate + - dev-latest + metrics_mode: + description: "Select the Metrics Mode for PMM Client:" required: true - pmm_qa_branch: - description: 'Branch for the pmm-qa repository.' + default: "auto" + type: choice + options: + - auto + - push + - pull + test_name: + description: "Target branch for package-testing repository" type: string - default: 'main' + default: "integration" required: true + os: + description: "Select OS to run test in:" + required: true + default: "jammy-x64" + type: choice + options: + - bionic-x64 + - bullseye-x64 + - buster-x64 + - focal-x64 + - jammy-x64 + - centos-7-x64 + - ol-8-x64 + - ol-9-x64 jobs: - tests: - name: Tests + get_versions: + name: Get versions + uses: Percona-Lab/pmm-submodules/.github/workflows/pmm-version-getter.yml@PMM-2.0 + with: + repository: ${{ inputs.repository || "dev-latest"}} + + test: + name: ${{ inputs.test_name }} runs-on: ubuntu-latest - timeout-minutes: 60 + timeout-minutes: 90 env: - SHA: ${{ inputs.sha || 'null' }} - PMM_BASE_URL: https://127.0.0.1 + SHA: ${{ inputs.sha || "null" }} + PMM_SERVER_IP: 127.0.0.1 ADMIN_PASSWORD: admin - UI_TESTS_BRANCH: ${{ inputs.pmm_ui_tests_branch }} - PMM_CLIENTS: ${{ inputs.pmm_clients }} - PMM_TEST_FLAG: ${{ inputs.pmm_test_flag }} - - PMM_SERVER_VERSION: ${{ inputs.pmm_server_version }} - PMM_CLIENT_VERSION: ${{ inputs.pmm_client_version }} - PMM_QA_BRANCH: ${{ inputs.pmm_qa_branch }} + PACKAGE_TESTING_BRANCH: ${{ inputs.package_testing_branch || "master" }} + PMM_SERVER_IMAGE: ${{ inputs.pmm_server_image }} + TARBALL: ${{ inputs.pmm_server_image || "null" }} + EXPECTED_VERSION: ${{ inputs.pmm_version }} - OKTA_TOKEN: ${{ secrets.OKTA_TOKEN }} - OAUTH_ISSUER_URL: 'https://id-dev.percona.com/oauth2/aus15pi5rjdtfrcH51d7' - OAUTH_CLIENT_ID: ${{ secrets.OKTA_OAUTH_CLIENT_ID }} - OAUTH_CLIENT_SECRET: ${{ secrets.OKTA_OAUTH_CLIENT_SECRET }} - OAUTH_PMM_CLIENT_ID: ${{ secrets.OKTA_OAUTH_PMM_CLIENT_ID }} - OAUTH_PMM_CLIENT_SECRET: ${{ secrets.OKTA_OAUTH_PMM_CLIENT_SECRET }} - OAUTH_DEV_HOST: ${{ secrets.OAUTH_DEV_HOST }} - OAUTH_SCOPES: percona - - # Variables for E2E tests - MAILOSAUR_API_KEY: ${{ secrets.MAILOSAUR_API_KEY }} - MAILOSAUR_UI_TESTS_SERVER_ID: ${{ secrets.MAILOSAUR_UI_TESTS_SERVER_ID }} - MAILOSAUR_API_TESTS_SERVER_ID: ${{ secrets.MAILOSAUR_API_TESTS_SERVER_ID }} - - SERVICENOW_LOGIN: percona_platform - SERVICENOW_PASSWORD: ${{ secrets.SERVICENOW_PASSWORD }} - SERVICENOW_DEV_URL: 'https://perconadev.service-now.com/api/x_pellc_percona_pl/platform/settest' + REPO: ${{ inputs.repository || "dev-latest" }} + METRICS_MODE: ${{ inputs.metrics_mode || "auto" }} + PLAYBOOK: ${{ inputs.playbook }} steps: - - name: PMM server version ${{ inputs.pmm_server_version }} and UI tests for flag "${{ inputs.pmm_test_flag }}" and pmm-ui-tests branch ${{ inputs.pmm_ui_tests_branch }} - if: ${{ env.SHA != 'null' }} + - name: "Create status check" + if: ${{ env.SHA != "null" }} uses: percona/gh-action-github-status-action@v1 continue-on-error: true with: authToken: ${{ secrets.GITHUB_TOKEN }} - context: "${{ env.PMM_TEST_FLAG }} UI tests" + context: "${{ inputs.test_name }} Package test" description: "Test execution ${{ job.status }}" state: "pending" repository: ${{ github.repository }} target_url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" sha: ${{ env.SHA }} - - name: 'Checkout UI tests: "${{ inputs.pmm_ui_tests_branch }}"' + - name: 'Checkout package-testing: "${{ inputs.package_testing_branch }}"' uses: actions/checkout@v3 with: - ref: ${{ inputs.pmm_ui_tests_branch }} - repository: percona/pmm-ui-tests - path: ./pmm-ui-tests + ref: ${{ inputs.package_testing_branch }} + path: ./package-testing - - name: 'Install playwright' - working-directory: ./pmm-ui-tests/playwright-tests + - name: 'Convert choices' run: | - npm ci - npx playwright install - - - name: 'Checkout pmm-qa: "${{ inputs.pmm_qa_branch }}"' - uses: actions/checkout@v3 - with: - # token: ${{ secrets.ROBOT_TOKEN }} - repository: percona/pmm-qa - ref: ${{ inputs.pmm_qa_branch }} - path: ./pmm-qa - - - name: 'Setup : "${{ inputs.pmm_server_version }}"' - working-directory: pmm-qa/pmm-integration + sudo apt-get install -y jq + + ### pmm-server docker image ### + if [[ -z "${{ env.PMM_SERVER_IMAGE }}" ]]; then + if [[ "${{ inputs.repository }}" = "dev-latest" ]]; then + echo "PMM_SERVER_IMAGE=perconalab/pmm-server:dev-latest" >> $GITHUB_ENV + fi + if [[ "${{ inputs.repository }}" =~ "candidate" ]]; then + rc_latest=$(wget -q "https://registry.hub.docker.com/v2/repositories/perconalab/pmm-client/tags?page_size=25&name=rc" -O - | jq -r .results[].name | grep 2.*.*-rc$ | sort -V | tail -n1) + echo "PMM_SERVER_IMAGE=perconalab/pmm-server:$rc_latest" >> $GITHUB_ENV + fi + if [[ "${{ inputs.repository }}" = "release" ]]; then + r_latest=$(wget -q https://registry.hub.docker.com/v2/repositories/percona/pmm-client/tags -O - | jq -r .results[].name | grep -v latest | sort -V | tail -n1) + echo "PMM_SERVER_IMAGE=percona/pmm-server:$r_latest" >> $GITHUB_ENV + fi + echo "${{ env.PMM_SERVER_IMAGE }}" + fi + + ### pmm2-client repository ### + if [[ "${{ inputs.repository }}" = "dev-latest" ]]; then + echo "REPO=experimental" >> $GITHUB_ENV + fi + if [[ "${{ inputs.repository }}" =~ "candidate" ]]; then + echo "REPO=testing" >> $GITHUB_ENV + fi + if [[ "${{ inputs.repository }}" = "release" ]]; then + echo "REPO=release" >> $GITHUB_ENV + fi + echo "${{ env.REPO }}" + + ### vagrant vm ### + if [[ "${{ inputs.os }}" =~ "buster" ]]; then + echo "VM_BOX=generic/debian10" >> $GITHUB_ENV + fi + if [[ "${{ inputs.os }}" =~ "bullseye" ]]; then + echo "VM_BOX=generic/debian11" >> $GITHUB_ENV + fi + if [[ "${{ inputs.os }}" =~ "bionic" ]]; then + echo "VM_BOX=generic/ubuntu1804" >> $GITHUB_ENV + fi + if [[ "${{ inputs.os }}" =~ "focal" ]]; then + echo "VM_BOX=ubuntu/focal64" >> $GITHUB_ENV + fi + if [[ "${{ inputs.os }}" =~ "jammy" ]]; then + echo "VM_BOX=generic/ubuntu2204" >> $GITHUB_ENV + fi + if [[ "${{ inputs.os }}" =~ "centos-7" ]]; then + echo "VM_BOX=testing" >> $GITHUB_ENV + fi + if [[ "${{ inputs.os }}" =~ "ol-8" ]]; then + echo "VM_BOX=generic/oracle8" >> $GITHUB_ENV + fi + if [[ "${{ inputs.os }}" =~ "ol-9" ]]; then + echo "VM_BOX=generic/oracle9" >> $GITHUB_ENV + fi + + - name: 'Setup : "${{ env.PMM_SERVER_IMAGE }}"' run: | - npm install - sudo npx ts-node ./integration-setup.ts --ci --setup-docker-pmm-server --rbac --pmm-server-docker-tag=${{ env.PMM_SERVER_VERSION }} --pmm-client-version=${{ env.PMM_CLIENT_VERSION }} - timeout 100 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost/ping)" != "200" ]]; do sleep 5; done' || false + docker create -v /srv --name pmm-server-data ${{ env.PMM_SERVER_IMAGE }} + docker run -d -p 80:80 -p 443:443 -p 9000:9000 \ + -e PERCONA_TEST_PLATFORM_ADDRESS=https://check-dev.percona.com:443 \ + -e PERCONA_TEST_PLATFORM_PUBLIC_KEY=RWTg+ZmCCjt7O8eWeAmTLAqW+1ozUbpRSKSwNTmO+exlS5KEIPYWuYdX \ + --volumes-from pmm-server-data --name pmm-server --restart always ${{ env.PMM_SERVER_IMAGE }} - - name: 'Setup ' + - name: "Setup tools" run: | - sudo bash ./pmm-qa/pmm-tests/pmm2-client-setup.sh --pmm_server_ip 127.0.0.1 --client_version ${{ env.PMM_CLIENT_VERSION }} --admin_password admin --use_metrics_mode no - shell: bash + sudo apt-get update + sudo apt-get install -y apt-transport-https ca-certificates dirmngr ansible virtualbox vagrant - - name: Setup Databases for the PMM-Server - working-directory: pmm-qa/pmm-integration - run: | - sudo npx ts-node ./integration-setup.ts --ci \ - ${{ env.PMM_CLIENTS }} - sleep 30 - sudo pmm-admin list - shell: bash - - - name: Execute UI tests - if: ${{ inputs.pmm_test_flag == 'null' }} - id: ui-tests-all - working-directory: pmm-ui-tests/playwright-tests + - name: "Wait for PMM Server to be healthy" run: | - npx playwright test --project="chromium" --quiet -# env: -# NODE_TLS_REJECT_UNAUTHORIZED: 0 - - - name: 'Run UI tests: ${{ env.PMM_TEST_FLAG }}' - if: ${{ inputs.pmm_test_flag != 'null' }} - id: ui-tests-flagged - working-directory: pmm-ui-tests/playwright-tests - run: | - project="${{ contains(env.PMM_TEST_FLAG, 'portal') && 'Portal' || 'Chromium' }}" - npx playwright test --project=$project --grep ${{ env.PMM_TEST_FLAG }} --pass-with-no-tests -# env: -# NODE_TLS_REJECT_UNAUTHORIZED: 0 + timeout 240 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://127.0.0.1/v1/readyz)" != "200" ]]; do sleep 2; done' || false - - name: 'Create report name' - if: failure() + - name: "Create vagrantfile" + working-directory: ~/ run: | - # TODO: add job id for matrix call - job_tag=$(echo "${{ inputs.pmm_test_flag }}" | sed -e "s/-pre-upgrade//" -e "s/@//") - report_name="$job_tag"-report - echo $report_name - echo "REPORT_NAME=$report_name" >> $GITHUB_ENV - - - name: Generate and Attach the report - if: failure() - uses: actions/upload-artifact@v3 - with: - name: ${{ env.REPORT_NAME }} - path: ./pmm-ui-tests/playwright-tests/playwright-report - - - name: Create status check + mkdir -p ~/test-vm/ + cat > ~/test-vm/Vagrantfile <= 1.7.0" + Vagrant.configure(2) do |config| + config.vm.box = "${{ env.VM_BOX}}" + config.ssh.insert_key = false + config.vm.define :CLIENT_TEST do |t| + end + + config.vm.synced_folder "~/package-testing/", "/pmm/package-testing/" + config.vm.provision "shell", privileged: true, inline: <<-SHELL + ## Set environment variables... + export PMM_SERVER_IP=127.0.0.1:443 + export METRICS_MODE=${{ env.METRICS_MODE }} + export PMM_VERSION="${{ env.EXPECTED_VERSION }}" + export install_repo=${{ env.REPO }} + export tarball_link=${{ env.TARBALL }} + + ### rpm + # sudo yum install -y epel-release + # sudo yum -y update + # sudo yum install -y ansible git wget + + sudo apt-get install -y dirmngr gnupg2 + echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main" | sudo tee -a /etc/apt/sources.list > /dev/null + sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367 + sudo apt update -y + sudo apt-get install -y ansible git wget + cd /pmm/package-testing/playbooks + ansible-playbook -vv --connection=local --inventory 127.0.0.1, --limit 127.0.0.1 pmm2-client_integration.yml + SHELL + end + + EOF + + - name: "Run ${{ inputs.test_name }} test on ${{ inputs.os }}" + working-directory: ~/vm-test + run: vagrant up + + - name: "Create status check" uses: percona/gh-action-github-status-action@v1 - if: ${{ env.SHA != 'null' && always() }} + if: ${{ env.SHA != "null" && always() }} continue-on-error: true with: authToken: ${{ secrets.GITHUB_TOKEN }} - context: "${{ env.PMM_TEST_FLAG }} UI tests" + context: "${{ inputs.test_name }} Package test" description: "Test execution ${{ job.status }}" state: ${{ job.status }} repository: ${{ github.repository }} From 709cfc460d679911f93cfa4d531ed482b34fc1f6 Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Thu, 14 Dec 2023 14:39:13 +0100 Subject: [PATCH 02/31] PMM-12770 added missing field --- .github/workflows/pmm-package-test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/pmm-package-test.yml b/.github/workflows/pmm-package-test.yml index e56cf4fb9..0a43ecb0f 100644 --- a/.github/workflows/pmm-package-test.yml +++ b/.github/workflows/pmm-package-test.yml @@ -18,6 +18,10 @@ on: description: "PMM Client tarball link or FB-code" type: string # package_repo: experimental | testing | main | pmm2-client-main + pmm_version: + description: "expected version" + required: false + type: string repository: description: "Select Repo for Client Nodes:" required: true From e83380b4cbca6540028b06e19394e9fbd082b103 Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Thu, 14 Dec 2023 14:42:18 +0100 Subject: [PATCH 03/31] PMM-12770 excluded version getter --- .github/workflows/pmm-package-test.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pmm-package-test.yml b/.github/workflows/pmm-package-test.yml index 0a43ecb0f..8f6da5be8 100644 --- a/.github/workflows/pmm-package-test.yml +++ b/.github/workflows/pmm-package-test.yml @@ -62,11 +62,11 @@ on: - ol-9-x64 jobs: - get_versions: - name: Get versions - uses: Percona-Lab/pmm-submodules/.github/workflows/pmm-version-getter.yml@PMM-2.0 - with: - repository: ${{ inputs.repository || "dev-latest"}} +# get_versions: +# name: Get versions +# uses: Percona-Lab/pmm-submodules/.github/workflows/pmm-version-getter.yml@PMM-2.0 +# with: +# repository: ${{ inputs.repository || "dev-latest"}} test: name: ${{ inputs.test_name }} From 4cc23a0eb7b66c733816b8bacca9cf34a8853dbe Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Thu, 14 Dec 2023 14:44:11 +0100 Subject: [PATCH 04/31] PMM-12770 fixed syntax --- .github/workflows/pmm-package-test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pmm-package-test.yml b/.github/workflows/pmm-package-test.yml index 8f6da5be8..3c4cc8243 100644 --- a/.github/workflows/pmm-package-test.yml +++ b/.github/workflows/pmm-package-test.yml @@ -73,13 +73,13 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 90 env: - SHA: ${{ inputs.sha || "null" }} + SHA: ${{ inputs.sha || 'null' }} PMM_SERVER_IP: 127.0.0.1 ADMIN_PASSWORD: admin - PACKAGE_TESTING_BRANCH: ${{ inputs.package_testing_branch || "master" }} + PACKAGE_TESTING_BRANCH: ${{ inputs.package_testing_branch || 'master' }} PMM_SERVER_IMAGE: ${{ inputs.pmm_server_image }} - TARBALL: ${{ inputs.pmm_server_image || "null" }} + TARBALL: ${{ inputs.pmm_server_image || 'null' }} EXPECTED_VERSION: ${{ inputs.pmm_version }} REPO: ${{ inputs.repository || "dev-latest" }} From ff21d8f1ad8e0a38ffd86f95a7f4d0fc80d4f809 Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Thu, 14 Dec 2023 16:37:09 +0100 Subject: [PATCH 05/31] PMM-12770 fixed syntax --- .github/workflows/pmm-package-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pmm-package-test.yml b/.github/workflows/pmm-package-test.yml index 3c4cc8243..9ddcd0757 100644 --- a/.github/workflows/pmm-package-test.yml +++ b/.github/workflows/pmm-package-test.yml @@ -82,8 +82,8 @@ jobs: TARBALL: ${{ inputs.pmm_server_image || 'null' }} EXPECTED_VERSION: ${{ inputs.pmm_version }} - REPO: ${{ inputs.repository || "dev-latest" }} - METRICS_MODE: ${{ inputs.metrics_mode || "auto" }} + REPO: ${{ inputs.repository || 'dev-latest' }} + METRICS_MODE: ${{ inputs.metrics_mode || 'auto' }} PLAYBOOK: ${{ inputs.playbook }} steps: From be82582dc9a6bd4355980c0ebd1e422dec30f3eb Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Thu, 14 Dec 2023 16:39:15 +0100 Subject: [PATCH 06/31] PMM-12770 fixed syntax --- .github/workflows/pmm-package-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pmm-package-test.yml b/.github/workflows/pmm-package-test.yml index 9ddcd0757..b70640411 100644 --- a/.github/workflows/pmm-package-test.yml +++ b/.github/workflows/pmm-package-test.yml @@ -88,7 +88,7 @@ jobs: steps: - name: "Create status check" - if: ${{ env.SHA != "null" }} + if: ${{ env.SHA != 'null' }} uses: percona/gh-action-github-status-action@v1 continue-on-error: true with: @@ -225,7 +225,7 @@ jobs: - name: "Create status check" uses: percona/gh-action-github-status-action@v1 - if: ${{ env.SHA != "null" && always() }} + if: ${{ env.SHA != 'null' && always() }} continue-on-error: true with: authToken: ${{ secrets.GITHUB_TOKEN }} From b9d28080f126239999049b49fb4fd42c435a74c3 Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Thu, 14 Dec 2023 17:05:49 +0100 Subject: [PATCH 07/31] PMM-12770 work dir fix --- .github/workflows/pmm-package-test.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pmm-package-test.yml b/.github/workflows/pmm-package-test.yml index b70640411..d5f21c9dd 100644 --- a/.github/workflows/pmm-package-test.yml +++ b/.github/workflows/pmm-package-test.yml @@ -104,7 +104,6 @@ jobs: uses: actions/checkout@v3 with: ref: ${{ inputs.package_testing_branch }} - path: ./package-testing - name: 'Convert choices' run: | @@ -182,7 +181,7 @@ jobs: timeout 240 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://127.0.0.1/v1/readyz)" != "200" ]]; do sleep 2; done' || false - name: "Create vagrantfile" - working-directory: ~/ + working-directory: ./ run: | mkdir -p ~/test-vm/ cat > ~/test-vm/Vagrantfile < Date: Thu, 14 Dec 2023 17:57:29 +0100 Subject: [PATCH 08/31] PMM-12770 work dir fix --- .github/workflows/pmm-package-test.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pmm-package-test.yml b/.github/workflows/pmm-package-test.yml index d5f21c9dd..d5485871c 100644 --- a/.github/workflows/pmm-package-test.yml +++ b/.github/workflows/pmm-package-test.yml @@ -192,7 +192,7 @@ jobs: config.vm.define :CLIENT_TEST do |t| end - config.vm.synced_folder "~/package-testing/", "/pmm/package-testing/" + config.vm.synced_folder "/home/runner/work/package-testing/package-testing/", "/pmm/package-testing/" config.vm.provision "shell", privileged: true, inline: <<-SHELL ## Set environment variables... export PMM_SERVER_IP=127.0.0.1:443 @@ -219,8 +219,7 @@ jobs: EOF - name: "Run ${{ inputs.test_name }} test on ${{ inputs.os }}" - working-directory: ./vm-test - run: vagrant up + run: cd ~/vm-test/ && vagrant up - name: "Create status check" uses: percona/gh-action-github-status-action@v1 From b0aaeef99331022709418f71d9dbf0c1d5a9be03 Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Thu, 14 Dec 2023 17:58:20 +0100 Subject: [PATCH 09/31] PMM-12770 work dir fix --- .github/workflows/pmm-package-test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pmm-package-test.yml b/.github/workflows/pmm-package-test.yml index d5485871c..7c996d261 100644 --- a/.github/workflows/pmm-package-test.yml +++ b/.github/workflows/pmm-package-test.yml @@ -183,6 +183,7 @@ jobs: - name: "Create vagrantfile" working-directory: ./ run: | + pwd mkdir -p ~/test-vm/ cat > ~/test-vm/Vagrantfile <= 1.7.0" From a2092ccc53d3bed98ed87b2b2889c29459f2c1ff Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Thu, 14 Dec 2023 18:32:53 +0100 Subject: [PATCH 10/31] PMM-12770 work dir fix --- .github/workflows/pmm-package-test.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pmm-package-test.yml b/.github/workflows/pmm-package-test.yml index 7c996d261..b26339596 100644 --- a/.github/workflows/pmm-package-test.yml +++ b/.github/workflows/pmm-package-test.yml @@ -184,8 +184,9 @@ jobs: working-directory: ./ run: | pwd - mkdir -p ~/test-vm/ - cat > ~/test-vm/Vagrantfile < ~/test-vm/Vagrantfile < Vagrantfile <= 1.7.0" Vagrant.configure(2) do |config| config.vm.box = "${{ env.VM_BOX}}" @@ -220,7 +221,8 @@ jobs: EOF - name: "Run ${{ inputs.test_name }} test on ${{ inputs.os }}" - run: cd ~/vm-test/ && vagrant up + working-directory: ./ + run: vagrant up - name: "Create status check" uses: percona/gh-action-github-status-action@v1 From 0eedcdcfe06375d255056033cf959b7cb0d99fe4 Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Thu, 14 Dec 2023 23:38:35 +0100 Subject: [PATCH 11/31] PMM-12770 server ip fixed --- .github/workflows/pmm-package-test.yml | 40 +++++++++++++++----------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/.github/workflows/pmm-package-test.yml b/.github/workflows/pmm-package-test.yml index b26339596..b3cb9086a 100644 --- a/.github/workflows/pmm-package-test.yml +++ b/.github/workflows/pmm-package-test.yml @@ -62,21 +62,12 @@ on: - ol-9-x64 jobs: -# get_versions: -# name: Get versions -# uses: Percona-Lab/pmm-submodules/.github/workflows/pmm-version-getter.yml@PMM-2.0 -# with: -# repository: ${{ inputs.repository || "dev-latest"}} - test: name: ${{ inputs.test_name }} runs-on: ubuntu-latest timeout-minutes: 90 env: SHA: ${{ inputs.sha || 'null' }} - PMM_SERVER_IP: 127.0.0.1 - ADMIN_PASSWORD: admin - PACKAGE_TESTING_BRANCH: ${{ inputs.package_testing_branch || 'master' }} PMM_SERVER_IMAGE: ${{ inputs.pmm_server_image }} TARBALL: ${{ inputs.pmm_server_image || 'null' }} @@ -107,8 +98,6 @@ jobs: - name: 'Convert choices' run: | - sudo apt-get install -y jq - ### pmm-server docker image ### if [[ -z "${{ env.PMM_SERVER_IMAGE }}" ]]; then if [[ "${{ inputs.repository }}" = "dev-latest" ]]; then @@ -122,8 +111,8 @@ jobs: r_latest=$(wget -q https://registry.hub.docker.com/v2/repositories/percona/pmm-client/tags -O - | jq -r .results[].name | grep -v latest | sort -V | tail -n1) echo "PMM_SERVER_IMAGE=percona/pmm-server:$r_latest" >> $GITHUB_ENV fi - echo "${{ env.PMM_SERVER_IMAGE }}" fi + echo "${{ env.PMM_SERVER_IMAGE }}" ### pmm2-client repository ### if [[ "${{ inputs.repository }}" = "dev-latest" ]]; then @@ -162,19 +151,36 @@ jobs: if [[ "${{ inputs.os }}" =~ "ol-9" ]]; then echo "VM_BOX=generic/oracle9" >> $GITHUB_ENV fi + echo "${{ env.VM_BOX }}" + + ### test name -> playbook map ### + # basic -> pmm2-client.yml + # basic upgrade -> pmm2-client_upgrade.yml + # basic tarball -> pmm2-client_custom_path.yml + + # config -> pmm2-client_integration_auth_config.yml + # register -> pmm2-client_integration_auth_register.yml + # setup -> pmm2-client_integration_auth_setup.yml + # integration tarball -> pmm2-client_integration_custom_path.yml + # integration -> pmm2-client_integration_custom_port.yml + # integration upgrade -> pmm2-client_integration_upgrade_custom_port.yml + + ######### Matrix tests + # integration -> pmm2-client_integration.yml + # integration upgrade -> pmm2-client_integration_upgrade.yml + # tarball upgrade -> pmm2-client_integration_upgrade_custom_path.yml + - - name: 'Setup : "${{ env.PMM_SERVER_IMAGE }}"' + - name: 'Setup "${{ env.PMM_SERVER_IMAGE }}"' run: | docker create -v /srv --name pmm-server-data ${{ env.PMM_SERVER_IMAGE }} docker run -d -p 80:80 -p 443:443 -p 9000:9000 \ - -e PERCONA_TEST_PLATFORM_ADDRESS=https://check-dev.percona.com:443 \ - -e PERCONA_TEST_PLATFORM_PUBLIC_KEY=RWTg+ZmCCjt7O8eWeAmTLAqW+1ozUbpRSKSwNTmO+exlS5KEIPYWuYdX \ --volumes-from pmm-server-data --name pmm-server --restart always ${{ env.PMM_SERVER_IMAGE }} - name: "Setup tools" run: | sudo apt-get update - sudo apt-get install -y apt-transport-https ca-certificates dirmngr ansible virtualbox vagrant + sudo apt-get install -y apt-transport-https ca-certificates ansible virtualbox vagrant - name: "Wait for PMM Server to be healthy" run: | @@ -197,7 +203,7 @@ jobs: config.vm.synced_folder "/home/runner/work/package-testing/package-testing/", "/pmm/package-testing/" config.vm.provision "shell", privileged: true, inline: <<-SHELL ## Set environment variables... - export PMM_SERVER_IP=127.0.0.1:443 + export PMM_SERVER_IP=10.0.2.2:443 export METRICS_MODE=${{ env.METRICS_MODE }} export PMM_VERSION="${{ env.EXPECTED_VERSION }}" export install_repo=${{ env.REPO }} From 11ced07fc243faff8299c0bf32e5cfaa08d9a0f9 Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Fri, 15 Dec 2023 04:20:58 +0100 Subject: [PATCH 12/31] PMM-12770 added single test --- .github/workflows/pmm-package-test-single.yml | 76 ++++++++++++ .github/workflows/pmm-package-test.yml | 109 +++++++++++++----- 2 files changed, 155 insertions(+), 30 deletions(-) create mode 100644 .github/workflows/pmm-package-test-single.yml diff --git a/.github/workflows/pmm-package-test-single.yml b/.github/workflows/pmm-package-test-single.yml new file mode 100644 index 000000000..a23aabaab --- /dev/null +++ b/.github/workflows/pmm-package-test-single.yml @@ -0,0 +1,76 @@ +--- +name: Package Test(single) + +on: + workflow_dispatch: + inputs: + package_testing_branch: + description: 'Target branch for package-testing repository' + type: string + default: 'master' + required: true + playbook: + description: 'Select test to run:' + default: 'pmm2-client_integration' + required: true + type: choice + options: + - pmm2-client_integration + - pmm2-client_integration_upgrade + - pmm2-client_integration_upgrade_custom_path + repository: + description: 'Select Repo for Client:' + required: true + default: 'dev-latest' + type: choice + options: + - release + - release candidate + - patch-release candidate + - dev-latest + metrics_mode: + description: 'Select the Metrics Mode for PMM Client:' + required: true + default: 'auto' + type: choice + options: + - auto + - push + - pull + +jobs: + get_versions: + name: Get versions + uses: Percona-Lab/pmm-submodules/.github/workflows/pmm-version-getter.yml@PMM-2.0 + with: + repository: ${{ inputs.repository || 'dev-latest'}} + + p_test: + name: ${{ inputs.test_name }} + uses: ./.github/workflows/pmm-package-test.yml + secrets: inherit + needs: get_versions + strategy: + fail-fast: false + matrix: + os: ["bionic-x64", + "bullseye-x64", + "buster-x64", + "focal-x64", + "jammy-x64", + "centos-7-x64", + "ol-8-x64", + "ol-9-x64"] + with: + package_testing_branch: ${{ inputs.package_testing_branch || 'master' }} + expected_version: ${{needs.get_versions.outputs.finish_version}} + repository: ${{ inputs.repository || 'dev-latest'}} + metrics_mode: ${{ inputs.metrics_mode || 'auto'}} + playbook: ${{ inputs.playbook || 'pmm2-client_integration'}} + # test_name: + os: ${{ matrix.os }} + + + + + diff --git a/.github/workflows/pmm-package-test.yml b/.github/workflows/pmm-package-test.yml index b3cb9086a..cd83cd5ea 100644 --- a/.github/workflows/pmm-package-test.yml +++ b/.github/workflows/pmm-package-test.yml @@ -10,7 +10,7 @@ on: default: "master" required: true pmm_server_image: - description: "pmm-server docker image, default perconalab/pmm-server:dev-latest" + description: "pmm-server docker image(auto detected if empty)" required: false type: string default: "perconalab/pmm-server:dev-latest" @@ -18,12 +18,13 @@ on: description: "PMM Client tarball link or FB-code" type: string # package_repo: experimental | testing | main | pmm2-client-main - pmm_version: + expected_version: description: "expected version" required: false type: string + # TODO: investigate switch to actual repo name repository: - description: "Select Repo for Client Nodes:" + description: "Select Repo to install PMM Client:" required: true default: "dev-latest" type: choice @@ -41,11 +42,15 @@ on: - auto - push - pull - test_name: - description: "Target branch for package-testing repository" + playbook: + description: "Playbook file to run(without extension)" type: string - default: "integration" + default: "pmm2-client_integration" required: true + test_name: + description: "Optional pretty test name" + type: string + required: false os: description: "Select OS to run test in:" required: true @@ -61,9 +66,45 @@ on: - ol-8-x64 - ol-9-x64 + workflow_call: + inputs: + package_testing_branch: + type: string + default: "master" + required: true + pmm_server_image: + required: false + type: string + pmm_client_tarball: + required: false + type: string + expected_version: + required: false + type: string + repository: + required: true + default: "dev-latest" + type: string + metrics_mode: + required: true + default: "auto" + type: string + playbook: + type: string + default: "pmm2-client_integration" + required: true + test_name: + type: string + required: false + os: + description: "Select OS to run test in:" + required: true + default: "jammy-x64" + type: string + jobs: test: - name: ${{ inputs.test_name }} + name: ${{ inputs.test_name || inputs.playbook}} runs-on: ubuntu-latest timeout-minutes: 90 env: @@ -71,7 +112,7 @@ jobs: PACKAGE_TESTING_BRANCH: ${{ inputs.package_testing_branch || 'master' }} PMM_SERVER_IMAGE: ${{ inputs.pmm_server_image }} TARBALL: ${{ inputs.pmm_server_image || 'null' }} - EXPECTED_VERSION: ${{ inputs.pmm_version }} + EXPECTED_VERSION: ${{ inputs.expected_version }} REPO: ${{ inputs.repository || 'dev-latest' }} METRICS_MODE: ${{ inputs.metrics_mode || 'auto' }} @@ -143,7 +184,7 @@ jobs: echo "VM_BOX=generic/ubuntu2204" >> $GITHUB_ENV fi if [[ "${{ inputs.os }}" =~ "centos-7" ]]; then - echo "VM_BOX=testing" >> $GITHUB_ENV + echo "VM_BOX=generic/centos7" >> $GITHUB_ENV fi if [[ "${{ inputs.os }}" =~ "ol-8" ]]; then echo "VM_BOX=generic/oracle8" >> $GITHUB_ENV @@ -158,17 +199,17 @@ jobs: # basic upgrade -> pmm2-client_upgrade.yml # basic tarball -> pmm2-client_custom_path.yml - # config -> pmm2-client_integration_auth_config.yml - # register -> pmm2-client_integration_auth_register.yml - # setup -> pmm2-client_integration_auth_setup.yml - # integration tarball -> pmm2-client_integration_custom_path.yml - # integration -> pmm2-client_integration_custom_port.yml - # integration upgrade -> pmm2-client_integration_upgrade_custom_port.yml + # config password -> pmm2-client_integration_auth_config.yml + # register password -> pmm2-client_integration_auth_register.yml + # tarball setup password -> pmm2-client_integration_auth_setup.yml + # tarball path -> pmm2-client_integration_custom_path.yml + # tarball port -> pmm2-client_integration_custom_port.yml + # integration upgrade port -> pmm2-client_integration_upgrade_custom_port.yml ######### Matrix tests - # integration -> pmm2-client_integration.yml - # integration upgrade -> pmm2-client_integration_upgrade.yml - # tarball upgrade -> pmm2-client_integration_upgrade_custom_path.yml + # integration -> pmm2-client_integration.yml + # integration upgrade -> pmm2-client_integration_upgrade.yml + # tarball upgrade path -> pmm2-client_integration_upgrade_custom_path.yml - name: 'Setup "${{ env.PMM_SERVER_IMAGE }}"' @@ -195,7 +236,7 @@ jobs: cat > Vagrantfile <= 1.7.0" Vagrant.configure(2) do |config| - config.vm.box = "${{ env.VM_BOX}}" + config.vm.box = "${{ env.VM_BOX }}" config.ssh.insert_key = false config.vm.define :CLIENT_TEST do |t| end @@ -209,18 +250,26 @@ jobs: export install_repo=${{ env.REPO }} export tarball_link=${{ env.TARBALL }} - ### rpm - # sudo yum install -y epel-release - # sudo yum -y update - # sudo yum install -y ansible git wget - - sudo apt-get install -y dirmngr gnupg2 - echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main" | sudo tee -a /etc/apt/sources.list > /dev/null - sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367 - sudo apt update -y - sudo apt-get install -y ansible git wget + if [[ "${{ env.VM_BOX }}" =~ "centos" || "${{ env.VM_BOX }}" =~ "oracle" ]]; then + sudo yum install -y epel-release + sudo yum -y update + sudo yum install -y ansible git wget + fi + if [[ "${{ env.VM_BOX }}" =~ "debian" ]]; then + sudo apt-get install -y dirmngr gnupg2 + echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main" | sudo tee -a /etc/apt/sources.list > /dev/null + sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367 + sudo apt update -y + sudo apt-get install -y ansible git wget + fi + if [[ "${{ env.VM_BOX }}" =~ "ubuntu" ]]; then + sudo apt update -y + sudo apt install -y software-properties-common + sudo apt-add-repository --yes --update ppa:ansible/ansible + sudo apt-get install -y ansible git wget + fi cd /pmm/package-testing/playbooks - ansible-playbook -vv --connection=local --inventory 127.0.0.1, --limit 127.0.0.1 pmm2-client_integration.yml + ansible-playbook --connection=local --inventory 127.0.0.1, --limit 127.0.0.1 ${{ env.PLAYBOOK }}.yml SHELL end From 7a59aa6d1fdb8c4e55fc0f04ad13d86a46e5a66b Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Fri, 15 Dec 2023 04:23:46 +0100 Subject: [PATCH 13/31] PMM-12770 added single run --- .github/workflows/pmm-package-test-single.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pmm-package-test-single.yml b/.github/workflows/pmm-package-test-single.yml index a23aabaab..c04618ce9 100644 --- a/.github/workflows/pmm-package-test-single.yml +++ b/.github/workflows/pmm-package-test-single.yml @@ -37,6 +37,9 @@ on: - auto - push - pull + push: + branches: + - PMM-12770-gh-action jobs: get_versions: From ceca6749454dc5e17457c13ee31a52268f6a08a8 Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Fri, 15 Dec 2023 04:25:01 +0100 Subject: [PATCH 14/31] PMM-12770 fixing getter --- .github/workflows/pmm-package-test-single.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pmm-package-test-single.yml b/.github/workflows/pmm-package-test-single.yml index c04618ce9..1d235ae9f 100644 --- a/.github/workflows/pmm-package-test-single.yml +++ b/.github/workflows/pmm-package-test-single.yml @@ -44,7 +44,7 @@ on: jobs: get_versions: name: Get versions - uses: Percona-Lab/pmm-submodules/.github/workflows/pmm-version-getter.yml@PMM-2.0 + uses: Percona-Lab/pmm-submodules/.github/workflows/pmm-version-getter.yml with: repository: ${{ inputs.repository || 'dev-latest'}} From 3c06d4e21f898769f3c96581e6b3b631f9ce9c11 Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Fri, 15 Dec 2023 04:29:53 +0100 Subject: [PATCH 15/31] PMM-12770 fixing getter --- .github/workflows/pmm-package-test-single.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pmm-package-test-single.yml b/.github/workflows/pmm-package-test-single.yml index 1d235ae9f..287052168 100644 --- a/.github/workflows/pmm-package-test-single.yml +++ b/.github/workflows/pmm-package-test-single.yml @@ -44,7 +44,7 @@ on: jobs: get_versions: name: Get versions - uses: Percona-Lab/pmm-submodules/.github/workflows/pmm-version-getter.yml + uses: percona/pmm-ui-tests/.github/workflows/pmm-version-getter.yml@main with: repository: ${{ inputs.repository || 'dev-latest'}} From 206ee9c2f7cfd5c23d1fc00b765f7d914a577c6f Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Mon, 25 Dec 2023 02:06:12 +0100 Subject: [PATCH 16/31] PMM-12770 try new grouping --- .github/workflows/pmm-package-test-single.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pmm-package-test-single.yml b/.github/workflows/pmm-package-test-single.yml index 287052168..fcf9f631c 100644 --- a/.github/workflows/pmm-package-test-single.yml +++ b/.github/workflows/pmm-package-test-single.yml @@ -56,6 +56,7 @@ jobs: strategy: fail-fast: false matrix: + playbook: ["pmm2-client_integration"] os: ["bionic-x64", "bullseye-x64", "buster-x64", @@ -67,13 +68,8 @@ jobs: with: package_testing_branch: ${{ inputs.package_testing_branch || 'master' }} expected_version: ${{needs.get_versions.outputs.finish_version}} - repository: ${{ inputs.repository || 'dev-latest'}} + repository: ${{ inputs.repository || 'release'}} metrics_mode: ${{ inputs.metrics_mode || 'auto'}} - playbook: ${{ inputs.playbook || 'pmm2-client_integration'}} + playbook: ${{ matrix.playbook }} # test_name: os: ${{ matrix.os }} - - - - - From bc6ca0ae66c6736551372a6d5106e74b6d8ae643 Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Mon, 25 Dec 2023 02:09:53 +0100 Subject: [PATCH 17/31] PMM-12770 try new grouping 1 --- .github/workflows/pmm-package-test-single.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pmm-package-test-single.yml b/.github/workflows/pmm-package-test-single.yml index fcf9f631c..4d585fb20 100644 --- a/.github/workflows/pmm-package-test-single.yml +++ b/.github/workflows/pmm-package-test-single.yml @@ -49,14 +49,14 @@ jobs: repository: ${{ inputs.repository || 'dev-latest'}} p_test: - name: ${{ inputs.test_name }} + name: ${{ inputs.test_name || 'pmm2-client_integration' }} uses: ./.github/workflows/pmm-package-test.yml secrets: inherit needs: get_versions strategy: fail-fast: false matrix: - playbook: ["pmm2-client_integration"] + os: ["bionic-x64", "bullseye-x64", "buster-x64", @@ -70,6 +70,6 @@ jobs: expected_version: ${{needs.get_versions.outputs.finish_version}} repository: ${{ inputs.repository || 'release'}} metrics_mode: ${{ inputs.metrics_mode || 'auto'}} - playbook: ${{ matrix.playbook }} - # test_name: + playbook: ${{ inputs.playbook || 'pmm2-client_integration' }} +# test_name: ${{ matrix.os }} os: ${{ matrix.os }} From 204acf002fc8a653684f19709dc694e7f14ef2fa Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Mon, 25 Dec 2023 02:10:09 +0100 Subject: [PATCH 18/31] PMM-12770 try new grouping 2 --- .github/workflows/pmm-package-test-single.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pmm-package-test-single.yml b/.github/workflows/pmm-package-test-single.yml index 4d585fb20..0d55c2130 100644 --- a/.github/workflows/pmm-package-test-single.yml +++ b/.github/workflows/pmm-package-test-single.yml @@ -71,5 +71,5 @@ jobs: repository: ${{ inputs.repository || 'release'}} metrics_mode: ${{ inputs.metrics_mode || 'auto'}} playbook: ${{ inputs.playbook || 'pmm2-client_integration' }} -# test_name: ${{ matrix.os }} + test_name: ${{ matrix.os }} os: ${{ matrix.os }} From 65ec54460cd5636f95d7ee5d25d52c270cb29a4a Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Tue, 26 Dec 2023 01:02:47 +0100 Subject: [PATCH 19/31] PMM-12770 switched to rel --- .github/workflows/pmm-package-test-single.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pmm-package-test-single.yml b/.github/workflows/pmm-package-test-single.yml index 0d55c2130..58bce12f4 100644 --- a/.github/workflows/pmm-package-test-single.yml +++ b/.github/workflows/pmm-package-test-single.yml @@ -46,7 +46,7 @@ jobs: name: Get versions uses: percona/pmm-ui-tests/.github/workflows/pmm-version-getter.yml@main with: - repository: ${{ inputs.repository || 'dev-latest'}} + repository: ${{ inputs.repository || 'release'}} p_test: name: ${{ inputs.test_name || 'pmm2-client_integration' }} From f1d474e6402b9839e9cfc016f1bd144eabc92d29 Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Tue, 26 Dec 2023 02:20:37 +0100 Subject: [PATCH 20/31] PMM-12770 buster mount fix --- .github/workflows/pmm-package-test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/pmm-package-test.yml b/.github/workflows/pmm-package-test.yml index cd83cd5ea..75feb8ddf 100644 --- a/.github/workflows/pmm-package-test.yml +++ b/.github/workflows/pmm-package-test.yml @@ -222,6 +222,9 @@ jobs: run: | sudo apt-get update sudo apt-get install -y apt-transport-https ca-certificates ansible virtualbox vagrant + if [[ "${{ inputs.os }}" =~ "buster" ]]; then + vagrant plugin install vagrant-vbguest + fi - name: "Wait for PMM Server to be healthy" run: | @@ -237,6 +240,7 @@ jobs: Vagrant.require_version ">= 1.7.0" Vagrant.configure(2) do |config| config.vm.box = "${{ env.VM_BOX }}" + ${{ contains(env.VM_BOX, 'debian10') && 'config.vbguest.auto_update = true' }} config.ssh.insert_key = false config.vm.define :CLIENT_TEST do |t| end From e24ccac9f7d38bcaca6bf178a7bc54556c9ab70f Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Tue, 26 Dec 2023 11:47:28 +0100 Subject: [PATCH 21/31] PMM-12770 ol-9 fix --- .github/workflows/pmm-package-test.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pmm-package-test.yml b/.github/workflows/pmm-package-test.yml index 75feb8ddf..dfa6f11ef 100644 --- a/.github/workflows/pmm-package-test.yml +++ b/.github/workflows/pmm-package-test.yml @@ -257,7 +257,8 @@ jobs: if [[ "${{ env.VM_BOX }}" =~ "centos" || "${{ env.VM_BOX }}" =~ "oracle" ]]; then sudo yum install -y epel-release sudo yum -y update - sudo yum install -y ansible git wget + # sudo yum install -y ansible git wget + sudo yum install -y ansible-core git wget fi if [[ "${{ env.VM_BOX }}" =~ "debian" ]]; then sudo apt-get install -y dirmngr gnupg2 @@ -273,7 +274,7 @@ jobs: sudo apt-get install -y ansible git wget fi cd /pmm/package-testing/playbooks - ansible-playbook --connection=local --inventory 127.0.0.1, --limit 127.0.0.1 ${{ env.PLAYBOOK }}.yml + ansible-playbook -vv --connection=local --inventory 127.0.0.1, --limit 127.0.0.1 ${{ env.PLAYBOOK }}.yml SHELL end From a0b5a22ce0dd35c6628baf05f2c3d20fd7e29762 Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Tue, 26 Dec 2023 13:45:20 +0100 Subject: [PATCH 22/31] PMM-12770 centos fix --- .github/workflows/pmm-package-test.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pmm-package-test.yml b/.github/workflows/pmm-package-test.yml index dfa6f11ef..379187501 100644 --- a/.github/workflows/pmm-package-test.yml +++ b/.github/workflows/pmm-package-test.yml @@ -254,10 +254,14 @@ jobs: export install_repo=${{ env.REPO }} export tarball_link=${{ env.TARBALL }} - if [[ "${{ env.VM_BOX }}" =~ "centos" || "${{ env.VM_BOX }}" =~ "oracle" ]]; then + if [[ "${{ env.VM_BOX }}" =~ "centos7" ]]; then + sudo yum install -y epel-release + sudo yum -y update + sudo yum install -y ansible git wget + fi + if [[ "${{ env.VM_BOX }}" =~ "oracle" ]]; then sudo yum install -y epel-release sudo yum -y update - # sudo yum install -y ansible git wget sudo yum install -y ansible-core git wget fi if [[ "${{ env.VM_BOX }}" =~ "debian" ]]; then From 4773e4e81134c2478bf375ebec398bf1b0c24555 Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Wed, 27 Dec 2023 01:49:26 +0100 Subject: [PATCH 23/31] PMM-12770 added matrix --- .../pmm-package-test-matrix-full.yml | 340 ++++++++++++++++++ .github/workflows/pmm-package-test-matrix.yml | 127 +++++++ .github/workflows/pmm-package-test-single.yml | 1 - Vagrantfile.template.pmm2-rpm | 4 +- playbooks/pmm2-client_custom_path.yml | 12 +- .../pmm2-client_integration_custom_path.yml | 15 +- scripts/pmm2_client_custom_path.sh | 71 ---- 7 files changed, 491 insertions(+), 79 deletions(-) create mode 100644 .github/workflows/pmm-package-test-matrix-full.yml create mode 100644 .github/workflows/pmm-package-test-matrix.yml delete mode 100755 scripts/pmm2_client_custom_path.sh diff --git a/.github/workflows/pmm-package-test-matrix-full.yml b/.github/workflows/pmm-package-test-matrix-full.yml new file mode 100644 index 000000000..a82feacc9 --- /dev/null +++ b/.github/workflows/pmm-package-test-matrix-full.yml @@ -0,0 +1,340 @@ +--- +name: Package Test Matrix + +on: + workflow_dispatch: + inputs: + package_testing_branch: + description: 'Target branch for package-testing repository' + type: string + default: 'master' + required: true + repository: + description: 'Select Repo for Client:' + required: true + default: 'dev-latest' + type: choice + options: + - release + - release candidate + - patch-release candidate + - dev-latest + metrics_mode: + description: 'Select the Metrics Mode for PMM Client:' + required: true + default: 'auto' + type: choice + options: + - auto + - push + - pull + push: + branches: + - PMM-12770-gh-action + +jobs: + get_versions: + name: Get versions + uses: percona/pmm-ui-tests/.github/workflows/pmm-version-getter.yml@main + with: + repository: ${{ inputs.repository || 'release'}} + + c_test: + name: "pmm2-client" + uses: ./.github/workflows/pmm-package-test.yml + secrets: inherit + needs: get_versions + strategy: + fail-fast: false + matrix: + os: ["bionic-x64", + "bullseye-x64", + "buster-x64", + "focal-x64", + "jammy-x64", + "centos-7-x64", + "ol-8-x64", + "ol-9-x64"] + with: + package_testing_branch: ${{ inputs.package_testing_branch || 'master' }} + expected_version: ${{needs.get_versions.outputs.finish_version}} + repository: ${{ inputs.repository || 'release'}} + metrics_mode: ${{ inputs.metrics_mode || 'auto'}} + playbook: "pmm2-client_integration" + test_name: ${{ matrix.os }} + os: ${{ matrix.os }} + + cu_test: + name: "pmm2-client_upgrade" + uses: ./.github/workflows/pmm-package-test.yml + secrets: inherit + needs: get_versions + strategy: + fail-fast: false + matrix: + os: ["bionic-x64", + "bullseye-x64", + "buster-x64", + "focal-x64", + "jammy-x64", + "centos-7-x64", + "ol-8-x64", + "ol-9-x64"] + with: + package_testing_branch: ${{ inputs.package_testing_branch || 'master' }} + expected_version: ${{needs.get_versions.outputs.finish_version}} + repository: ${{ inputs.repository || 'release'}} + metrics_mode: ${{ inputs.metrics_mode || 'auto'}} + playbook: "pmm2-client_upgrade" + test_name: ${{ matrix.os }} + os: ${{ matrix.os }} + + tb_test: + name: "pmm2-client_custom_path" + uses: ./.github/workflows/pmm-package-test.yml + secrets: inherit + needs: get_versions + strategy: + fail-fast: false + matrix: + os: ["bionic-x64", + "bullseye-x64", + "buster-x64", + "focal-x64", + "jammy-x64", + "centos-7-x64", + "ol-8-x64", + "ol-9-x64"] + with: + package_testing_branch: ${{ inputs.package_testing_branch || 'master' }} + expected_version: ${{needs.get_versions.outputs.finish_version}} + repository: ${{ inputs.repository || 'release'}} + metrics_mode: ${{ inputs.metrics_mode || 'auto'}} + playbook: "pmm2-client_custom_path" + test_name: ${{ matrix.os }} + os: ${{ matrix.os }} + + auth_config_test: + name: "pmm2-client_integration_auth_config" + uses: ./.github/workflows/pmm-package-test.yml + secrets: inherit + needs: get_versions + strategy: + fail-fast: false + matrix: + os: ["bionic-x64", + "bullseye-x64", + "buster-x64", + "focal-x64", + "jammy-x64", + "centos-7-x64", + "ol-8-x64", + "ol-9-x64"] + with: + package_testing_branch: ${{ inputs.package_testing_branch || 'master' }} + expected_version: ${{needs.get_versions.outputs.finish_version}} + repository: ${{ inputs.repository || 'release'}} + metrics_mode: ${{ inputs.metrics_mode || 'auto'}} + playbook: "pmm2-client_integration_auth_config" + test_name: ${{ matrix.os }} + os: ${{ matrix.os }} + + auth_register_test: + name: "pmm2-client_integration_auth_register" + uses: ./.github/workflows/pmm-package-test.yml + secrets: inherit + needs: get_versions + strategy: + fail-fast: false + matrix: + os: ["bionic-x64", + "bullseye-x64", + "buster-x64", + "focal-x64", + "jammy-x64", + "centos-7-x64", + "ol-8-x64", + "ol-9-x64"] + with: + package_testing_branch: ${{ inputs.package_testing_branch || 'master' }} + expected_version: ${{needs.get_versions.outputs.finish_version}} + repository: ${{ inputs.repository || 'release'}} + metrics_mode: ${{ inputs.metrics_mode || 'auto'}} + playbook: "pmm2-client_integration_auth_register" + test_name: ${{ matrix.os }} + os: ${{ matrix.os }} + + auth_setup_test: + name: "pmm2-client_integration_auth_setup" + uses: ./.github/workflows/pmm-package-test.yml + secrets: inherit + needs: get_versions + strategy: + fail-fast: false + matrix: + os: ["bionic-x64", + "bullseye-x64", + "buster-x64", + "focal-x64", + "jammy-x64", + "centos-7-x64", + "ol-8-x64", + "ol-9-x64"] + with: + package_testing_branch: ${{ inputs.package_testing_branch || 'master' }} + expected_version: ${{needs.get_versions.outputs.finish_version}} + repository: ${{ inputs.repository || 'release'}} + metrics_mode: ${{ inputs.metrics_mode || 'auto'}} + playbook: "pmm2-client_integration_auth_setup" + test_name: ${{ matrix.os }} + os: ${{ matrix.os }} + + tbi_test: + name: "pmm2-client_integration_custom_path" + uses: ./.github/workflows/pmm-package-test.yml + secrets: inherit + needs: get_versions + strategy: + fail-fast: false + matrix: + os: ["bionic-x64", + "bullseye-x64", + "buster-x64", + "focal-x64", + "jammy-x64", + "centos-7-x64", + "ol-8-x64", + "ol-9-x64"] + with: + package_testing_branch: ${{ inputs.package_testing_branch || 'master' }} + expected_version: ${{needs.get_versions.outputs.finish_version}} + repository: ${{ inputs.repository || 'release'}} + metrics_mode: ${{ inputs.metrics_mode || 'auto'}} + playbook: "pmm2-client_integration_custom_path" + test_name: ${{ matrix.os }} + os: ${{ matrix.os }} + + port_test: + name: "pmm2-client_integration_custom_port" + uses: ./.github/workflows/pmm-package-test.yml + secrets: inherit + needs: get_versions + strategy: + fail-fast: false + matrix: + os: ["bionic-x64", + "bullseye-x64", + "buster-x64", + "focal-x64", + "jammy-x64", + "centos-7-x64", + "ol-8-x64", + "ol-9-x64"] + with: + package_testing_branch: ${{ inputs.package_testing_branch || 'master' }} + expected_version: ${{needs.get_versions.outputs.finish_version}} + repository: ${{ inputs.repository || 'release'}} + metrics_mode: ${{ inputs.metrics_mode || 'auto'}} + playbook: "pmm2-client_integration_custom_port" + test_name: ${{ matrix.os }} + os: ${{ matrix.os }} + + port_u_test: + name: "pmm2-client_integration_upgrade_custom_port" + uses: ./.github/workflows/pmm-package-test.yml + secrets: inherit + needs: get_versions + strategy: + fail-fast: false + matrix: + os: ["bionic-x64", + "bullseye-x64", + "buster-x64", + "focal-x64", + "jammy-x64", + "centos-7-x64", + "ol-8-x64", + "ol-9-x64"] + with: + package_testing_branch: ${{ inputs.package_testing_branch || 'master' }} + expected_version: ${{needs.get_versions.outputs.finish_version}} + repository: ${{ inputs.repository || 'release'}} + metrics_mode: ${{ inputs.metrics_mode || 'auto'}} + playbook: "pmm2-client_integration_upgrade_custom_port" + test_name: ${{ matrix.os }} + os: ${{ matrix.os }} + + i_test: + name: "pmm2-client_integration" + uses: ./.github/workflows/pmm-package-test.yml + secrets: inherit + needs: get_versions + strategy: + fail-fast: false + matrix: + os: ["bionic-x64", + "bullseye-x64", + "buster-x64", + "focal-x64", + "jammy-x64", + "centos-7-x64", + "ol-8-x64", + "ol-9-x64"] + with: + package_testing_branch: ${{ inputs.package_testing_branch || 'master' }} + expected_version: ${{needs.get_versions.outputs.finish_version}} + repository: ${{ inputs.repository || 'release'}} + metrics_mode: ${{ inputs.metrics_mode || 'auto'}} + playbook: "pmm2-client_integration" + test_name: ${{ matrix.os }} + os: ${{ matrix.os }} + + iu_test: + name: "pmm2-client_integration_upgrade" + uses: ./.github/workflows/pmm-package-test.yml + secrets: inherit + needs: get_versions + strategy: + fail-fast: false + matrix: + os: ["bionic-x64", + "bullseye-x64", + "buster-x64", + "focal-x64", + "jammy-x64", + "centos-7-x64", + "ol-8-x64", + "ol-9-x64"] + with: + package_testing_branch: ${{ inputs.package_testing_branch || 'master' }} + expected_version: ${{needs.get_versions.outputs.finish_version}} + repository: ${{ inputs.repository || 'release'}} + metrics_mode: ${{ inputs.metrics_mode || 'auto'}} + playbook: "pmm2-client_integration_upgrade" + test_name: ${{ matrix.os }} + os: ${{ matrix.os }} + + tu_test: + name: "pmm2-client_integration_upgrade_custom_path" + uses: ./.github/workflows/pmm-package-test.yml + secrets: inherit + needs: get_versions + strategy: + fail-fast: false + matrix: + os: ["bionic-x64", + "bullseye-x64", + "buster-x64", + "focal-x64", + "jammy-x64", + "centos-7-x64", + "ol-8-x64", + "ol-9-x64"] + with: + package_testing_branch: ${{ inputs.package_testing_branch || 'master' }} + expected_version: ${{needs.get_versions.outputs.finish_version}} + repository: ${{ inputs.repository || 'release'}} + metrics_mode: ${{ inputs.metrics_mode || 'auto'}} + playbook: "pmm2-client_integration_upgrade_custom_path" + test_name: ${{ matrix.os }} + os: ${{ matrix.os }} diff --git a/.github/workflows/pmm-package-test-matrix.yml b/.github/workflows/pmm-package-test-matrix.yml new file mode 100644 index 000000000..746bf6c9b --- /dev/null +++ b/.github/workflows/pmm-package-test-matrix.yml @@ -0,0 +1,127 @@ +--- +name: Package Test Matrix + +on: + workflow_dispatch: + inputs: + package_testing_branch: + description: 'Target branch for package-testing repository' + type: string + default: 'master' + required: true + repository: + description: 'Select Repo for Client:' + required: true + default: 'dev-latest' + type: choice + options: + - release + - release candidate + - patch-release candidate + - dev-latest + metrics_mode: + description: 'Select the Metrics Mode for PMM Client:' + required: true + default: 'auto' + type: choice + options: + - auto + - push + - pull + push: + branches: + - PMM-12770-gh-action + +jobs: + get_versions: + name: Get versions + uses: percona/pmm-ui-tests/.github/workflows/pmm-version-getter.yml@main + with: + repository: ${{ inputs.repository || 'release'}} + + + playbook: + description: 'Select test to run:' + default: 'pmm2-client_integration' + required: true + type: choice + options: + - pmm2-client_integration + + + + + i_test: + name: "pmm2-client_integration" + uses: ./.github/workflows/pmm-package-test.yml + secrets: inherit + needs: get_versions + strategy: + fail-fast: false + matrix: + os: ["bionic-x64", + "bullseye-x64", + "buster-x64", + "focal-x64", + "jammy-x64", + "centos-7-x64", + "ol-8-x64", + "ol-9-x64"] + with: + package_testing_branch: ${{ inputs.package_testing_branch || 'master' }} + expected_version: ${{needs.get_versions.outputs.finish_version}} + repository: ${{ inputs.repository || 'release'}} + metrics_mode: ${{ inputs.metrics_mode || 'auto'}} + playbook: "pmm2-client_integration" + test_name: ${{ matrix.os }} + os: ${{ matrix.os }} + + u_test: + name: "pmm2-client_integration_upgrade" + uses: ./.github/workflows/pmm-package-test.yml + secrets: inherit + needs: get_versions + strategy: + fail-fast: false + matrix: + os: ["bionic-x64", + "bullseye-x64", + "buster-x64", + "focal-x64", + "jammy-x64", + "centos-7-x64", + "ol-8-x64", + "ol-9-x64"] + with: + package_testing_branch: ${{ inputs.package_testing_branch || 'master' }} + expected_version: ${{needs.get_versions.outputs.finish_version}} + repository: ${{ inputs.repository || 'release'}} + metrics_mode: ${{ inputs.metrics_mode || 'auto'}} + playbook: "pmm2-client_integration_upgrade" + test_name: ${{ matrix.os }} + os: ${{ matrix.os }} + + t_test: + name: "pmm2-client_integration_upgrade_custom_path" + uses: ./.github/workflows/pmm-package-test.yml + secrets: inherit + needs: get_versions + strategy: + fail-fast: false + matrix: + os: ["bionic-x64", + "bullseye-x64", + "buster-x64", + "focal-x64", + "jammy-x64", + "centos-7-x64", + "ol-8-x64", + "ol-9-x64"] + with: + package_testing_branch: ${{ inputs.package_testing_branch || 'master' }} + expected_version: ${{needs.get_versions.outputs.finish_version}} + repository: ${{ inputs.repository || 'release'}} + metrics_mode: ${{ inputs.metrics_mode || 'auto'}} + playbook: "pmm2-client_integration_upgrade_custom_path" + test_name: ${{ matrix.os }} + os: ${{ matrix.os }} \ No newline at end of file diff --git a/.github/workflows/pmm-package-test-single.yml b/.github/workflows/pmm-package-test-single.yml index 58bce12f4..a596b06b1 100644 --- a/.github/workflows/pmm-package-test-single.yml +++ b/.github/workflows/pmm-package-test-single.yml @@ -56,7 +56,6 @@ jobs: strategy: fail-fast: false matrix: - os: ["bionic-x64", "bullseye-x64", "buster-x64", diff --git a/Vagrantfile.template.pmm2-rpm b/Vagrantfile.template.pmm2-rpm index 06a7575cf..96de1a7de 100644 --- a/Vagrantfile.template.pmm2-rpm +++ b/Vagrantfile.template.pmm2-rpm @@ -32,7 +32,9 @@ Vagrant.configure(2) do |config| sudo yum install -y epel-release sudo yum -y update - sudo yum install -y ansible git wget + sudo yum install -y ansible-core git wget + ### for Centos 7 + # sudo yum install -y ansible git wget cd /pmm/package-testing # ansible-playbook -vv --connection=local --inventory 127.0.0.1, --limit 127.0.0.1 playbooks/pmm2-client.yml diff --git a/playbooks/pmm2-client_custom_path.yml b/playbooks/pmm2-client_custom_path.yml index 7b63edffe..3499e8ff8 100644 --- a/playbooks/pmm2-client_custom_path.yml +++ b/playbooks/pmm2-client_custom_path.yml @@ -71,16 +71,18 @@ delay: 5 retries: 5 + - name: Grep PMM Client tempdir path from config + shell: cat {{ custom_path }}/config/pmm-agent.yaml | awk '/tempdir/ {print $NF}' + register: tmp_path + become: yes + - name: PMM-8141 fix for deleted vmscrpconfig file, file being created with vmagent reload - command: "{{item}}" - with_items: - - "rm -r /tmp/vm_agent" - - "pkill -f vmagent" + command: "rm -r {{ tmp_path.stdout }}/vm_agent && pkill -f vmagent" become: yes - name: PMM-8141 verify new vmscrpconfig folder is created at tmp after killing vmagent process - command: "ls -la /tmp/vm_agent" + command: "ls -la {{ tmp_path.stdout }}/vm_agent" register: vm_agent_folder_ls become: yes until: vm_agent_folder_ls.stdout != "" diff --git a/playbooks/pmm2-client_integration_custom_path.yml b/playbooks/pmm2-client_integration_custom_path.yml index 8bf155cae..2f22757f0 100644 --- a/playbooks/pmm2-client_integration_custom_path.yml +++ b/playbooks/pmm2-client_integration_custom_path.yml @@ -15,6 +15,7 @@ pmm_version: "{{ lookup('env', 'PMM_VERSION') }}" pmm_repo: "{{ lookup('env', 'install_repo') }}" custom_path: "/pmm2-client-custom-path" + feature_build: "{{ lookup('env', 'feature_build') }}" tasks: - name: Register Instance IP @@ -25,12 +26,24 @@ set_fact: instance_ip: "{{ instance_ip.stdout }}" + - name: Set Integrations list + set_fact: + enabled_db: "{{ db_list|select|list }}" + vars: + db_list: + - "{{ (false) | ternary('ps-8.0','') }}" + - "{{ (ansible_os_family == 'RedHat' and ansible_distribution_major_version < '9') | ternary('ps-5.7','') }}" + - "{{ (ansible_os_family == 'Debian') | ternary('ps-5.7','') }}" + - psmdb-6.0 + - "{{ (ansible_os_family == 'Debian') | ternary('pg-13','') }}" + - "{{ (ansible_os_family == 'RedHat' and ansible_distribution_major_version < '8') | ternary('pg-13','') }}" + - name: include tasks for test env setup include_tasks: ../tasks/pmm2_client_test_prepare.yml ### install PMM Client from tarball - name: install pmm2-client tarball to custom path - command: "../scripts/pmm2_client_install_tarball.sh -v {{ pmm_version }} -p {{ custom_path }}" + command: "../scripts/pmm2_client_install_tarball.sh -v {{ (feature_build is defined) | ternary(feature_build, pmm_version) }} -p {{ custom_path }}" - name: check that PMM client version is correct include_tasks: ../tasks/verify_pmm_client_version.yml diff --git a/scripts/pmm2_client_custom_path.sh b/scripts/pmm2_client_custom_path.sh deleted file mode 100755 index d19d6ec67..000000000 --- a/scripts/pmm2_client_custom_path.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/bash - -while [ $# -gt 0 ]; do - - if [[ $1 == *"--"* ]]; then - param="${1/--/}" - declare $param="$2" - fi - - shift -done - -############################################################ -# Help # -############################################################ -Help() -{ - echo "Custom PMM 2 Client installation script." - echo - echo "Syntax: scriptTemplate [-h|l|p]" - echo "options:" - echo "h Print this Help." - echo "l listening custom port mode. Sets default version to 2.27.0" - echo "p Installation path. Default: /pmm2-client-custom-path" - echo -} - -if [ -z "$version" ]; then - export version=${PMM_VERSION:-2.27.0} -fi - -### Variables -custom_path=/pmm2-client-custom-path - -############################################################ -# Process the input options. # -############################################################ -while getopts ":hlp:" option; do - case $option in - h) # display Help - Help - exit 0 - ;; - l) # listening custom port starts from 2.27 - if [ -z "$version" ]; then - export version=${PMM_VERSION:-2.27.0} - fi - ;; - p) # Enter a custom path - path=$OPTARG - ;; - \?) # Invalid option - echo "Error: Invalid option" - exit 1 - ;; - esac -done - - -### Main program -wget https://downloads.percona.com/downloads/TESTING/pmm/pmm2-client-${version}.tar.gz -tar -xvf pmm2-client-${version}.tar.gz -pushd / -mkdir -p ${custom_path} -pushd ${custom_path} -export PMM_DIR=$(pwd) -popd -popd -mv pmm2-client-${version} pmm2-client -cd pmm2-client -./install_tarball From f47d4f4d6f53b041befe0dd891d5c35619ab15f5 Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Wed, 27 Dec 2023 01:50:59 +0100 Subject: [PATCH 24/31] PMM-12770 fixed name --- .github/workflows/pmm-package-test-matrix-full.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pmm-package-test-matrix-full.yml b/.github/workflows/pmm-package-test-matrix-full.yml index a82feacc9..debdc2434 100644 --- a/.github/workflows/pmm-package-test-matrix-full.yml +++ b/.github/workflows/pmm-package-test-matrix-full.yml @@ -1,5 +1,5 @@ --- -name: Package Test Matrix +name: Package Test Matrix(full) on: workflow_dispatch: From b5ecbe45d4d843d02374edad972723875beba328 Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Wed, 27 Dec 2023 01:52:25 +0100 Subject: [PATCH 25/31] PMM-12770 fixed syntax --- .github/workflows/pmm-package-test-matrix.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/workflows/pmm-package-test-matrix.yml b/.github/workflows/pmm-package-test-matrix.yml index 746bf6c9b..3836695bf 100644 --- a/.github/workflows/pmm-package-test-matrix.yml +++ b/.github/workflows/pmm-package-test-matrix.yml @@ -39,18 +39,6 @@ jobs: with: repository: ${{ inputs.repository || 'release'}} - - playbook: - description: 'Select test to run:' - default: 'pmm2-client_integration' - required: true - type: choice - options: - - pmm2-client_integration - - - - i_test: name: "pmm2-client_integration" uses: ./.github/workflows/pmm-package-test.yml From 14a772ac9c3c8213dde2d3721e396b88857cf1dc Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Wed, 27 Dec 2023 11:09:33 +0100 Subject: [PATCH 26/31] PMM-12770 disabled full matrix --- .github/workflows/pmm-package-test-matrix-full.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/pmm-package-test-matrix-full.yml b/.github/workflows/pmm-package-test-matrix-full.yml index debdc2434..ac3c26299 100644 --- a/.github/workflows/pmm-package-test-matrix-full.yml +++ b/.github/workflows/pmm-package-test-matrix-full.yml @@ -28,9 +28,6 @@ on: - auto - push - pull - push: - branches: - - PMM-12770-gh-action jobs: get_versions: From c59853d2c6ee7ef8d1372f70ed25150aa8fd868a Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Wed, 27 Dec 2023 11:10:17 +0100 Subject: [PATCH 27/31] PMM-12770 disabled single test --- .github/workflows/pmm-package-test-single.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/pmm-package-test-single.yml b/.github/workflows/pmm-package-test-single.yml index a596b06b1..eec791cc5 100644 --- a/.github/workflows/pmm-package-test-single.yml +++ b/.github/workflows/pmm-package-test-single.yml @@ -37,9 +37,6 @@ on: - auto - push - pull - push: - branches: - - PMM-12770-gh-action jobs: get_versions: From b770a8ccc8973b52c39da748decc6cb609d5bba1 Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Wed, 27 Dec 2023 11:53:05 +0100 Subject: [PATCH 28/31] PMM-12770 disabled matrix and add full package tests list --- .github/workflows/pmm-package-test-matrix.yml | 3 --- .github/workflows/pmm-package-test-single.yml | 9 +++++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pmm-package-test-matrix.yml b/.github/workflows/pmm-package-test-matrix.yml index 3836695bf..83c3a15b5 100644 --- a/.github/workflows/pmm-package-test-matrix.yml +++ b/.github/workflows/pmm-package-test-matrix.yml @@ -28,9 +28,6 @@ on: - auto - push - pull - push: - branches: - - PMM-12770-gh-action jobs: get_versions: diff --git a/.github/workflows/pmm-package-test-single.yml b/.github/workflows/pmm-package-test-single.yml index eec791cc5..21408d74c 100644 --- a/.github/workflows/pmm-package-test-single.yml +++ b/.github/workflows/pmm-package-test-single.yml @@ -15,8 +15,17 @@ on: required: true type: choice options: + - pmm2-client + - pmm2-client_upgrade + - pmm2-client_custom_path - pmm2-client_integration - pmm2-client_integration_upgrade + - pmm2-client_integration_auth_config + - pmm2-client_integration_auth_register + - pmm2-client_integration_auth_setup + - pmm2-client_integration_custom_path + - pmm2-client_integration_custom_port + - pmm2-client_integration_upgrade_custom_port - pmm2-client_integration_upgrade_custom_path repository: description: 'Select Repo for Client:' From a3b2a9f6b5b376f3aebdf971b7d41f79f8369d22 Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Wed, 27 Dec 2023 12:31:20 +0100 Subject: [PATCH 29/31] PMM-12770 renamed runner action --- .../pmm-package-test-matrix-full.yml | 24 +++++++++---------- .github/workflows/pmm-package-test-matrix.yml | 6 ++--- ...e-test.yml => pmm-package-test-runner.yml} | 0 .github/workflows/pmm-package-test-single.yml | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) rename .github/workflows/{pmm-package-test.yml => pmm-package-test-runner.yml} (100%) diff --git a/.github/workflows/pmm-package-test-matrix-full.yml b/.github/workflows/pmm-package-test-matrix-full.yml index ac3c26299..3dda6cc6c 100644 --- a/.github/workflows/pmm-package-test-matrix-full.yml +++ b/.github/workflows/pmm-package-test-matrix-full.yml @@ -38,7 +38,7 @@ jobs: c_test: name: "pmm2-client" - uses: ./.github/workflows/pmm-package-test.yml + uses: ./.github/workflows/pmm-package-test-runner.yml secrets: inherit needs: get_versions strategy: @@ -63,7 +63,7 @@ jobs: cu_test: name: "pmm2-client_upgrade" - uses: ./.github/workflows/pmm-package-test.yml + uses: ./.github/workflows/pmm-package-test-runner.yml secrets: inherit needs: get_versions strategy: @@ -88,7 +88,7 @@ jobs: tb_test: name: "pmm2-client_custom_path" - uses: ./.github/workflows/pmm-package-test.yml + uses: ./.github/workflows/pmm-package-test-runner.yml secrets: inherit needs: get_versions strategy: @@ -113,7 +113,7 @@ jobs: auth_config_test: name: "pmm2-client_integration_auth_config" - uses: ./.github/workflows/pmm-package-test.yml + uses: ./.github/workflows/pmm-package-test-runner.yml secrets: inherit needs: get_versions strategy: @@ -138,7 +138,7 @@ jobs: auth_register_test: name: "pmm2-client_integration_auth_register" - uses: ./.github/workflows/pmm-package-test.yml + uses: ./.github/workflows/pmm-package-test-runner.yml secrets: inherit needs: get_versions strategy: @@ -163,7 +163,7 @@ jobs: auth_setup_test: name: "pmm2-client_integration_auth_setup" - uses: ./.github/workflows/pmm-package-test.yml + uses: ./.github/workflows/pmm-package-test-runner.yml secrets: inherit needs: get_versions strategy: @@ -188,7 +188,7 @@ jobs: tbi_test: name: "pmm2-client_integration_custom_path" - uses: ./.github/workflows/pmm-package-test.yml + uses: ./.github/workflows/pmm-package-test-runner.yml secrets: inherit needs: get_versions strategy: @@ -213,7 +213,7 @@ jobs: port_test: name: "pmm2-client_integration_custom_port" - uses: ./.github/workflows/pmm-package-test.yml + uses: ./.github/workflows/pmm-package-test-runner.yml secrets: inherit needs: get_versions strategy: @@ -238,7 +238,7 @@ jobs: port_u_test: name: "pmm2-client_integration_upgrade_custom_port" - uses: ./.github/workflows/pmm-package-test.yml + uses: ./.github/workflows/pmm-package-test-runner.yml secrets: inherit needs: get_versions strategy: @@ -263,7 +263,7 @@ jobs: i_test: name: "pmm2-client_integration" - uses: ./.github/workflows/pmm-package-test.yml + uses: ./.github/workflows/pmm-package-test-runner.yml secrets: inherit needs: get_versions strategy: @@ -288,7 +288,7 @@ jobs: iu_test: name: "pmm2-client_integration_upgrade" - uses: ./.github/workflows/pmm-package-test.yml + uses: ./.github/workflows/pmm-package-test-runner.yml secrets: inherit needs: get_versions strategy: @@ -313,7 +313,7 @@ jobs: tu_test: name: "pmm2-client_integration_upgrade_custom_path" - uses: ./.github/workflows/pmm-package-test.yml + uses: ./.github/workflows/pmm-package-test-runner.yml secrets: inherit needs: get_versions strategy: diff --git a/.github/workflows/pmm-package-test-matrix.yml b/.github/workflows/pmm-package-test-matrix.yml index 83c3a15b5..2e58c068f 100644 --- a/.github/workflows/pmm-package-test-matrix.yml +++ b/.github/workflows/pmm-package-test-matrix.yml @@ -38,7 +38,7 @@ jobs: i_test: name: "pmm2-client_integration" - uses: ./.github/workflows/pmm-package-test.yml + uses: ./.github/workflows/pmm-package-test-runner.yml secrets: inherit needs: get_versions strategy: @@ -63,7 +63,7 @@ jobs: u_test: name: "pmm2-client_integration_upgrade" - uses: ./.github/workflows/pmm-package-test.yml + uses: ./.github/workflows/pmm-package-test-runner.yml secrets: inherit needs: get_versions strategy: @@ -88,7 +88,7 @@ jobs: t_test: name: "pmm2-client_integration_upgrade_custom_path" - uses: ./.github/workflows/pmm-package-test.yml + uses: ./.github/workflows/pmm-package-test-runner.yml secrets: inherit needs: get_versions strategy: diff --git a/.github/workflows/pmm-package-test.yml b/.github/workflows/pmm-package-test-runner.yml similarity index 100% rename from .github/workflows/pmm-package-test.yml rename to .github/workflows/pmm-package-test-runner.yml diff --git a/.github/workflows/pmm-package-test-single.yml b/.github/workflows/pmm-package-test-single.yml index 21408d74c..6fec0a3e4 100644 --- a/.github/workflows/pmm-package-test-single.yml +++ b/.github/workflows/pmm-package-test-single.yml @@ -56,7 +56,7 @@ jobs: p_test: name: ${{ inputs.test_name || 'pmm2-client_integration' }} - uses: ./.github/workflows/pmm-package-test.yml + uses: ./.github/workflows/pmm-package-test-runner.yml secrets: inherit needs: get_versions strategy: From 57c4ebf21aa7376491ef28f380be0d6dec67b336 Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Mon, 8 Jan 2024 11:18:59 +0100 Subject: [PATCH 30/31] PMM-12808 removed "patch release" option --- .github/workflows/pmm-package-test-matrix-full.yml | 1 - .github/workflows/pmm-package-test-matrix.yml | 1 - .github/workflows/pmm-package-test-single.yml | 1 - 3 files changed, 3 deletions(-) diff --git a/.github/workflows/pmm-package-test-matrix-full.yml b/.github/workflows/pmm-package-test-matrix-full.yml index 3dda6cc6c..c81b33b9c 100644 --- a/.github/workflows/pmm-package-test-matrix-full.yml +++ b/.github/workflows/pmm-package-test-matrix-full.yml @@ -17,7 +17,6 @@ on: options: - release - release candidate - - patch-release candidate - dev-latest metrics_mode: description: 'Select the Metrics Mode for PMM Client:' diff --git a/.github/workflows/pmm-package-test-matrix.yml b/.github/workflows/pmm-package-test-matrix.yml index 2e58c068f..292901690 100644 --- a/.github/workflows/pmm-package-test-matrix.yml +++ b/.github/workflows/pmm-package-test-matrix.yml @@ -17,7 +17,6 @@ on: options: - release - release candidate - - patch-release candidate - dev-latest metrics_mode: description: 'Select the Metrics Mode for PMM Client:' diff --git a/.github/workflows/pmm-package-test-single.yml b/.github/workflows/pmm-package-test-single.yml index 6fec0a3e4..66d69c74e 100644 --- a/.github/workflows/pmm-package-test-single.yml +++ b/.github/workflows/pmm-package-test-single.yml @@ -35,7 +35,6 @@ on: options: - release - release candidate - - patch-release candidate - dev-latest metrics_mode: description: 'Select the Metrics Mode for PMM Client:' From a8e36eb48c37fec803b0c2b86bd490457ebe2892 Mon Sep 17 00:00:00 2001 From: Vadym Yarosh Date: Tue, 9 Jan 2024 13:59:31 +0100 Subject: [PATCH 31/31] PMM-12770 fixes per review comments --- .github/workflows/pmm-package-test-matrix.yml | 2 +- .github/workflows/pmm-package-test-runner.yml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pmm-package-test-matrix.yml b/.github/workflows/pmm-package-test-matrix.yml index 292901690..8392bc874 100644 --- a/.github/workflows/pmm-package-test-matrix.yml +++ b/.github/workflows/pmm-package-test-matrix.yml @@ -108,4 +108,4 @@ jobs: metrics_mode: ${{ inputs.metrics_mode || 'auto'}} playbook: "pmm2-client_integration_upgrade_custom_path" test_name: ${{ matrix.os }} - os: ${{ matrix.os }} \ No newline at end of file + os: ${{ matrix.os }} diff --git a/.github/workflows/pmm-package-test-runner.yml b/.github/workflows/pmm-package-test-runner.yml index 379187501..e11ded926 100644 --- a/.github/workflows/pmm-package-test-runner.yml +++ b/.github/workflows/pmm-package-test-runner.yml @@ -31,7 +31,6 @@ on: options: - release - release candidate - - patch-release candidate - dev-latest metrics_mode: description: "Select the Metrics Mode for PMM Client:"