-
Notifications
You must be signed in to change notification settings - Fork 44
61 lines (56 loc) · 2.75 KB
/
BM-end-to-end.yaml
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: BM Ansible Script E2E Test
on:
# This workflow would run at 1 AM every day
schedule:
- cron: '0 1 * * *'
pull_request:
branches: [ '**' ]
permissions:
contents: read
env:
CI_CNO_ANSIBLE_FOLDER: /usr/src/ci_cno_ansible_telemetry_scheduler
CI_CNO_TAS_FOLDER: /usr/src/telemetry-scheduler
jobs:
exit-trigger:
if: ( !contains(github.repository, '/platform-aware-scheduling') )
uses: ./.github/workflows/bm-job-exit-trigger.yaml
with:
runson: self-hosted-ansible
pull-ci:
needs: [ exit-trigger ]
if: ${{ needs.exit-trigger.outputs.ansible-dir != '' || needs.exit-trigger.outputs.cno-ci-repo-name != '' || needs.exit-trigger.outputs.cno-ci-branch-name != '' }}
uses: ./.github/workflows/checkout-cno-ci-repo-job.yaml
with:
runson: self-hosted-ansible
ci-cno-ansible-folder: /usr/src/ci_cno_ansible_telemetry_scheduler
ci-cno-repo-name: ${{ needs.exit-trigger.outputs.cno-ci-repo-name }}
ci-cno-branch-name: ${{ needs.exit-trigger.outputs.cno-ci-branch-name }}
secrets:
CNO_CI_TOKEN: ${{ secrets.PASSWORD_PAT_CNO_CI }}
pull-tas:
needs: [ pull-ci ]
uses: ./.github/workflows/checkout-tas-repo-job.yaml
with:
runson: self-hosted-ansible
ci-cno-tas-ansible-folder: /usr/src/telemetry-scheduler
runscripts:
name: Run ansible scripts for E2E
needs: [ pull-ci, pull-tas ]
runs-on: self-hosted-ansible
defaults:
run:
working-directory: ${{ env.CI_CNO_ANSIBLE_FOLDER }}
env:
CI_CNO_PLAYBOOK_COMMON_FOLDER: /usr/src/ci_cno_ansible_telemetry_scheduler/playbooks/common
CI_CNO_PLAYBOOK_TAS_FOLDER: /usr/src/ci_cno_ansible_telemetry_scheduler/playbooks/tas
ANSIBLE_TELEMETRY_FOLDER_DESTINATION_PARAM: "destination_dir=/usr/src/telemetry-scheduler"
ANSIBLE_TAS_FOLDER_DESTINATION_PARAM: "destination_dir=/usr/src/telemetry-scheduler/telemetry-aware-scheduling/"
steps:
- name: BM Build & test TAS
run: ansible-playbook -i ${{ env.CI_CNO_ANSIBLE_FOLDER }}/inventory_cni.ini ${{ env.CI_CNO_PLAYBOOK_TAS_FOLDER }}/build.yml -e ${{ env.ANSIBLE_TAS_FOLDER_DESTINATION_PARAM }}
- name: BM Smoke Test
run: ansible-playbook -i ${{ env.CI_CNO_ANSIBLE_FOLDER }}/inventory_cni.ini ${{ env.CI_CNO_PLAYBOOK_TAS_FOLDER }}/smokeTest.yml -e ${{ env.ANSIBLE_TAS_FOLDER_DESTINATION_PARAM }}
- name: BM Clean-up TAS
run: ansible-playbook -i ${{ env.CI_CNO_ANSIBLE_FOLDER }}/inventory_cni.ini ${{ env.CI_CNO_PLAYBOOK_TAS_FOLDER }}/clusterCleanup.yml -e ${{ env.ANSIBLE_TAS_FOLDER_DESTINATION_PARAM }}
- name: BM Clean-up
run: ansible-playbook -i ${{ env.CI_CNO_ANSIBLE_FOLDER }}/inventory_cni.ini ${{ env.CI_CNO_PLAYBOOK_COMMON_FOLDER }}/commonCleanup.yml -e ${{ env.ANSIBLE_TELEMETRY_FOLDER_DESTINATION_PARAM }}