Skip to content

Add pmm ps basic workflow setup #30

Add pmm ps basic workflow setup

Add pmm ps basic workflow setup #30

Workflow file for this run

name: PMM_PS
on:
workflow_dispatch:
inputs:
ps_version:
description: "ps version"
required: true
ms_version:
description: "ms version"
required: true
pmm_image:
description: "pmm_image"
required: false
push:
branches:
- add-pmm-ps-basic-workflow-script
pull_request:
branches:
- main
jobs:
test_pmm_ps:
runs-on: ubuntu-20.04
timeout-minutes: 20
env:
PS_VERSION: ${{ github.event.inputs.ps_version || '8.0.32-24' }}
PS_GLIBC: ${{ github.event.inputs.ps_glibc || '2.28' }}
MS_VERSION: ${{ github.event.inputs.ms_version || '8.0.32' }}
MS_GLIBC: ${{ github.event.inputs.ms_glibc || '2.12' }}
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
- name: Install Percona Release Package
run: wget https://repo.percona.com/apt/percona-release_latest.generic_all.deb && sudo dpkg -i percona-release_latest.generic_all.deb
- name: Install Enable percona-release experimental for dev-latest installation of pmm2-client
run: sudo percona-release enable-only original experimental
- name: Install PMM Client
run: sudo apt update -y && sudo apt-get upgrade -y && sudo apt-get install -y pmm2-client
- name: test-pmm-ps
run: |
# Delete if the Repo already checkedout
sudo rm -r pmm-qa || true
git clone -b $${{ env.PMM_QA_REPO_BRANCH }} ${{ env.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 ${{ env.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-${{ env.PS_VERSION }} --addclient=ms,1 --pmm2 --ms-tarball ${{ env.MS_TARBALL_PATH }}
#Run for ps version and ps client 1
./pmm-framework.sh --ps-version ps-${{ env.PS_VERSION }} --addclient=ps,1 --pmm2 --ms-tarball ${{ env.PS_TARBALL_PATH}}