-
Notifications
You must be signed in to change notification settings - Fork 23
33 lines (25 loc) · 1.33 KB
/
test-pr.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Test
on:
pull_request:
branches: [main]
jobs:
test:
if: ${{ !contains( github.event.pull_request.labels.*.name, 'skip ci' ) }}
runs-on: ubuntu-latest
container: icr.io/continuous-delivery/pipeline/pipeline-base-ubi:3.40
env:
HOME: /root
PIPELINE_DEBUG: 1
CP_ICR_IO_REPO: ${{ secrets.CP_ICR_IO_REPO }}
CP_ICR_IO_USERID: cp
CP_ICR_IO_PASSWORD: ${{ secrets.CP_ICR_IO_PASSWORD }}
IBM_CLOUD_API_KEY: ${{ secrets.IBM_CLOUD_API_KEY }}
environment: dev
steps:
- uses: actions/checkout@v3
- name: Determine extent of testing
run: tests/postbuild/calc-settings.sh "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}" "${GITHUB_SHA}" "${GITHUB_BASE_REF}"
- name: Ensures target cluster exists
run: tests/postbuild/cluster.sh --ensure --wait -t ibmcloud -n "gitops-${GITHUB_HEAD_REF:0:25}" --apikey "${IBM_CLOUD_API_KEY}" --workers "$(cat test-sh-workers.txt)" --worker-flavor "c3c.32x64" --global-pull-secret "$(cat test-sh-gps.txt)"
- name: Deploy Argo and Cloud Paks to the cluster
run: tests/postbuild/gitops.sh --setup-server -t ibmcloud -n "gitops-${GITHUB_HEAD_REF:0:25}" --gitops-repo "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}" --gitops-branch "${GITHUB_HEAD_REF}" --apikey "${IBM_CLOUD_API_KEY}" --application-labels "$(cat test-sh-labels.txt)"