PG-557: Update PGSM+PMM GH workflows to pick intended target branch. (#323)

pull/321/head^2
Naeem Akhter 2022-11-23 02:22:13 +05:00 committed by GitHub
parent 8e265b9bfb
commit b4ab2ccc84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 50 additions and 10 deletions

View File

@ -8,7 +8,7 @@ jobs:
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
- name: Clone QA Integration repository - name: Clone QA Integration repository
uses: actions/checkout@v2 uses: actions/checkout@v3
with: with:
repository: 'Percona-Lab/qa-integration' repository: 'Percona-Lab/qa-integration'
ref: 'main' ref: 'main'
@ -17,8 +17,16 @@ jobs:
- name: Get branch and Repo Name - name: Get branch and Repo Name
run: echo 'The branch and Repo Name is' ${{ github.head_ref }} ${{ github.actor }}/pg_stat_monitor run: echo 'The branch and Repo Name is' ${{ github.head_ref }} ${{ github.actor }}/pg_stat_monitor
- name: "Set TARGET_BRANCH variable for a PR run"
if: github.event_name == 'pull_request'
run: echo "TARGET_BRANCH=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV
- name: "Set TARGET_BRANCH variable for a PUSH run"
if: github.event_name == 'push'
run: echo "TARGET_BRANCH=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Run PMM & PGSM Setup, E2E Tests - name: Run PMM & PGSM Setup, E2E Tests
run: bash -xe ./pmm_pgsm_setup/pmm_pgsm_setup.sh --pgsql-version=11 --pgstat-monitor-branch=REL_1_1_1 run: bash -xe ./pmm_pgsm_setup/pmm_pgsm_setup.sh --pgsql-version=11 --pgstat-monitor-branch=${{ env.TARGET_BRANCH }}
- name: Get PMM-Agent Logs from the Container - name: Get PMM-Agent Logs from the Container
if: success() || failure() # run this step even if previous step failed if: success() || failure() # run this step even if previous step failed

View File

@ -8,7 +8,7 @@ jobs:
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
- name: Clone QA Integration repository - name: Clone QA Integration repository
uses: actions/checkout@v2 uses: actions/checkout@v3
with: with:
repository: 'Percona-Lab/qa-integration' repository: 'Percona-Lab/qa-integration'
ref: 'main' ref: 'main'
@ -17,8 +17,16 @@ jobs:
- name: Get branch and Repo Name - name: Get branch and Repo Name
run: echo 'The branch and Repo Name is' ${{ github.head_ref }} ${{ github.actor }}/pg_stat_monitor run: echo 'The branch and Repo Name is' ${{ github.head_ref }} ${{ github.actor }}/pg_stat_monitor
- name: "Set TARGET_BRANCH variable for a PR run"
if: github.event_name == 'pull_request'
run: echo "TARGET_BRANCH=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV
- name: "Set TARGET_BRANCH variable for a PUSH run"
if: github.event_name == 'push'
run: echo "TARGET_BRANCH=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Run PMM & PGSM Setup, E2E Tests - name: Run PMM & PGSM Setup, E2E Tests
run: bash -xe ./pmm_pgsm_setup/pmm_pgsm_setup.sh --pgsql-version=12 --pgstat-monitor-branch=REL_1_1_1 run: bash -xe ./pmm_pgsm_setup/pmm_pgsm_setup.sh --pgsql-version=12 --pgstat-monitor-branch=${{ env.TARGET_BRANCH }}
- name: Get PMM-Agent Logs from the Container - name: Get PMM-Agent Logs from the Container
if: success() || failure() # run this step even if previous step failed if: success() || failure() # run this step even if previous step failed

View File

@ -8,7 +8,7 @@ jobs:
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
- name: Clone QA Integration repository - name: Clone QA Integration repository
uses: actions/checkout@v2 uses: actions/checkout@v3
with: with:
repository: 'Percona-Lab/qa-integration' repository: 'Percona-Lab/qa-integration'
ref: 'main' ref: 'main'
@ -17,8 +17,16 @@ jobs:
- name: Get branch and Repo Name - name: Get branch and Repo Name
run: echo 'The branch and Repo Name is' ${{ github.head_ref }} ${{ github.actor }}/pg_stat_monitor run: echo 'The branch and Repo Name is' ${{ github.head_ref }} ${{ github.actor }}/pg_stat_monitor
- name: "Set TARGET_BRANCH variable for a PR run"
if: github.event_name == 'pull_request'
run: echo "TARGET_BRANCH=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV
- name: "Set TARGET_BRANCH variable for a PUSH run"
if: github.event_name == 'push'
run: echo "TARGET_BRANCH=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Run PMM & PGSM Setup, E2E Tests - name: Run PMM & PGSM Setup, E2E Tests
run: bash -xe ./pmm_pgsm_setup/pmm_pgsm_setup.sh --pgsql-version=13 --pgstat-monitor-branch=REL_1_1_1 run: bash -xe ./pmm_pgsm_setup/pmm_pgsm_setup.sh --pgsql-version=13 --pgstat-monitor-branch=${{ env.TARGET_BRANCH }}
- name: Get PMM-Agent Logs from the Container - name: Get PMM-Agent Logs from the Container
if: success() || failure() # run this step even if previous step failed if: success() || failure() # run this step even if previous step failed

View File

@ -8,7 +8,7 @@ jobs:
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
- name: Clone QA Integration repository - name: Clone QA Integration repository
uses: actions/checkout@v2 uses: actions/checkout@v3
with: with:
repository: 'Percona-Lab/qa-integration' repository: 'Percona-Lab/qa-integration'
ref: 'main' ref: 'main'
@ -17,8 +17,16 @@ jobs:
- name: Get branch and Repo Name - name: Get branch and Repo Name
run: echo 'The branch and Repo Name is' ${{ github.head_ref }} ${{ github.actor }}/pg_stat_monitor run: echo 'The branch and Repo Name is' ${{ github.head_ref }} ${{ github.actor }}/pg_stat_monitor
- name: "Set TARGET_BRANCH variable for a PR run"
if: github.event_name == 'pull_request'
run: echo "TARGET_BRANCH=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV
- name: "Set TARGET_BRANCH variable for a PUSH run"
if: github.event_name == 'push'
run: echo "TARGET_BRANCH=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Run PMM & PGSM Setup, E2E Tests - name: Run PMM & PGSM Setup, E2E Tests
run: bash -xe ./pmm_pgsm_setup/pmm_pgsm_setup.sh --pgsql-version=14 --pgstat-monitor-branch=REL_1_1_1 run: bash -xe ./pmm_pgsm_setup/pmm_pgsm_setup.sh --pgsql-version=14 --pgstat-monitor-branch=${{ env.TARGET_BRANCH }}
- name: Get PMM-Agent Logs from the Container - name: Get PMM-Agent Logs from the Container
if: success() || failure() # run this step even if previous step failed if: success() || failure() # run this step even if previous step failed

View File

@ -8,7 +8,7 @@ jobs:
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
- name: Clone QA Integration repository - name: Clone QA Integration repository
uses: actions/checkout@v2 uses: actions/checkout@v3
with: with:
repository: 'Percona-Lab/qa-integration' repository: 'Percona-Lab/qa-integration'
ref: 'main' ref: 'main'
@ -17,8 +17,16 @@ jobs:
- name: Get branch and Repo Name - name: Get branch and Repo Name
run: echo 'The branch and Repo Name is' ${{ github.head_ref }} ${{ github.actor }}/pg_stat_monitor run: echo 'The branch and Repo Name is' ${{ github.head_ref }} ${{ github.actor }}/pg_stat_monitor
- name: "Set TARGET_BRANCH variable for a PR run"
if: github.event_name == 'pull_request'
run: echo "TARGET_BRANCH=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV
- name: "Set TARGET_BRANCH variable for a PUSH run"
if: github.event_name == 'push'
run: echo "TARGET_BRANCH=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Run PMM & PGSM Setup, E2E Tests - name: Run PMM & PGSM Setup, E2E Tests
run: bash -xe ./pmm_pgsm_setup/pmm_pgsm_setup.sh --pgsql-version=15 --pgstat-monitor-branch=REL_1_1_1 run: bash -xe ./pmm_pgsm_setup/pmm_pgsm_setup.sh --pgsql-version=15 --pgstat-monitor-branch=${{ env.TARGET_BRANCH }}
- name: Get PMM-Agent Logs from the Container - name: Get PMM-Agent Logs from the Container
if: success() || failure() # run this step even if previous step failed if: success() || failure() # run this step even if previous step failed