Skip to content

Commit

Permalink
Move the .sh to the .yaml workflow for pmm_ps
Browse files Browse the repository at this point in the history
  • Loading branch information
panchal-yash committed Aug 7, 2023
1 parent 057d86f commit 0ec7aa0
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 41 deletions.
40 changes: 38 additions & 2 deletions .github/workflows/PMM_PS.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,21 @@ jobs:
PMM_IMAGE: ${{ github.event.inputs.pmm_image || 'perconalab/pmm-server:dev-latest' }}
steps:
- uses: actions/checkout@v2


- name: Concatenate values to environment file
run: |
echo "PS_TARBALL_PATH=https://downloads.percona.com/downloads/TESTING/ps-${{env.PS_VERSION}}/Percona-Server-${{env.PS_VERSION}}-Linux.x86_64.glibc${{env.PS_GLIBC}}.tar.gz}}" >> $GITHUB_ENV
echo "MS_TARBALL_PATH=https://dev.mysql.com/get/Downloads/MySQL-8/mysql-${{env.MS_VERSION}}-linux-glibc${{env.MS_GLIBC}}-x86_64.tar.xz" >> $GITHUB_ENV
echo "PMM_QA_REPO_URL=https://github.com/percona/pmm-qa/" >> $GITHUB_ENV
echo "PMM_QA_REPO_BRANCH=main" >> $GITHUB_ENV
- name: Check environment variable is available
run: |
echo "${{ env.PS_TARBALL_PATH }}"
echo "${{ env.MS_TARBALL_PATH }}"
echo "${{ env.PMM_QA_REPO_URL }}"
echo "${{ env.PMM_QA_REPO_BRANCH }}"
- name: Install Ansible and update the node
run: sudo apt-get update -y && sudo apt-get install ansible -y

Expand All @@ -46,5 +60,27 @@ jobs:

- name: test-pmm-ps
run: |
chmod +x start-pmm-ps.sh && ./start-pmm-ps.sh
sudo rm -r pmm-qa || true
git clone -b $PMM_QA_REPO_BRANCH $PMM_QA_REPO_URL
cd pmm-qa
# Give write perimssion to the bash script
chmod +x ./pmm-tests/pmm-framework.sh
#Run the pmm container in backgrounds
docker run --detach --restart always -p 443:443 -p 80:80 --name pmm-server $PMM_IMAGE
sudo pmm-admin config '--server-url=https://admin:admin@localhost:443' --force --log-level=debug --server-insecure-tls
#Change directory to pmm-tests
cd pmm-tests
#Run for ms version and ms client 1
./pmm-framework.sh --ms-version ms-$PS_VERSION --addclient=ms,1 --pmm2 --ms-tarball $MS_TARBALL_PATH
#Run for ps version and ps client 1
./pmm-framework.sh --ps-version ps-$PS_VERSION --addclient=ps,1 --pmm2 --ms-tarball $PS_TARBALL_PATH
working-directory: ./pmm_ps_setup
39 changes: 0 additions & 39 deletions pmm_ps_setup/start-pmm-ps.sh

This file was deleted.

0 comments on commit 0ec7aa0

Please sign in to comment.