-
Notifications
You must be signed in to change notification settings - Fork 3
152 lines (141 loc) · 4.81 KB
/
tool-crucible-ci.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
name: tool-crucible-ci
on:
workflow_call:
inputs:
ci_target:
required: true
type: string
crucible_ci_test:
required: false
type: string
ci_target_branch:
required: true
type: string
crucible_ci_test_branch:
required: false
type: string
github_workspace:
required: true
type: string
secrets:
registry_auth:
required: false
concurrency:
group: ${{ inputs.ci_target }}/${{ github.ref }}/tool-crucible-ci
cancel-in-progress: true
env:
GITHUB_WORKSPACE: ${{ inputs.github_workspace }}
jobs:
gen-params:
runs-on: ubuntu-latest
timeout-minutes: 10
outputs:
userenvs: ${{ steps.get-userenvs.outputs.userenvs }}
github_hosted_scenarios: ${{ steps.get-scenarios-github.outputs.scenarios }}
repo_name: ${{ steps.get-repo-name.outputs.repo-name }}
steps:
- name: checkout crucible-ci default
if: ${{ inputs.crucible_ci_test != 'yes' }}
uses: actions/checkout@v4
with:
repository: perftool-incubator/crucible-ci
ref: main
path: crucible-ci
- name: checkout crucible-ci crucible_ci_test
if: ${{ inputs.crucible_ci_test == 'yes' }}
uses: actions/checkout@v4
with:
repository: perftool-incubator/crucible-ci
ref: ${{ inputs.crucible_ci_test_branch }}
path: crucible-ci
- name: checkout rickshaw
uses: actions/checkout@v4
with:
repository: perftool-incubator/rickshaw
ref: master
path: rickshaw
- name: run get-userenvs
id: get-userenvs
uses: ./crucible-ci/.github/actions/get-userenvs
with:
rickshaw-directory: "./rickshaw"
- name: run get-scenarios-github
id: get-scenarios-github
uses: ./crucible-ci/.github/actions/get-scenarios
with:
runner-type: "github"
benchmark: "fio"
- name: run get-repo-name
id: get-repo-name
uses: ./crucible-ci/.github/actions/get-repo-name
display-params:
runs-on: ubuntu-latest
timeout-minutes: 10
needs: gen-params
steps:
- name: Echo gen-params outputs
run: echo "${{ toJSON(needs.gen-params.outputs) }}"
github-runners:
runs-on: ubuntu-latest
timeout-minutes: 90
needs:
- gen-params
- display-params
strategy:
fail-fast: false
matrix:
scenario: ${{ fromJSON(needs.gen-params.outputs.github_hosted_scenarios) }}
userenv: ${{ fromJSON(needs.gen-params.outputs.userenvs) }}
steps:
- name: Matrix Parameters => (${{ matrix.scenario.enabled }}, ${{ matrix.scenario.endpoint }}, ${{ matrix.scenario.benchmark }}, ${{ matrix.userenv }})
run: |
echo "enabled=${{ matrix.scenario.enabled }}"
echo "endpoint=${{ matrix.scenario.endpoint }}"
echo "benchmark=${{ matrix.scenario.benchmark }}"
echo "userenv=${{ matrix.userenv }}"
- name: checkout crucible-ci default
if: ${{ inputs.crucible_ci_test != 'yes' }}
uses: actions/checkout@v4
with:
repository: perftool-incubator/crucible-ci
ref: main
path: crucible-ci
- name: checkout crucible-ci crucible_ci_test
if: ${{ inputs.crucible_ci_test == 'yes' }}
uses: actions/checkout@v4
with:
repository: perftool-incubator/crucible-ci
ref: ${{ inputs.crucible_ci_test_branch }}
path: crucible-ci
- name: checkout tool-${{ inputs.ci_target }}
uses: actions/checkout@v4
with:
repository: perftool-incubator/tool-${{ inputs.ci_target }}
ref: ${{ inputs.ci_target_branch }}
path: "tool-${{ inputs.ci_target }}"
- name: import secret
env:
CLIENT_SERVER_REGISTRY_AUTH_SECRET: ${{ secrets.registry_auth }}
if: env.CLIENT_SERVER_REGISTRY_AUTH_SECRET != ''
run: sudo bash -c "echo \"$CLIENT_SERVER_REGISTRY_AUTH_SECRET\" > /root/crucible-ci-engines-token.json"
- name: run crucible-ci->integration-tests
if: ${{ matrix.scenario.enabled }}
uses: ./crucible-ci/.github/actions/integration-tests
with:
artifact_tag: "${{ inputs.ci_target }}__github-runners__${{ matrix.scenario.endpoint }}-${{ matrix.scenario.benchmark }}-${{ matrix.userenv }}"
ci_endpoint: "${{ matrix.scenario.endpoint }}"
scenarios: "${{ matrix.scenario.benchmark }}"
userenvs: "${{ matrix.userenv }}"
ci_target: "${{ inputs.ci_target }}"
ci_target_dir: "${{ github.workspace }}/tool-${{ inputs.ci_target }}"
- name: skip crucible-ci->integration-tests
if: ${{ ! matrix.scenario.enabled }}
run: echo "crucible-ci->integration-tests not enabled"
tool-crucible-ci-complete:
runs-on: ubuntu-latest
timeout-minutes: 10
needs:
- github-runners
steps:
- name: Confirm Success
run: echo "tool-crucible-ci-complete"