From 9d6c341601ffdbd5c1b458050f1c458d9044300a Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Wed, 7 Dec 2022 11:40:24 +0000 Subject: [PATCH 01/80] rewind submodules --- sources/grafana-dashboards | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/grafana-dashboards b/sources/grafana-dashboards index dcc3a83b329a..8d63972f6802 160000 --- a/sources/grafana-dashboards +++ b/sources/grafana-dashboards @@ -1 +1 @@ -Subproject commit dcc3a83b329a23681f26995619e873fae1ad0543 +Subproject commit 8d63972f68028dbe9bc7d8583954373e91f0fdf3 From c50ebaf90db77b5abf6f41adc81a9da2aba30440 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Wed, 7 Dec 2022 13:10:19 +0000 Subject: [PATCH 02/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index 85f12e258106..ce434f5f1432 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit 85f12e25810661e90f18b81b92d6a83f388610a3 +Subproject commit ce434f5f1432ed74bce7b1682f256bca8ee66b19 From 1ef180027813ef58f28ad841183e072d990d837e Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Wed, 7 Dec 2022 13:20:12 +0000 Subject: [PATCH 03/80] rewind submodules --- sources/grafana/src/github.com/grafana/grafana | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/grafana/src/github.com/grafana/grafana b/sources/grafana/src/github.com/grafana/grafana index 7240c866d679..bc02f95550a5 160000 --- a/sources/grafana/src/github.com/grafana/grafana +++ b/sources/grafana/src/github.com/grafana/grafana @@ -1 +1 @@ -Subproject commit 7240c866d679201bd253eea6fc00c5e9c5f90501 +Subproject commit bc02f95550a594e554a73d3956ffd9e9a2179b2e From ee247107f57b9aeb56db5bdb3a6c504d58b1311d Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Wed, 7 Dec 2022 18:30:17 +0000 Subject: [PATCH 04/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index ce434f5f1432..b4b0e7f90dae 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit ce434f5f1432ed74bce7b1682f256bca8ee66b19 +Subproject commit b4b0e7f90dae87c6cc7c221719d1a15cdd0d510c From 94d1da2a434750ed5cc846941f219d79c47fa086 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Thu, 8 Dec 2022 08:00:13 +0000 Subject: [PATCH 05/80] rewind submodules --- sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests b/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests index 276e4e2af7b4..f9ca1abc6ea6 160000 --- a/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests +++ b/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests @@ -1 +1 @@ -Subproject commit 276e4e2af7b4cb2085c03a17a5606836b866ca90 +Subproject commit f9ca1abc6ea6fca4093e1fa89f05f132e34a11b9 From e253bfbe339fbe6bbbef0571cb860814808384a7 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Thu, 8 Dec 2022 09:40:15 +0000 Subject: [PATCH 06/80] rewind submodules --- sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests b/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests index f9ca1abc6ea6..3ec7e916113c 160000 --- a/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests +++ b/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests @@ -1 +1 @@ -Subproject commit f9ca1abc6ea6fca4093e1fa89f05f132e34a11b9 +Subproject commit 3ec7e916113c574e7cb88bf4d4a9a3f35eedd773 From df55ef6f1680cd44459a48076fe150154ac63c36 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Thu, 8 Dec 2022 11:50:22 +0000 Subject: [PATCH 07/80] rewind submodules --- sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests b/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests index 3ec7e916113c..4e5babe046fe 160000 --- a/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests +++ b/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests @@ -1 +1 @@ -Subproject commit 3ec7e916113c574e7cb88bf4d4a9a3f35eedd773 +Subproject commit 4e5babe046fea89c3ca3904d62286289d63e149e From 98f4392cae02fc6533e1d173a886e910651ab95e Mon Sep 17 00:00:00 2001 From: Alex Tymchuk Date: Thu, 8 Dec 2022 14:58:01 +0300 Subject: [PATCH 08/80] PMM-11207 migrate pmm-update to the monorepo (#2941) * PMM-11207 migrate pmm-update to the monorepo * PMM-11207 update actions * PMM-11207 remove pmm-update from sources * PMM-11207 prettify the action * Trigger FB * Trigger FB * PMM-11207 add ci.yml * Trigger FB * Trigger FB * PMM-11207 reset the ci.yml Co-authored-by: Michal Kralik --- .github/CODEOWNERS | 5 ++- .github/pull_request_template.md | 2 +- .github/workflows/jenkins-dispatch.yml | 33 ++++++++----------- .gitmodules | 4 --- README.md | 26 ++++++++------- ci-default.yml | 6 ---- .../src/github.com/percona/pmm-update | 1 - 7 files changed, 31 insertions(+), 46 deletions(-) delete mode 160000 sources/pmm-update/src/github.com/percona/pmm-update diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 3ed600883296..9bf8448ec265 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,3 +1,2 @@ -/build/ @nikita-b -ci-default.yml @nikita-b -ci.py @nikita-b +ci-default.yml @talhabinrizwan +ci.py @talhabinrizwan diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 298269460754..6d13718f8100 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,3 +1,3 @@ https://jira.percona.com/browse/PMM-0 -- [ ] Links to other linked pull requests. +- [ ] Links to relevant pull requests diff --git a/.github/workflows/jenkins-dispatch.yml b/.github/workflows/jenkins-dispatch.yml index e675c094e3a4..42ec456dd5dd 100644 --- a/.github/workflows/jenkins-dispatch.yml +++ b/.github/workflows/jenkins-dispatch.yml @@ -1,54 +1,47 @@ -on: +on: workflow_dispatch: inputs: server_image: - description: 'server image: repo/name:tag' + description: "server image: repo/name:tag" required: true - type: string + type: string client_image: - description: 'client image: repo/name:tag' - required: true + description: "client image: repo/name:tag" + required: true type: string sha: - description: 'commit sha to report status' + description: "commit sha to report status" required: false type: string jobs: - helm-tests: runs-on: ubuntu-latest env: WORK_DIR: /home/runner/work/pmm-submodules/pmm-submodules/sources/pmm-qa/src/github.com/percona/pmm-qa/pmm-tests steps: - - - name: checkout code - uses: percona-platform/checkout@v3 + - name: Checkout code + uses: actions/checkout@v3 with: - submodules: 'recursive' + submodules: "recursive" - - name: install npm - uses: percona-platform/setup-node@v3 - with: - node-version: '14' - - - name: install tools + - name: Install tools run: | npm install -g bats $WORK_DIR/install_k8s_tools.sh --minikube --helm --kubectl --user - - name: minikube_start + - name: Start minikube run: | minikube start kubectl wait --for=condition=Ready node --timeout=90s minikube - - name: helm_tests + - name: Run helm tests run: | echo $(git submodule status) cd $WORK_DIR - + export IMAGE_REPO=$(echo $SERVER_IMAGE | cut -d ':' -f 1) export IMAGE_TAG=$(echo $SERVER_IMAGE | cut -d ':' -f 2) bats --tap pmm-2-0-bats-tests/helm-test.bats diff --git a/.gitmodules b/.gitmodules index e27066277bd3..1e9de419e590 100644 --- a/.gitmodules +++ b/.gitmodules @@ -48,10 +48,6 @@ path = sources/dbaas-controller/src/github.com/percona-platform/dbaas-controller url = https://github.com/percona-platform/dbaas-controller branch = main -[submodule "pmm-update"] - path = sources/pmm-update/src/github.com/percona/pmm-update - url = https://github.com/percona/pmm-update - branch = main [submodule "grafana-dashboards"] path = sources/grafana-dashboards url = https://github.com/percona/grafana-dashboards diff --git a/README.md b/README.md index 20a2f6693f1a..c2a86e155063 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ # PMM Submodules This repository serves the purpose of creating and/or updating the feature builds for PMM Server and PMM Client. It is auxiliary -to our build system managed by Jenkins as it helps pull the right branches from different repositories that PMM [consists of](https://github.com/percona/pmm). +to our build system managed by Jenkins as it helps pull the right branches from different repositories that PMM [consists of](https://github.com/percona/pmm/blob/main/CONTRIBUTING.md#project-repos-structure). -# Installation dependencies +# Installation of dependencies -If you build with Python's script then you need install requirements: +If you build with Python's script then you need to install the dependencies: ``` pip install -r requirements.txt @@ -32,7 +32,6 @@ deps: branch: PMM-0000-fix-everything ``` - Next, you will commit changes to git and push them to the repo: ``` @@ -41,14 +40,17 @@ git commit -m 'use custom branches' git push ``` +Whenever you commit and push to a feature branch, a Jenkins job will be triggered and it will start building your feature. You can follow its progress right from the PR's actions (at the bottom of each PR). + ## Using a Personal Access Token (PAT) Given that github is limiting the number of API requests for unauthenticated users, it'd be a good idea to use your personal access token. You can create a personal token in [Github settings](https://github.com/settings/tokens). Generate New Token -> Click on a repo -> Create an environment variable called `GITHUB_API_TOKEN` and provide your token as the value. The token requires the following permissions: -* `repo:status` -* `public_repo` -* `read:user` + +- `repo:status` +- `public_repo` +- `read:user` It is recommended to set an expiration date for your token. @@ -77,21 +79,23 @@ If you use the same branch name in all repos then you can run: ```console make prepare ``` -Branches with "you branch name" will be used for all repos or default branch if the branch with this name isn't found in repo. -If you want to create FB from fork you can pass environment variable "FORK_OWNER" which should be equal to your username in github and run: +Branches with "you branch name" will be used for all repos or the default branch (usually called `main`) if the branch with this name isn't found in the repo. + +If you want to create a FB from a fork, you can pass an environment variable "FORK_OWNER" which should be equal to your username in github and run: ```console FORK_OWNER= make prepare ``` -### I got error "...branch has no upstream branch" +### I got an error "...branch has no upstream branch" -This happens because of your newly created branch. Your Git is not configured to create that same branch on remote. You can run: +This happens because of your newly created branch. Your Git is not configured to create that same branch on remote. To fix this you can run: ```console git config --global push.default current ``` + ### What's a `global` repo in ci.yml? It's a branch name that this script will try to find in a repo instead of the default branch (usually called `main` or `PMM-2.0`). diff --git a/ci-default.yml b/ci-default.yml index 5747a521568f..425f1ffeeec1 100644 --- a/ci-default.yml +++ b/ci-default.yml @@ -69,12 +69,6 @@ deps: url: https://github.com/percona-platform/dbaas-controller component: server - - name: pmm-update - branch: main - path: sources/pmm-update/src/github.com/percona/pmm-update - url: https://github.com/percona/pmm-update - component: server - - name: grafana-dashboards branch: main path: sources/grafana-dashboards diff --git a/sources/pmm-update/src/github.com/percona/pmm-update b/sources/pmm-update/src/github.com/percona/pmm-update deleted file mode 160000 index 8eee6fcb69ac..000000000000 --- a/sources/pmm-update/src/github.com/percona/pmm-update +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8eee6fcb69ace78e9245bc9e72fe8cc54afb49c3 From 2ef4b4b3f8c43e5e6d668f6ce6c856f1cc73cb52 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Thu, 8 Dec 2022 12:00:13 +0000 Subject: [PATCH 09/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index b4b0e7f90dae..abc7391d11f4 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit b4b0e7f90dae87c6cc7c221719d1a15cdd0d510c +Subproject commit abc7391d11f41dad60cb9c95c20ce97a4e9d1650 From 480e5ddf034cbdddc61bb9c1ebaefea161c0c7e6 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Thu, 8 Dec 2022 13:50:24 +0000 Subject: [PATCH 10/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index abc7391d11f4..245fad84aa09 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit abc7391d11f41dad60cb9c95c20ce97a4e9d1650 +Subproject commit 245fad84aa097de529965233764f668f57c13498 From 71203be09e5a1d61ce10a62b282818d6871ce635 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Thu, 8 Dec 2022 14:30:13 +0000 Subject: [PATCH 11/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index 245fad84aa09..c0f4f5d1c844 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit 245fad84aa097de529965233764f668f57c13498 +Subproject commit c0f4f5d1c844b6f98f114ea03cdffbdbbb4317aa From 4f9e15c5cb59cd2b60403ffa7a54f12e49e5933e Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Mon, 12 Dec 2022 12:00:17 +0000 Subject: [PATCH 12/80] rewind submodules --- sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests b/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests index 4e5babe046fe..6793437986fc 160000 --- a/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests +++ b/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests @@ -1 +1 @@ -Subproject commit 4e5babe046fea89c3ca3904d62286289d63e149e +Subproject commit 6793437986fc052222f8ddd4a849a3a596abf503 From b2b50760c2bbdcb67eb2579cb66defda1dcbe99a Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Mon, 12 Dec 2022 13:00:15 +0000 Subject: [PATCH 13/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index c0f4f5d1c844..8ea832e186a0 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit c0f4f5d1c844b6f98f114ea03cdffbdbbb4317aa +Subproject commit 8ea832e186a01e064597db962bc52cf90f8b50c9 From 9fdfdfd4b0fc05bdaf209733bb5bbb8a9a5c29c6 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Mon, 12 Dec 2022 13:50:14 +0000 Subject: [PATCH 14/80] rewind submodules --- sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests b/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests index 6793437986fc..45f446a6cb53 160000 --- a/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests +++ b/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests @@ -1 +1 @@ -Subproject commit 6793437986fc052222f8ddd4a849a3a596abf503 +Subproject commit 45f446a6cb53dc1ddfc62ba989c62f22f226a22d From 81ce699a4cc88f493f95cdf9d44bb4bdde9fadaa Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Mon, 12 Dec 2022 14:50:14 +0000 Subject: [PATCH 15/80] rewind submodules --- sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests b/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests index 45f446a6cb53..853814c59471 160000 --- a/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests +++ b/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests @@ -1 +1 @@ -Subproject commit 45f446a6cb53dc1ddfc62ba989c62f22f226a22d +Subproject commit 853814c594718af2e3f601813c8f5d236a7e0d16 From d8257785f0b1e9264d66e793dd608e01dbd70158 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Mon, 12 Dec 2022 15:40:17 +0000 Subject: [PATCH 16/80] rewind submodules --- sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests b/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests index 853814c59471..58222fbe79e2 160000 --- a/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests +++ b/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests @@ -1 +1 @@ -Subproject commit 853814c594718af2e3f601813c8f5d236a7e0d16 +Subproject commit 58222fbe79e2c78f4b6f304a2dd0cceaa84ff6a0 From 58a6c76a05ce4e8f97eddb7c382fc7f472605c65 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Mon, 12 Dec 2022 16:20:18 +0000 Subject: [PATCH 17/80] rewind submodules --- sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests b/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests index 58222fbe79e2..372e4678301e 160000 --- a/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests +++ b/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests @@ -1 +1 @@ -Subproject commit 58222fbe79e2c78f4b6f304a2dd0cceaa84ff6a0 +Subproject commit 372e4678301eea9fc3d008139c4011eeb87806a0 From 0db8c52dffcf0a2aaae46e42e82354faaa6ee01d Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Tue, 13 Dec 2022 13:40:16 +0000 Subject: [PATCH 18/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index 8ea832e186a0..9289a7161187 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit 8ea832e186a01e064597db962bc52cf90f8b50c9 +Subproject commit 9289a716118752d1beb69bfb3b5c1a1968d40de2 From e84e01b710fa91e377094cb6cbc33abeccab786c Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Tue, 13 Dec 2022 14:20:18 +0000 Subject: [PATCH 19/80] rewind submodules --- sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests b/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests index 372e4678301e..52351143bde5 160000 --- a/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests +++ b/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests @@ -1 +1 @@ -Subproject commit 372e4678301eea9fc3d008139c4011eeb87806a0 +Subproject commit 52351143bde576d5527795b7ab0f66d48b81f471 From a788ba41b3325c63f4fdedcb440d7e188064cdbb Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Tue, 13 Dec 2022 15:10:15 +0000 Subject: [PATCH 20/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index 9289a7161187..924d17c243a7 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit 9289a716118752d1beb69bfb3b5c1a1968d40de2 +Subproject commit 924d17c243a7922783eeec4dffdb4b89acb10697 From 51ccd7df0464cfbb4becc1844d40f22de8d50805 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Tue, 13 Dec 2022 16:10:13 +0000 Subject: [PATCH 21/80] rewind submodules --- .../src/github.com/percona-platform/dbaas-controller | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/dbaas-controller/src/github.com/percona-platform/dbaas-controller b/sources/dbaas-controller/src/github.com/percona-platform/dbaas-controller index 4b2bb1e481df..565c4e64b8a1 160000 --- a/sources/dbaas-controller/src/github.com/percona-platform/dbaas-controller +++ b/sources/dbaas-controller/src/github.com/percona-platform/dbaas-controller @@ -1 +1 @@ -Subproject commit 4b2bb1e481df83324466e30fe732c21a8e3bce79 +Subproject commit 565c4e64b8a12562a5eb4606eb7dac7819d4f2d1 From 000f5c6ca82d861ca02012a883396dbc8e1c0e3e Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Wed, 14 Dec 2022 07:50:12 +0000 Subject: [PATCH 22/80] rewind submodules --- sources/grafana/src/github.com/grafana/grafana | 2 +- sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/grafana/src/github.com/grafana/grafana b/sources/grafana/src/github.com/grafana/grafana index bc02f95550a5..8b0dd5aee7c9 160000 --- a/sources/grafana/src/github.com/grafana/grafana +++ b/sources/grafana/src/github.com/grafana/grafana @@ -1 +1 @@ -Subproject commit bc02f95550a594e554a73d3956ffd9e9a2179b2e +Subproject commit 8b0dd5aee7c9cbe041e84393e55ff1ec9cb2d668 diff --git a/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests b/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests index 52351143bde5..820590719ab3 160000 --- a/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests +++ b/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests @@ -1 +1 @@ -Subproject commit 52351143bde576d5527795b7ab0f66d48b81f471 +Subproject commit 820590719ab3bafc1bea6008f765dab5811c9d50 From 1ce79c378b8e9ada606adbebe83556e6f254bdac Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Wed, 14 Dec 2022 10:50:13 +0000 Subject: [PATCH 23/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index 924d17c243a7..ccf863567380 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit 924d17c243a7922783eeec4dffdb4b89acb10697 +Subproject commit ccf863567380571524d2090a9c479d63fe86709e From fb49135f29be8f1906b56f8099cbffcdb1c5cfb5 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Wed, 14 Dec 2022 11:10:10 +0000 Subject: [PATCH 24/80] rewind submodules --- sources/grafana/src/github.com/grafana/grafana | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/grafana/src/github.com/grafana/grafana b/sources/grafana/src/github.com/grafana/grafana index 8b0dd5aee7c9..e13a907ab471 160000 --- a/sources/grafana/src/github.com/grafana/grafana +++ b/sources/grafana/src/github.com/grafana/grafana @@ -1 +1 @@ -Subproject commit 8b0dd5aee7c9cbe041e84393e55ff1ec9cb2d668 +Subproject commit e13a907ab471619d31507bc6f108d69cfb5f3e38 From e4f5f8d4d4be5f4b0b3180ac0bad6987845169ed Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Wed, 14 Dec 2022 11:20:11 +0000 Subject: [PATCH 25/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index ccf863567380..226c62580075 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit ccf863567380571524d2090a9c479d63fe86709e +Subproject commit 226c62580075c8701cadd7e4f0e65e378d905fb4 From f874076a1d6524836eb27bb1b6e4457bf6254562 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Wed, 14 Dec 2022 11:50:18 +0000 Subject: [PATCH 26/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index 226c62580075..41e65bc56bba 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit 226c62580075c8701cadd7e4f0e65e378d905fb4 +Subproject commit 41e65bc56bbae6329dcd9d0242656ae0848cbc13 From 68304bb4c8560d8b7e8eabef7309a5cda855a7d5 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Wed, 14 Dec 2022 14:30:14 +0000 Subject: [PATCH 27/80] rewind submodules --- sources/rds_exporter/src/github.com/percona/rds_exporter | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/rds_exporter/src/github.com/percona/rds_exporter b/sources/rds_exporter/src/github.com/percona/rds_exporter index ba071287a22f..4d52255cabec 160000 --- a/sources/rds_exporter/src/github.com/percona/rds_exporter +++ b/sources/rds_exporter/src/github.com/percona/rds_exporter @@ -1 +1 @@ -Subproject commit ba071287a22ffb4b02b9ca5b135b980a56f52114 +Subproject commit 4d52255cabec796cf48cd22fc3c0d334a904682c From c400adcf5a121a06e9cad17632ff5ac9e8cf5a16 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Wed, 14 Dec 2022 16:20:12 +0000 Subject: [PATCH 28/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index 41e65bc56bba..742da097515c 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit 41e65bc56bbae6329dcd9d0242656ae0848cbc13 +Subproject commit 742da097515cbdd641cc6123f369def14f76383d From 84d87039667bd61d359bb94f74588d968a921f21 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Thu, 15 Dec 2022 08:40:14 +0000 Subject: [PATCH 29/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index 742da097515c..c3d5bf158bac 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit 742da097515cbdd641cc6123f369def14f76383d +Subproject commit c3d5bf158bacfadabfd6c184d9a2dcdbdaa7ecff From bc78238ae9ea71e76b8f63b3f624c3bf6923357e Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Thu, 15 Dec 2022 09:10:23 +0000 Subject: [PATCH 30/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index c3d5bf158bac..955ccdc5256c 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit c3d5bf158bacfadabfd6c184d9a2dcdbdaa7ecff +Subproject commit 955ccdc5256cf787c25e2a658d871cadd954e26d From bcd5ed614cd75d4a562958ab4994895ed55f07de Mon Sep 17 00:00:00 2001 From: Vasyl Yurkovych <59879559+yurkovychv@users.noreply.github.com> Date: Thu, 15 Dec 2022 11:20:17 +0200 Subject: [PATCH 31/80] PMM-11080-pmm-cli-tests (#2906) * PMM-11080-pmm-cli-tests * PMM-11080-pmm-cli-tests fix workflow err * PMM-11080-pmm-cli-tests fix workflow err * PMM-11080-pmm-cli-tests update work dir * PMM-11080-pmm-cli-tests run ci.py * PMM-11080-pmm-cli-tests run ci.py * PMM-11080-pmm-cli-tests install pygithub * PMM-11080-pmm-cli-tests install setuptools * PMM-11080-pmm-cli-tests install setupotools * PMM-11080-pmm-cli-tests install GitPython * PMM-11080-pmm-cli-tests use ubuntu 20.04 * PMM-11080-pmm-cli-tests github token * PMM-11080-pmm-cli-tests use secret * PMM-11080-pmm-cli-tests try another env var if no GITHUB_API_TOKEN * PMM-11080-pmm-cli-tests try another env var if no GITHUB_API_TOKEN * PMM-11080-pmm-cli-tests try another env var if no GITHUB_API_TOKEN * PMM-11080-pmm-cli-tests try another env var if no GITHUB_API_TOKEN * PMM-11080-pmm-cli-tests try another env var if no GITHUB_API_TOKEN * PMM-11080-pmm-cli-tests install deps with pip * PMM-11080-pmm-cli-tests update workdir * PMM-11080-pmm-cli-tests cleanup * PMM-11080-pmm-cli-tests try another env var if no GITHUB_API_TOKEN * PMM-11080 cleanup * PMM-11080-pmm-cli-tests remove newline in ci.yml * PMM-11080 cleanup * PMM-11080 add GH_API_TOKEN env var * PMM-11080 actions/checkout --- .github/workflows/jenkins-dispatch.yml | 11 +++- .github/workflows/pmm-cli.yml | 91 ++++++++++++++++++++++++++ ci.py | 6 +- 3 files changed, 104 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/pmm-cli.yml diff --git a/.github/workflows/jenkins-dispatch.yml b/.github/workflows/jenkins-dispatch.yml index 42ec456dd5dd..5371e21ad5c4 100644 --- a/.github/workflows/jenkins-dispatch.yml +++ b/.github/workflows/jenkins-dispatch.yml @@ -18,7 +18,8 @@ jobs: helm-tests: runs-on: ubuntu-latest env: - WORK_DIR: /home/runner/work/pmm-submodules/pmm-submodules/sources/pmm-qa/src/github.com/percona/pmm-qa/pmm-tests + WORK_DIR: sources/pmm-qa/src/github.com/percona/pmm-qa/pmm-tests + GH_API_TOKEN: ${{ secrets.GH_API_TOKEN }} steps: - name: Checkout code @@ -26,7 +27,13 @@ jobs: with: submodules: "recursive" - - name: Install tools + - name: run ci.py + run: | + pip3 install PyGithub + pip3 install GitPython + python3 ci.py + + - name: install tools run: | npm install -g bats $WORK_DIR/install_k8s_tools.sh --minikube --helm --kubectl --user diff --git a/.github/workflows/pmm-cli.yml b/.github/workflows/pmm-cli.yml new file mode 100644 index 000000000000..9c5dc0af7d22 --- /dev/null +++ b/.github/workflows/pmm-cli.yml @@ -0,0 +1,91 @@ +on: + workflow_dispatch: + inputs: + client_tar_url: + description: 'client tar url' + required: true + type: string + sha: + description: 'commit sha to report status' + required: false + type: string + +jobs: + pmm-cli: + name: 'PMM binary CLI tests' + runs-on: ubuntu-20.04 + env: + CLIENT_TAR_URL: ${{ github.event.inputs.client_tar_url }} + WORK_DIR: sources/pmm/src/github.com/percona/pmm/cli-tests + GH_API_TOKEN: ${{ secrets.GH_API_TOKEN }} + + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + submodules: 'recursive' + + - name: Run ci.py + run: | + pip3 install PyGithub + pip3 install GitPython + python3 ci.py + + - name: Set Client tar name env variable + run: echo "PMM_CLIENT_TAR=$(echo ${{ env.CLIENT_TAR_URL }} | grep -o '[^/]*$')" >> $GITHUB_ENV + + - name: Download client + run: | + sudo wget ${{ env.CLIENT_TAR_URL }} + + - name: Unzip client + run: | + tar -xzf ${{ env.PMM_CLIENT_TAR }} + echo "PMM_CLIENT_BASEDIR=$(ls -1td pmm2-client-* 2>/dev/null | grep -v ".tar" | head -n1)" >> $GITHUB_ENV + + - name: Rename client folder + run: mv ${{ env.PMM_CLIENT_BASEDIR }} pmm2-client + + - name: Check pmm version output + working-directory: pmm2-client + run: | + echo "export PATH=$PATH:$PWD/bin" >> ~/.bash_profile + source ~/.bash_profile + pmm --version + + - name: Install Dependencies + working-directory: ${{ env.WORK_DIR }} + run: npm ci + + - name: Run tests + working-directory: ${{ env.WORK_DIR }} + run: | + source ~/.bash_profile + npm run test:pmm-cli + + - name: Create status check + if: ${{ github.event.inputs.sha && always() }} + continue-on-error: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + REPO: ${{ github.repository }} + RUN_ID: ${{ github.run_id }} + SHA: ${{ inputs.sha }} + STATUS: ${{ job.status }} + run: | + if [ "${STATUS}" = "cancelled" ]; then + STATUS="error" + fi + + gh api \ + --method POST \ + -H "Accept: application/vnd.github.v3+json" \ + /repos/$REPO/statuses/$SHA \ + -f state="$STATUS" \ + -f target_url="https://github.com/$REPO/actions/runs/$RUN_ID" \ + -f description="PMM binary CLI Tests $STATUS" \ + -f context='actions/workflows/pmm-cli' + + # - name: Setup tmate session on failure + # if: ${{ failure() }} + # uses: percona-platform/action-tmate@v2 diff --git a/ci.py b/ci.py index 8313529f4364..9965836e4a9a 100644 --- a/ci.py +++ b/ci.py @@ -196,11 +196,13 @@ def check_deps(self): outdated_branches = [] submodules_url = '/'.join(PR_URL.split('/')[3:-2]) pull_number = PR_URL.split('/')[-1:][0] + GH_ACTIONS_TOKEN = GITHUB_TOKEN - if GITHUB_TOKEN == '': + if GH_ACTIONS_TOKEN == '': logging.warning('there is no GITHUB_TOKEN') + GH_ACTIONS_TOKEN = os.environ.get('GH_API_TOKEN', '') - github_api = Github(GITHUB_TOKEN) + github_api = Github(GH_ACTIONS_TOKEN) # it's not a good idea to use config_override here. Maybe we can add 'custom' key? for dep in self.config_override['deps']: From 69ab64f8790e9cdebab7009a1e2efc13c62c2637 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Thu, 15 Dec 2022 09:30:13 +0000 Subject: [PATCH 32/80] rewind submodules --- sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests b/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests index 820590719ab3..6c94ee187be1 160000 --- a/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests +++ b/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests @@ -1 +1 @@ -Subproject commit 820590719ab3bafc1bea6008f765dab5811c9d50 +Subproject commit 6c94ee187be1d963d36c3ed658da8f34fae570ad From 79620143124c2d3ba020cdb40ab93844f7288efd Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Thu, 15 Dec 2022 15:10:15 +0000 Subject: [PATCH 33/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index 955ccdc5256c..103047ba2e34 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit 955ccdc5256cf787c25e2a658d871cadd954e26d +Subproject commit 103047ba2e34815ba5d9038bc1c669e6eb9f4503 From 65154aba4ff4850f7a87c1cdc4bcec69b6244070 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Fri, 16 Dec 2022 09:40:16 +0000 Subject: [PATCH 34/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index 103047ba2e34..6fb69f4a3b71 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit 103047ba2e34815ba5d9038bc1c669e6eb9f4503 +Subproject commit 6fb69f4a3b7121f015481c0a4012169b93ff1511 From 37655e0f3689915932a2aa53093c38223740e22a Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Fri, 16 Dec 2022 10:00:25 +0000 Subject: [PATCH 35/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index 6fb69f4a3b71..8d63c15c79be 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit 6fb69f4a3b7121f015481c0a4012169b93ff1511 +Subproject commit 8d63c15c79be6d33070c4bfe80abb1392c1572aa From 8a1f91117e9144e7a93114502c6d77b236aaaa6a Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Fri, 16 Dec 2022 12:20:12 +0000 Subject: [PATCH 36/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index 8d63c15c79be..9ef9c67a6f46 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit 8d63c15c79be6d33070c4bfe80abb1392c1572aa +Subproject commit 9ef9c67a6f46b3f13f397c275eafcad80cbfc958 From 449a39b453b3dcaacd0559b35186e50538e65884 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Fri, 16 Dec 2022 16:50:14 +0000 Subject: [PATCH 37/80] rewind submodules --- sources/grafana/src/github.com/grafana/grafana | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/grafana/src/github.com/grafana/grafana b/sources/grafana/src/github.com/grafana/grafana index e13a907ab471..529472a46dd1 160000 --- a/sources/grafana/src/github.com/grafana/grafana +++ b/sources/grafana/src/github.com/grafana/grafana @@ -1 +1 @@ -Subproject commit e13a907ab471619d31507bc6f108d69cfb5f3e38 +Subproject commit 529472a46dd1a09e6e8683ee815369a4fd09ad7f From cb4e9cd2fe2c2d32022f075dd5c8d97feff18fc0 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Fri, 16 Dec 2022 17:41:40 +0000 Subject: [PATCH 38/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index 9ef9c67a6f46..65b1d3ae5821 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit 9ef9c67a6f46b3f13f397c275eafcad80cbfc958 +Subproject commit 65b1d3ae5821b595d5f9e9776283b5dcd1e559a6 From 20c528af0ba501588d2e1aee428a215425667102 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Mon, 19 Dec 2022 09:00:24 +0000 Subject: [PATCH 39/80] rewind submodules --- sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests b/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests index 6c94ee187be1..ec06e09ea7ba 160000 --- a/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests +++ b/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests @@ -1 +1 @@ -Subproject commit 6c94ee187be1d963d36c3ed658da8f34fae570ad +Subproject commit ec06e09ea7ba15aacbd4bce4e18ae7c87b4bbd04 From 8e7d60d0e91e94fa492bc9ea31fb59e8744f7265 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Mon, 19 Dec 2022 14:20:21 +0000 Subject: [PATCH 40/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index 65b1d3ae5821..88a7935a0946 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit 65b1d3ae5821b595d5f9e9776283b5dcd1e559a6 +Subproject commit 88a7935a094694700816407a08af5868421ec914 From 2621e5e0f91ed9ca5761088fbd0e8ddb9e620658 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Mon, 19 Dec 2022 18:00:19 +0000 Subject: [PATCH 41/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index 88a7935a0946..706542e2b76c 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit 88a7935a094694700816407a08af5868421ec914 +Subproject commit 706542e2b76c7f5c44d12d326f1091cc524f0a63 From 908a790c7c8094c96a35d6375a0d94f17151b17e Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Tue, 20 Dec 2022 12:30:15 +0000 Subject: [PATCH 42/80] rewind submodules --- sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests b/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests index ec06e09ea7ba..4fc716f776a9 160000 --- a/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests +++ b/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests @@ -1 +1 @@ -Subproject commit ec06e09ea7ba15aacbd4bce4e18ae7c87b4bbd04 +Subproject commit 4fc716f776a919c7f7e4ba1ef15c619ee917f94b From ae4fbcad8e0216793b44b81ce25bd5c55f43e464 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Tue, 20 Dec 2022 13:00:19 +0000 Subject: [PATCH 43/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index 706542e2b76c..e8a0a8f312f2 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit 706542e2b76c7f5c44d12d326f1091cc524f0a63 +Subproject commit e8a0a8f312f26c341794da2c37c8eae94d27faea From c253155b8c74c1cc17b5ffd6a69586f8284bf80d Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Tue, 20 Dec 2022 13:50:17 +0000 Subject: [PATCH 44/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index e8a0a8f312f2..3cb320b3109d 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit e8a0a8f312f26c341794da2c37c8eae94d27faea +Subproject commit 3cb320b3109d52f147aadf4aa83e7adf1841d887 From afffd3deafb9b932280ddb6768c22c04418b5d32 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Tue, 20 Dec 2022 14:10:22 +0000 Subject: [PATCH 45/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index 3cb320b3109d..876cc1853d40 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit 3cb320b3109d52f147aadf4aa83e7adf1841d887 +Subproject commit 876cc1853d40e3b5452517151ec36a7851081e27 From 2db2892ca49d51c13b5aa0340054d27058cfb14f Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Wed, 21 Dec 2022 06:10:14 +0000 Subject: [PATCH 46/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index 876cc1853d40..2dac1a9afbbf 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit 876cc1853d40e3b5452517151ec36a7851081e27 +Subproject commit 2dac1a9afbbf9fb257a5dfabd9342d7caf979be3 From 9fd158c13cb003f0b7da2f759687e48486dcc442 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Wed, 21 Dec 2022 10:50:23 +0000 Subject: [PATCH 47/80] rewind submodules --- sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests b/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests index 4fc716f776a9..4de5a16ff605 160000 --- a/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests +++ b/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests @@ -1 +1 @@ -Subproject commit 4fc716f776a919c7f7e4ba1ef15c619ee917f94b +Subproject commit 4de5a16ff60543ccc478589daef65145921d2198 From 61dee9754fe5d2784c61aeb7a38aac27cc5a7a37 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Wed, 21 Dec 2022 14:30:21 +0000 Subject: [PATCH 48/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index 2dac1a9afbbf..778810e1083a 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit 2dac1a9afbbf9fb257a5dfabd9342d7caf979be3 +Subproject commit 778810e1083a05f015166146f3d354c6d240d913 From a08149f07688ba1a9b2ac5c5c53d34ff84d5d493 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Wed, 21 Dec 2022 16:00:17 +0000 Subject: [PATCH 49/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index 778810e1083a..28f3d3f5eae4 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit 778810e1083a05f015166146f3d354c6d240d913 +Subproject commit 28f3d3f5eae4b2a931132702a6555388c81a40fd From d5f152783e9cf6f545ebcaf6ce824c8b08d7fef8 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Wed, 21 Dec 2022 18:00:16 +0000 Subject: [PATCH 50/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index 28f3d3f5eae4..8a7f0c9ea39e 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit 28f3d3f5eae4b2a931132702a6555388c81a40fd +Subproject commit 8a7f0c9ea39e138abfeb4881f94895833aea1fdf From 778e9b9a0b3a8a50e8cbbae45e76a81035266292 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Thu, 22 Dec 2022 08:50:16 +0000 Subject: [PATCH 51/80] rewind submodules --- sources/pmm-qa/src/github.com/percona/pmm-qa | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm-qa/src/github.com/percona/pmm-qa b/sources/pmm-qa/src/github.com/percona/pmm-qa index 8be29d238a6b..2244139ecc37 160000 --- a/sources/pmm-qa/src/github.com/percona/pmm-qa +++ b/sources/pmm-qa/src/github.com/percona/pmm-qa @@ -1 +1 @@ -Subproject commit 8be29d238a6b955296638d9a034d23989d38502c +Subproject commit 2244139ecc37756e2bf72475ca13d9e4d1f1b28d From 88e87a417d1717b92a294bb5d3850f13fa4ddd76 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Fri, 23 Dec 2022 22:10:12 +0000 Subject: [PATCH 52/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index 8a7f0c9ea39e..603fd64adb72 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit 8a7f0c9ea39e138abfeb4881f94895833aea1fdf +Subproject commit 603fd64adb720fabedbd327efe449009a43cd66e From 74a4842e8d295636ddec8f290c9de1a9a4642c37 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Fri, 23 Dec 2022 22:30:11 +0000 Subject: [PATCH 53/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index 603fd64adb72..2a0898851e61 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit 603fd64adb720fabedbd327efe449009a43cd66e +Subproject commit 2a0898851e6108950a5b83aefd45e26fff0f46a2 From 05e9121cf59df268bb7fdc92fb6fff42279085f4 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Fri, 23 Dec 2022 23:00:13 +0000 Subject: [PATCH 54/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index 2a0898851e61..4a4410a894cf 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit 2a0898851e6108950a5b83aefd45e26fff0f46a2 +Subproject commit 4a4410a894cf61aa3801feac3bf6878bcd855583 From bf998df0b334dd4497871759193709a0564eb7ef Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Mon, 26 Dec 2022 07:50:12 +0000 Subject: [PATCH 55/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index 4a4410a894cf..2686b3200fe7 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit 4a4410a894cf61aa3801feac3bf6878bcd855583 +Subproject commit 2686b3200fe74fed2d64ec933462e20fe579bd0e From 62a3c136e100bed7d67403eb5796c77b6e9e04d9 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Mon, 26 Dec 2022 16:40:14 +0000 Subject: [PATCH 56/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index 2686b3200fe7..41cec88ebd09 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit 2686b3200fe74fed2d64ec933462e20fe579bd0e +Subproject commit 41cec88ebd0944a83866c8efcf661f40b3b9da7d From 32d40ea22dc2c3da5144d47fcddbd3625e7a515e Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Tue, 27 Dec 2022 08:10:10 +0000 Subject: [PATCH 57/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index 41cec88ebd09..9801a2f0708e 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit 41cec88ebd0944a83866c8efcf661f40b3b9da7d +Subproject commit 9801a2f0708e1584869ed723a041eee60a90a2e8 From 9b5eb23dbf3a74b61f6d782e5fd9b79527983c99 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Tue, 27 Dec 2022 09:00:21 +0000 Subject: [PATCH 58/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index 9801a2f0708e..c5552484ff62 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit 9801a2f0708e1584869ed723a041eee60a90a2e8 +Subproject commit c5552484ff6281e83b3cdf2d126ca7f4f2fc483a From 3f8ae66f22ec6f2735b54ae5c33304f4cd7cd108 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Tue, 27 Dec 2022 10:50:11 +0000 Subject: [PATCH 59/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index c5552484ff62..7e721a81dd90 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit c5552484ff6281e83b3cdf2d126ca7f4f2fc483a +Subproject commit 7e721a81dd90d565ecc54515c88d706ab4832dd7 From 11ebdbfd10c7126694fe988709f8946e9108dad9 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Tue, 27 Dec 2022 11:10:17 +0000 Subject: [PATCH 60/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index 7e721a81dd90..5e087c07f78f 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit 7e721a81dd90d565ecc54515c88d706ab4832dd7 +Subproject commit 5e087c07f78f39420c8de037ad6a201622f07235 From 37fe31e3b74b817ed1b5b1cf1988e1d7f789070f Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Tue, 27 Dec 2022 11:50:21 +0000 Subject: [PATCH 61/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index 5e087c07f78f..1db0e0e2e9f4 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit 5e087c07f78f39420c8de037ad6a201622f07235 +Subproject commit 1db0e0e2e9f4eff35d5057cbfdce41fa71ef53a8 From fa9d51b802d3236670290e65f9abcc6f5b8c91e3 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Tue, 27 Dec 2022 15:10:14 +0000 Subject: [PATCH 62/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index 1db0e0e2e9f4..f0ab3696c9de 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit 1db0e0e2e9f4eff35d5057cbfdce41fa71ef53a8 +Subproject commit f0ab3696c9de559108624a1f8329a465e9493070 From cf90959d22a6fbc6c29442231a6ae4003d0d1e9f Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Tue, 27 Dec 2022 18:40:18 +0000 Subject: [PATCH 63/80] rewind submodules --- .../postgres_exporter/src/github.com/percona/postgres_exporter | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/postgres_exporter/src/github.com/percona/postgres_exporter b/sources/postgres_exporter/src/github.com/percona/postgres_exporter index e02ea57b91be..8140ab3e39f0 160000 --- a/sources/postgres_exporter/src/github.com/percona/postgres_exporter +++ b/sources/postgres_exporter/src/github.com/percona/postgres_exporter @@ -1 +1 @@ -Subproject commit e02ea57b91be54fdbaa582468af5f79c0a915b14 +Subproject commit 8140ab3e39f06fe717e8821b8530994d8a31394e From 431ec4174bd80eb862656644d665601783246132 Mon Sep 17 00:00:00 2001 From: Puneet Kala Date: Wed, 28 Dec 2022 15:22:36 +0530 Subject: [PATCH 64/80] PMM-7 Testsuite migration (#2979) --- .github/workflows/pmm2-testsuite.yml | 218 +++++++++++++++++++++++++++ 1 file changed, 218 insertions(+) create mode 100644 .github/workflows/pmm2-testsuite.yml diff --git a/.github/workflows/pmm2-testsuite.yml b/.github/workflows/pmm2-testsuite.yml new file mode 100644 index 000000000000..a8bca0bcb8d8 --- /dev/null +++ b/.github/workflows/pmm2-testsuite.yml @@ -0,0 +1,218 @@ +name: pmm2-testsuite pipeline +on: + # run with default inputs + workflow_dispatch: + inputs: + server_image: + description: "pmm-server docker image, default perconalab/pmm-server:dev-latest" + required: false + type: string + client_version: + description: "pmm2-client version Tarball or Dev-latest, default is dev-latest" + required: false + type: string + client_image: + description: "pmm2-client docker image, default perconalab/pmm-client:dev-latest" + required: false + type: string + pmm_qa_branch: + description: "Branch for PMM-QA to checkout" + required: false + type: string + sha: + description: "SHA (leave empty if running manually, default - 'null')" + required: false + type: string + workflow_call: + inputs: + server_image: + description: "pmm-server docker image, default perconalab/pmm-server:dev-latest" + required: false + type: string + client_version: + description: "pmm2-client version Tarball or Dev-latest, default is dev-latest" + required: false + type: string + client_image: + description: "pmm2-client docker image, default perconalab/pmm-client:dev-latest" + required: false + type: string + pmm_qa_branch: + description: "Branch for PMM-QA to checkout" + required: false + type: string + sha: + description: "SHA (leave empty if running manually, default - 'null')" + required: false + type: string + +jobs: + bats-testsuite: + runs-on: ubuntu-latest + timeout-minutes: 40 + env: + SERVER_IMAGE: ${{ github.event.inputs.server_image || 'perconalab/pmm-server:dev-latest' }} + CLIENT_IMAGE: ${{ github.event.inputs.client_image || 'perconalab/pmm-client:dev-latest' }} + CLIENT_VERSION: ${{ github.event.inputs.client_version || 'dev-latest' }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PMM_QA_BRANCH: ${{ github.event.inputs.pmm_qa_branch || 'main' }} + DOCKER_VERSION: ${{ github.event.inputs.server_image || 'perconalab/pmm-server:dev-latest' }} + CLIENT_DOCKER_VERSION: ${{ github.event.inputs.client_image || 'perconalab/pmm-client:dev-latest' }} + PMM_QA_GIT_BRANCH: ${{ github.event.inputs.pmm_qa_branch || 'main' }} + SHA: ${{ github.event.inputs.sha || 'null' }} + strategy: + fail-fast: false + matrix: + db-type: [ps5.7, ps8, pdpgsql13, pdpgsql14, pdpgsql15, modb4.4, modb5, modb6, generic, clientContainer, haproxy, proxysql, ms8.0] + + steps: + - name: Checkout PMM-QA tests when Workflow_dispatch + if: ${{ github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' }} + uses: actions/checkout@v3 + with: + ref: ${{ env.PMM_QA_BRANCH }} + repository: percona/pmm-qa + path: ./ + - name: Checkout PMM-QA tests when pull_request + if: ${{ github.event_name == 'pull_request' }} + uses: actions/checkout@v3 + with: + path: ./ + + - name: Setup tools + run: | + npm install -g bats + sudo apt-get install -y apt-transport-https ca-certificates dirmngr ansible libaio1 libaio-dev libnuma-dev libncurses5 socat sysbench + sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 8919F6BD2B48D754 + echo "deb https://packages.clickhouse.com/deb stable main" | sudo tee \ + /etc/apt/sources.list.d/clickhouse.list + sudo apt-get update + sudo apt-get install -y clickhouse-client + sudo curl -s https://raw.githubusercontent.com/datacharmer/dbdeployer/master/scripts/dbdeployer-install.sh | bash + wget https://raw.githubusercontent.com/Percona-QA/percona-qa/master/get_download_link.sh + chmod +x get_download_link.sh + + - name: Setup PMM2-Server + run: | + docker create -v /srv --name pmm-server-data ${{ env.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.SERVER_IMAGE }} + sleep 30 + + - name: Setup PMM2-Client + run: sudo -E bash -x ./pmm-tests/pmm2-client-setup.sh --pmm_server_ip 127.0.0.1 --client_version ${{ env.CLIENT_VERSION }} --admin_password admin --use_metrics_mode no + + - name: Run Setup for ps5.7 + if: ${{ matrix.db-type == 'ps5.7' }} + run: sudo -E bash -x ./pmm-tests/pmm-framework.sh --addclient=ps,1 --ps-version=5.7 --pmm2 + + - name: Run Setup for ps8.0 + if: ${{ matrix.db-type == 'ps8' }} + run: sudo -E bash -x ./pmm-tests/pmm-framework.sh --addclient=ps,1 --ps-version=8 --pmm2 + + - name: Run bats tests for PS + if: ${{ matrix.db-type == 'ps5.7' || matrix.db-type == 'ps8' }} + run: sudo bats ./pmm-tests/pmm-2-0-bats-tests/ps-specific-tests.bats + + - name: Run Setup for pdpgsql 13 + if: ${{ matrix.db-type == 'pdpgsql13' }} + run: sudo -E bash -x ./pmm-tests/pmm-framework.sh --addclient=pdpgsql,1 --pdpgsql-version=13 --pmm2 + + - name: Run Setup for pdpgsql 14 + if: ${{ matrix.db-type == 'pdpgsql14' }} + run: sudo -E bash -x ./pmm-tests/pmm-framework.sh --addclient=pdpgsql,1 --pdpgsql-version=14 --pmm2 + + - name: Run Setup for pdpgsql 15.0 + if: ${{ matrix.db-type == 'pdpgsql15' }} + run: sudo -E bash -x ./pmm-tests/pmm-framework.sh --addclient=pdpgsql,1 --pdpgsql-version=15.0 --pmm2 + + - name: Run bats tests for PDPGSQL + if: ${{ matrix.db-type == 'pdpgsql13' || matrix.db-type == 'pdpgsql14' || matrix.db-type == 'pdpgsql15' }} + run: | + sudo bats ./pmm-tests/pmm-2-0-bats-tests/pdpgsql-tests.bats + sudo bats ./pmm-tests/pmm-2-0-bats-tests/pgsql-specific-tests.bats + + - name: Run Setup for PSMDB 4.4 + if: ${{ matrix.db-type == 'modb4.4' }} + run: sudo -E bash -x ./pmm-tests/pmm-framework.sh --addclient=modb,1 --modb-version=4.4 --pmm2 + + - name: Run Setup for PSMDB 5 + if: ${{ matrix.db-type == 'modb5' }} + run: sudo -E bash -x ./pmm-tests/pmm-framework.sh --addclient=modb,1 --modb-version=5 --pmm2 + + - name: Run Setup for PSMDB 6 + if: ${{ matrix.db-type == 'modb6' }} + run: sudo -E bash -x ./pmm-tests/pmm-framework.sh --addclient=modb,1 --modb-version=6 --pmm2 + + - name: Run bats tests for PSMDB + if: ${{ matrix.db-type == 'modb6' || matrix.db-type == 'modb5' || matrix.db-type == 'modb4.4' }} + run: sudo bats ./pmm-tests/pmm-2-0-bats-tests/modb-tests.bats + + - name: Run Setup Generic Tests, Including Client Container Setup + if: ${{ matrix.db-type == 'clientContainer' }} + run: | + sudo -E bash -x ./pmm-tests/pmm-framework.sh --setup-pmm-client-docker --pmm2 + + - name: Run bats tests for generic Scenarios + if: ${{ matrix.db-type == 'generic' }} + run: | + sudo bats ./pmm-tests/pmm-2-0-bats-tests/generic-tests.bats + sudo bats ./pmm-tests/pmm-2-0-bats-tests/docker-env-variable-tests.bats + + - name: Run bats tests for Client Container Scenarios + if: ${{ matrix.db-type == 'clientContainer' }} + run: | + sudo bats ./pmm-tests/pmm-2-0-bats-tests/pmm-client-docker-tests.bats + sudo bats ./pmm-tests/pmm-2-0-bats-tests/pmm-admin-unregister-tests.bats + + - name: Run Setup for HAPROXY + if: ${{ matrix.db-type == 'haproxy' }} + run: | + export CLIENT_VERSION=${{ env.CLIENT_VERSION }} + export CLIENT_DOCKER_VERSION=${{ env.CLIENT_DOCKER_VERSION }} + sudo -E bash -x ./pmm-tests/pmm-framework.sh --addclient=haproxy,1 --pmm2 + + - name: Run bats tests for Client Container Scenarios + if: ${{ matrix.db-type == 'haproxy' }} + run: | + sudo bats ./pmm-tests/pmm-2-0-bats-tests/haproxy-tests.bats + + - name: Run Setup for ProxySQL + if: ${{ matrix.db-type == 'proxysql' }} + run: sudo -E bash -x ./pmm-tests/pmm-framework.sh --addclient=pxc,1 --pmm2 --pxc-version=5.7 + + - name: Run bats tests for ProxySQL + if: ${{ matrix.db-type == 'proxysql' }} + run: | + sudo bats ./pmm-tests/pmm-2-0-bats-tests/proxysql-specific-tests.bats + + - name: Run Setup for MySQL + if: ${{ matrix.db-type == 'ms8.0' }} + run: sudo -E bash -x ./pmm-tests/pmm-framework.sh --addclient=ms,1 --pmm2 --ms-version=8.0 + + - name: Run bats tests for MySQL Tests + if: ${{ matrix.db-type == 'ms8.0' }} + run: | + sudo bats ./pmm-tests/pmm-2-0-bats-tests/ms-specific-tests.bats + - name: Create status check + if: ${{ always() }} + continue-on-error: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + REPO: ${{ github.repository }} + RUN_ID: ${{ github.run_id }} + SHA: ${{ inputs.sha }} + STATUS: ${{ job.status }} + JOB_ID: ${{ job.id }} + run: | + result="${{ needs.build.result }}" + if [ "${STATUS}" = "cancelled" ]; then + STATUS="error" + fi + gh api \ + --method POST \ + -H "Accept: application/vnd.github.v3+json" \ + /repos/$REPO/statuses/$SHA \ + -f state="$STATUS" \ + -f target_url="https://github.com/$REPO/actions/runs/$RUN_ID" \ + -f description="pmm2-testsuite bats cli tests ${{ matrix.db-type }} $STATUS" \ + -f context='actions/workflows/bats-testsuite/${{ matrix.db-type }}' From 31e5f3c98d4e986f9294c87ff84ede285c66677c Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Wed, 28 Dec 2022 14:10:17 +0000 Subject: [PATCH 65/80] rewind submodules --- sources/pmm-qa/src/github.com/percona/pmm-qa | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm-qa/src/github.com/percona/pmm-qa b/sources/pmm-qa/src/github.com/percona/pmm-qa index 2244139ecc37..c8ca59ef9655 160000 --- a/sources/pmm-qa/src/github.com/percona/pmm-qa +++ b/sources/pmm-qa/src/github.com/percona/pmm-qa @@ -1 +1 @@ -Subproject commit 2244139ecc37756e2bf72475ca13d9e4d1f1b28d +Subproject commit c8ca59ef96554462f4679556120f11c863c442b4 From f47176ba8442be3e0853a7a5800f5863a2de2dc4 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Wed, 28 Dec 2022 15:40:09 +0000 Subject: [PATCH 66/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index f0ab3696c9de..3e251bab92e6 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit f0ab3696c9de559108624a1f8329a465e9493070 +Subproject commit 3e251bab92e62c5ff41210c9e38a57485423fcd7 From c4b8df379b7df8e50c9f3a403a77285b0651d262 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Wed, 28 Dec 2022 15:50:18 +0000 Subject: [PATCH 67/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index 3e251bab92e6..a1e44233a774 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit 3e251bab92e62c5ff41210c9e38a57485423fcd7 +Subproject commit a1e44233a7744f869b2df4837bedba49d5e553d2 From 05ff4ad3e8f68f99c986f5fd98b339bf5cedd67f Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Thu, 29 Dec 2022 08:30:10 +0000 Subject: [PATCH 68/80] rewind submodules --- sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests b/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests index 4de5a16ff605..5776ab082774 160000 --- a/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests +++ b/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests @@ -1 +1 @@ -Subproject commit 4de5a16ff60543ccc478589daef65145921d2198 +Subproject commit 5776ab08277433c33b2e16fb6235931d0659dc4f From cf8765774402b3400486e6ba34bab49edf624da1 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Thu, 29 Dec 2022 10:10:17 +0000 Subject: [PATCH 69/80] rewind submodules --- sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests b/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests index 5776ab082774..ce92b2fa1678 160000 --- a/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests +++ b/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests @@ -1 +1 @@ -Subproject commit 5776ab08277433c33b2e16fb6235931d0659dc4f +Subproject commit ce92b2fa16781b6e7477a4b8e3964049f381cbe2 From 9651f34de0049b13fd066e8e0c00646bb6a0a4c6 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Thu, 29 Dec 2022 14:50:10 +0000 Subject: [PATCH 70/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index a1e44233a774..d555c27de4af 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit a1e44233a7744f869b2df4837bedba49d5e553d2 +Subproject commit d555c27de4af50df19af53d22bb4de4a86445e3a From 93c8134dc7426cbed4a20c2a23985afa95fb0866 Mon Sep 17 00:00:00 2001 From: Vasyl Yurkovych <59879559+yurkovychv@users.noreply.github.com> Date: Thu, 29 Dec 2022 19:17:40 +0200 Subject: [PATCH 71/80] PMM-10789 run fb tests (#2978) * PMM-10789 run fb tests * PMM-10789 actions checkout * PMM-10789 actions checkout * PMM-10789 use npm ci * PMM-10789 update testsuite workflow * PMM-10789 update testsuite step name * PMM-10789 test fb pipeline * PMM-10789 add env vars for tests * PMM-10789 inherit secrets * PMM-10789 attach artifacts * PMM-10789 name for artifacts * PMM-10789 setup tmate * PMM-10789 name for artifacts * PMM-10789 name for artifacts * PMM-10789 respect ubuntu * PMM-10789 debug * PMM-10789 name for artifacts * PMM-10789 replace artifact name * PMM-10789 fix status check * PMM-10789 clean up * PMM-10789 tweaks * PMM-10789 init statuses for tests * PMM-10789 remove deps --- .github/workflows/pmm2-testsuite.yml | 67 +++++------ .github/workflows/pmm2-ui-tests-fb.yml | 112 ++++++++++++++++++ .github/workflows/ui-tests.yml | 158 +++++++++++++++++++++++++ 3 files changed, 302 insertions(+), 35 deletions(-) create mode 100644 .github/workflows/pmm2-ui-tests-fb.yml create mode 100644 .github/workflows/ui-tests.yml diff --git a/.github/workflows/pmm2-testsuite.yml b/.github/workflows/pmm2-testsuite.yml index a8bca0bcb8d8..550101c66050 100644 --- a/.github/workflows/pmm2-testsuite.yml +++ b/.github/workflows/pmm2-testsuite.yml @@ -51,33 +51,40 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 40 env: - SERVER_IMAGE: ${{ github.event.inputs.server_image || 'perconalab/pmm-server:dev-latest' }} - CLIENT_IMAGE: ${{ github.event.inputs.client_image || 'perconalab/pmm-client:dev-latest' }} - CLIENT_VERSION: ${{ github.event.inputs.client_version || 'dev-latest' }} + SERVER_IMAGE: ${{ github.event.inputs.server_image || inputs.server_image || 'perconalab/pmm-server:dev-latest' }} + CLIENT_IMAGE: ${{ github.event.inputs.client_image || inputs.client_image || 'perconalab/pmm-client:dev-latest' }} + CLIENT_VERSION: ${{ github.event.inputs.client_version || inputs.client_version || 'dev-latest' }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PMM_QA_BRANCH: ${{ github.event.inputs.pmm_qa_branch || 'main' }} - DOCKER_VERSION: ${{ github.event.inputs.server_image || 'perconalab/pmm-server:dev-latest' }} - CLIENT_DOCKER_VERSION: ${{ github.event.inputs.client_image || 'perconalab/pmm-client:dev-latest' }} - PMM_QA_GIT_BRANCH: ${{ github.event.inputs.pmm_qa_branch || 'main' }} - SHA: ${{ github.event.inputs.sha || 'null' }} + PMM_QA_BRANCH: ${{ github.event.inputs.pmm_qa_branch || inputs.pmm_qa_branch || 'main' }} + DOCKER_VERSION: ${{ github.event.inputs.server_image || inputs.server_image || 'perconalab/pmm-server:dev-latest' }} + CLIENT_DOCKER_VERSION: ${{ github.event.inputs.client_image || inputs.client_image || 'perconalab/pmm-client:dev-latest' }} + PMM_QA_GIT_BRANCH: ${{ github.event.inputs.pmm_qa_branch || inputs.pmm_qa_branch || 'main' }} + SHA: ${{ github.event.inputs.sha || inputs.sha || 'null' }} strategy: fail-fast: false matrix: db-type: [ps5.7, ps8, pdpgsql13, pdpgsql14, pdpgsql15, modb4.4, modb5, modb6, generic, clientContainer, haproxy, proxysql, ms8.0] steps: - - name: Checkout PMM-QA tests when Workflow_dispatch - if: ${{ github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' }} + - name: Create status check + if: ${{ env.SHA != 'null' }} + uses: percona-platform/github-status-action@v1 + continue-on-error: true + with: + authToken: ${{ secrets.GITHUB_TOKEN }} + context: "${{ matrix.db-type }} CLI tests" + 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 PMM-QA tests ${{ env.PMM_QA_BRANCH }} branch uses: actions/checkout@v3 with: ref: ${{ env.PMM_QA_BRANCH }} repository: percona/pmm-qa path: ./ - - name: Checkout PMM-QA tests when pull_request - if: ${{ github.event_name == 'pull_request' }} - uses: actions/checkout@v3 - with: - path: ./ - name: Setup tools run: | @@ -193,26 +200,16 @@ jobs: if: ${{ matrix.db-type == 'ms8.0' }} run: | sudo bats ./pmm-tests/pmm-2-0-bats-tests/ms-specific-tests.bats + - name: Create status check if: ${{ always() }} + uses: percona-platform/github-status-action@v1 continue-on-error: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - REPO: ${{ github.repository }} - RUN_ID: ${{ github.run_id }} - SHA: ${{ inputs.sha }} - STATUS: ${{ job.status }} - JOB_ID: ${{ job.id }} - run: | - result="${{ needs.build.result }}" - if [ "${STATUS}" = "cancelled" ]; then - STATUS="error" - fi - gh api \ - --method POST \ - -H "Accept: application/vnd.github.v3+json" \ - /repos/$REPO/statuses/$SHA \ - -f state="$STATUS" \ - -f target_url="https://github.com/$REPO/actions/runs/$RUN_ID" \ - -f description="pmm2-testsuite bats cli tests ${{ matrix.db-type }} $STATUS" \ - -f context='actions/workflows/bats-testsuite/${{ matrix.db-type }}' + with: + authToken: ${{ secrets.GITHUB_TOKEN }} + context: "${{ matrix.db-type }} CLI tests" + description: "Test execution ${{ job.status }}" + state: ${{ job.status }} + repository: ${{ github.repository }} + target_url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" + sha: ${{ env.SHA }} diff --git a/.github/workflows/pmm2-ui-tests-fb.yml b/.github/workflows/pmm2-ui-tests-fb.yml new file mode 100644 index 000000000000..37fb8842dbfb --- /dev/null +++ b/.github/workflows/pmm2-ui-tests-fb.yml @@ -0,0 +1,112 @@ +name: pmm2-ui-tests-fb pipeline +on: + + workflow_dispatch: + inputs: + server_image: + description: "pmm-server docker image, default perconalab/pmm-server:dev-latest" + required: false + type: string + client_version: + description: "pmm2-client version Tarball or Dev-latest, default is dev-latest" + required: false + type: string + client_image: + description: "pmm2-client docker image, default perconalab/pmm-client:dev-latest" + required: false + type: string + pmm_qa_branch: + description: "Branch for PMM-QA to checkout" + required: false + type: string + pmm_ui_branch: + description: "Branch for PMM-UI tests to checkout" + required: false + type: string + sha: + description: "SHA (leave empty if running manually, default - 'null')" + required: false + type: string + + workflow_call: + inputs: + server_image: + description: "pmm-server docker image, default perconalab/pmm-server:dev-latest" + required: false + type: string + client_version: + description: "pmm2-client version Tarball URL or Dev-latest, default is dev-latest" + required: false + type: string + client_image: + description: "pmm2-client docker image, default perconalab/pmm-client:dev-latest" + required: false + type: string + pmm_qa_branch: + description: "Branch for PMM-QA to checkout" + required: false + type: string + pmm_ui_branch: + description: "Branch for PMM-UI tests to checkout" + required: false + type: string + sha: + description: "SHA (leave empty if running manually, default - 'null')" + required: false + type: string + +jobs: + advisors: + name: Advisors UI tests + uses: ./.github/workflows/ui-tests.yml + secrets: inherit + with: + server_image: ${{ github.event.inputs.server_image || 'perconalab/pmm-server:dev-latest' }} + client_version: ${{ github.event.inputs.client_version || 'dev-latest' }} + client_image: ${{ github.event.inputs.client_image || 'perconalab/pmm-client:dev-latest' }} + pmm_qa_branch: ${{ github.event.inputs.pmm_qa_branch || 'main' }} + pmm_ui_branch: ${{ github.event.inputs.pmm_ui_branch || 'main' }} + sha: ${{ github.event.inputs.sha || github.event.pull_request.head.sha || 'null' }} + client_flags: '--addclient=ps,1 --ps-version=5.7.30' + tags_for_tests: '@advisors-fb' + + backup_management: + name: Backup Management UI tests + uses: ./.github/workflows/ui-tests.yml + secrets: inherit + with: + server_image: ${{ github.event.inputs.server_image || 'perconalab/pmm-server:dev-latest' }} + client_version: ${{ github.event.inputs.client_version || 'dev-latest' }} + client_image: ${{ github.event.inputs.client_image || 'perconalab/pmm-client:dev-latest' }} + pmm_qa_branch: ${{ github.event.inputs.pmm_qa_branch || 'main' }} + pmm_ui_branch: ${{ github.event.inputs.pmm_ui_branch || 'main' }} + sha: ${{ github.event.inputs.sha || github.event.pull_request.head.sha || 'null' }} + client_flags: '--mongo-replica-for-backup' + tags_for_tests: '@bm-fb' + + instances: + name: Instances UI tests + uses: ./.github/workflows/ui-tests.yml + secrets: inherit + with: + server_image: ${{ github.event.inputs.server_image || 'perconalab/pmm-server:dev-latest' }} + client_version: ${{ github.event.inputs.client_version || 'dev-latest' }} + client_image: ${{ github.event.inputs.client_image || 'perconalab/pmm-client:dev-latest' }} + pmm_qa_branch: ${{ github.event.inputs.pmm_qa_branch || 'main' }} + pmm_ui_branch: ${{ github.event.inputs.pmm_ui_branch || 'main' }} + sha: ${{ github.event.inputs.sha || github.event.pull_request.head.sha || 'null' }} + client_flags: '--addclient=haproxy,1 --addclient=ps,1 --setup-external-service' + tags_for_tests: '@instances-fb' + + alerting_and_settings: + name: Alerting and Settings UI tests + uses: ./.github/workflows/ui-tests.yml + secrets: inherit + with: + server_image: ${{ github.event.inputs.server_image || 'perconalab/pmm-server:dev-latest' }} + client_version: ${{ github.event.inputs.client_version || 'dev-latest' }} + client_image: ${{ github.event.inputs.client_image || 'perconalab/pmm-client:dev-latest' }} + pmm_qa_branch: ${{ github.event.inputs.pmm_qa_branch || 'main' }} + pmm_ui_branch: ${{ github.event.inputs.pmm_ui_branch || 'main' }} + sha: ${{ github.event.inputs.sha || github.event.pull_request.head.sha || 'null' }} + tags_for_tests: '@alerting-fb|@settings-fb' diff --git a/.github/workflows/ui-tests.yml b/.github/workflows/ui-tests.yml new file mode 100644 index 000000000000..3eb356a53437 --- /dev/null +++ b/.github/workflows/ui-tests.yml @@ -0,0 +1,158 @@ +name: UI tests +on: + workflow_call: + inputs: + server_image: + description: "pmm-server docker image, default perconalab/pmm-server:dev-latest" + required: false + type: string + client_version: + description: "pmm2-client version Tarball or Dev-latest, default is dev-latest" + required: false + type: string + client_image: + description: "pmm2-client docker image, default perconalab/pmm-client:dev-latest" + required: false + type: string + pmm_qa_branch: + description: "Branch for PMM-QA to checkout" + required: false + type: string + pmm_ui_branch: + description: "Branch for PMM-UI tests to checkout" + required: false + type: string + sha: + description: "SHA (leave empty if running manually, default - 'null')" + required: false + type: string + client_flags: + description: "example: --addclient=ps,1 --ps-version=5.7" + required: false + type: string + tags_for_tests: + description: "example: @settings-fb" + required: true + type: string + +jobs: + ui-tests-e2e: + runs-on: ubuntu-latest + timeout-minutes: 40 + env: + SERVER_IMAGE: ${{ inputs.server_image || 'perconalab/pmm-server:dev-latest' }} + CLIENT_IMAGE: ${{ inputs.client_image || 'perconalab/pmm-client:dev-latest' }} + CLIENT_VERSION: ${{ inputs.client_version || 'dev-latest' }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ADMIN_PASSWORD: 'admin-password' + PMM_QA_BRANCH: ${{ inputs.pmm_qa_branch || 'main' }} + PMM_QA_GIT_BRANCH: ${{ inputs.pmm_qa_branch || 'main' }} + PMM_UI_BRANCH: ${{ inputs.pmm_ui_branch || 'main' }} + DOCKER_VERSION: ${{ inputs.server_image || 'perconalab/pmm-server:dev-latest' }} + CLIENT_DOCKER_VERSION: ${{ inputs.client_image || 'perconalab/pmm-client:dev-latest' }} + SHA: ${{ inputs.sha || 'null' }} + CLIENT_FLAGS: ${{ inputs.client_flags || '' }} + TAGS_FOR_TESTS: ${{ inputs.tags_for_tests || '@settings-fb' }} + +# Environment variables for tests + BACKUP_LOCATION_ACCESS_KEY: ${{ secrets.BACKUP_LOCATION_ACCESS_KEY }} + BACKUP_LOCATION_SECRET_KEY: ${{ secrets.BACKUP_LOCATION_SECRET_KEY }} + + + steps: + - name: Create status check + if: ${{ env.SHA != 'null' }} + uses: percona-platform/github-status-action@v1 + continue-on-error: true + with: + authToken: ${{ secrets.GITHUB_TOKEN }} + context: "${{ env.TAGS_FOR_TESTS }} UI tests" + 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 PMM UI tests + uses: actions/checkout@v3 + with: + ref: ${{ env.PMM_UI_BRANCH }} + repository: percona/pmm-ui-tests + path: ./ + + - name: Setup tools + run: | + npm install -g bats + sudo apt-get install -y apt-transport-https ca-certificates dirmngr ansible libaio1 libaio-dev libnuma-dev libncurses5 socat sysbench + sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 8919F6BD2B48D754 + echo "deb https://packages.clickhouse.com/deb stable main" | sudo tee \ + /etc/apt/sources.list.d/clickhouse.list + sudo apt-get update + sudo apt-get install -y clickhouse-client + sudo curl -s https://raw.githubusercontent.com/datacharmer/dbdeployer/master/scripts/dbdeployer-install.sh | bash + ls -la + git clone -b ${{ env.PMM_QA_BRANCH }} https://github.com/percona/pmm-qa + ls -la + pushd pmm-qa + wget https://raw.githubusercontent.com/Percona-QA/percona-qa/master/get_download_link.sh + chmod +x get_download_link.sh + popd + + - name: Setup PMM2-Server + run: | + PWD=$(pwd) PMM_SERVER_IMAGE=${{ env.DOCKER_VERSION }} docker-compose up -d + sleep 60 + docker exec pmm-server change-admin-password ${{ env.ADMIN_PASSWORD }} + bash -x testdata/db_setup.sh + + - name: Setup PMM2-Client + run: sudo bash -x ./pmm-qa/pmm-tests/pmm2-client-setup.sh --pmm_server_ip 192.168.0.1 --client_version ${{ env.CLIENT_VERSION }} --admin_password ${{ env.ADMIN_PASSWORD }} --use_metrics_mode no + + - name: Run Setup for E2E Tests + run: sudo -E bash -x ./pmm-qa/pmm-tests/pmm-framework.sh ${{ env.CLIENT_FLAGS }} --pmm2 + + - name: Setup npm modules for e2e tests + run: | + npm ci + envsubst < env.list > env.generated.list + + - name: Execute e2e tests with tags ${{ env.TAGS_FOR_TESTS }} + env: + SERVER_IP : "192.168.0.1" + PMM_UI_URL : "http://192.168.0.1/" + PMM_URL : "http://admin:${{ env.ADMIN_PASSWORD }}@${{ env.SERVER_IP }}" + run: | + sed -i 's+http://localhost/+${PMM_UI_URL}/+g' pr.codecept.js + ./node_modules/.bin/codeceptjs run --steps --reporter mocha-multi -c pr.codecept.js --grep "${{ env.TAGS_FOR_TESTS }}" + + - uses: actions/github-script@v6 + id: artifact_name + with: + script: | + + return `artifacts_for_${process.env.TAGS_FOR_TESTS.replaceAll('|', '')}` + result-encoding: string + + - name: Attach artifacts + if: ${{ always() }} + uses: actions/upload-artifact@v2 + with: + name: ${{ steps.artifact_name.outputs.result }} + path: tests/output + + - name: Create status check + if: ${{ always() }} + uses: percona-platform/github-status-action@v1 + continue-on-error: true + with: + authToken: ${{ secrets.GITHUB_TOKEN }} + context: "${{ env.TAGS_FOR_TESTS }} UI tests" + description: "Test execution ${{ job.status }}" + state: ${{ job.status }} + repository: ${{ github.repository }} + target_url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" + sha: ${{ env.SHA }} + +# - name: Setup tmate session on failure +# if: ${{ failure() }} +# uses: percona-platform/action-tmate@v2 From f83c1ca1b499b9db6ecf66f5d121eb683df54e5d Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Thu, 29 Dec 2022 17:20:14 +0000 Subject: [PATCH 72/80] rewind submodules --- sources/pmm-qa/src/github.com/percona/pmm-qa | 2 +- sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/pmm-qa/src/github.com/percona/pmm-qa b/sources/pmm-qa/src/github.com/percona/pmm-qa index c8ca59ef9655..4581ff609ce0 160000 --- a/sources/pmm-qa/src/github.com/percona/pmm-qa +++ b/sources/pmm-qa/src/github.com/percona/pmm-qa @@ -1 +1 @@ -Subproject commit c8ca59ef96554462f4679556120f11c863c442b4 +Subproject commit 4581ff609ce0a801a0c64294e9ced58d47cf6a8c diff --git a/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests b/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests index ce92b2fa1678..3199a78d65ff 160000 --- a/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests +++ b/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests @@ -1 +1 @@ -Subproject commit ce92b2fa16781b6e7477a4b8e3964049f381cbe2 +Subproject commit 3199a78d65ffbe3f7a3dba360e0a275b8c947b2c From a4226b9af670d503200148685fb900c7b3b4f6d1 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Sat, 31 Dec 2022 19:10:10 +0000 Subject: [PATCH 73/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index d555c27de4af..7518ca0df5ec 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit d555c27de4af50df19af53d22bb4de4a86445e3a +Subproject commit 7518ca0df5ec2dd036224608e3d2ea0837f26b7a From c5dcb3cfc98ab64164f61e6a8b04f470c5d2da9e Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Mon, 2 Jan 2023 14:40:12 +0000 Subject: [PATCH 74/80] rewind submodules --- sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests b/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests index 3199a78d65ff..fbb6a36afd3e 160000 --- a/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests +++ b/sources/pmm-ui-tests/src/github.com/percona/pmm-ui-tests @@ -1 +1 @@ -Subproject commit 3199a78d65ffbe3f7a3dba360e0a275b8c947b2c +Subproject commit fbb6a36afd3e1bb606a1a1aa7e635d75e2cb048c From 055e10a0d2d83686b35817901b23b033ae5e69bb Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Mon, 2 Jan 2023 15:50:12 +0000 Subject: [PATCH 75/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index 7518ca0df5ec..d5a5ff3a1981 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit 7518ca0df5ec2dd036224608e3d2ea0837f26b7a +Subproject commit d5a5ff3a1981e7e77071e8d4b563330d15c83ba8 From 7928ba98dec0de7144e93cf731a86bb5674d3432 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Mon, 2 Jan 2023 17:10:14 +0000 Subject: [PATCH 76/80] rewind submodules --- sources/pmm/src/github.com/percona/pmm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm/src/github.com/percona/pmm b/sources/pmm/src/github.com/percona/pmm index d5a5ff3a1981..a183f04c431c 160000 --- a/sources/pmm/src/github.com/percona/pmm +++ b/sources/pmm/src/github.com/percona/pmm @@ -1 +1 @@ -Subproject commit d5a5ff3a1981e7e77071e8d4b563330d15c83ba8 +Subproject commit a183f04c431c255be41a4adf71328ded8ef75d01 From 41f99d233255f644d3d15b019b6c1aa773a905bb Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Tue, 3 Jan 2023 10:50:21 +0000 Subject: [PATCH 77/80] rewind submodules --- sources/grafana/src/github.com/grafana/grafana | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/grafana/src/github.com/grafana/grafana b/sources/grafana/src/github.com/grafana/grafana index 529472a46dd1..a2c6ad4a3945 160000 --- a/sources/grafana/src/github.com/grafana/grafana +++ b/sources/grafana/src/github.com/grafana/grafana @@ -1 +1 @@ -Subproject commit 529472a46dd1a09e6e8683ee815369a4fd09ad7f +Subproject commit a2c6ad4a39457406d798f8cb3f1b211dfbb10d3a From 83129b8a82ff5fdbf3f1bf90d872a45285aabd6a Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Tue, 3 Jan 2023 13:10:16 +0000 Subject: [PATCH 78/80] rewind submodules --- sources/grafana/src/github.com/grafana/grafana | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/grafana/src/github.com/grafana/grafana b/sources/grafana/src/github.com/grafana/grafana index a2c6ad4a3945..55c62d669c1d 160000 --- a/sources/grafana/src/github.com/grafana/grafana +++ b/sources/grafana/src/github.com/grafana/grafana @@ -1 +1 @@ -Subproject commit a2c6ad4a39457406d798f8cb3f1b211dfbb10d3a +Subproject commit 55c62d669c1dbfd6aa258d9230329bfe44a19bc4 From f63ab43e08873204352d7d8a5458df1a8a724e76 Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Tue, 3 Jan 2023 14:20:14 +0000 Subject: [PATCH 79/80] rewind submodules --- sources/pmm-qa/src/github.com/percona/pmm-qa | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/pmm-qa/src/github.com/percona/pmm-qa b/sources/pmm-qa/src/github.com/percona/pmm-qa index 4581ff609ce0..cff68717c767 160000 --- a/sources/pmm-qa/src/github.com/percona/pmm-qa +++ b/sources/pmm-qa/src/github.com/percona/pmm-qa @@ -1 +1 @@ -Subproject commit 4581ff609ce0a801a0c64294e9ced58d47cf6a8c +Subproject commit cff68717c767ca48e7423dfe2b5a341fb4105918 From afec90e26970234e9e5e95299f92ac908991c08e Mon Sep 17 00:00:00 2001 From: PMM Jenkins Date: Tue, 3 Jan 2023 14:40:17 +0000 Subject: [PATCH 80/80] rewind submodules --- sources/grafana/src/github.com/grafana/grafana | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/grafana/src/github.com/grafana/grafana b/sources/grafana/src/github.com/grafana/grafana index 55c62d669c1d..eed4b42d21f8 160000 --- a/sources/grafana/src/github.com/grafana/grafana +++ b/sources/grafana/src/github.com/grafana/grafana @@ -1 +1 @@ -Subproject commit 55c62d669c1dbfd6aa258d9230329bfe44a19bc4 +Subproject commit eed4b42d21f848193fccf29340f4f6fbf061182b