31
31
commit_sha=$(cat gh_context.json | jq -r '.event.pull_request.head.sha')
32
32
fi
33
33
echo "commit_sha=${commit_sha}" >> "$GITHUB_ENV"
34
- mkdir ${{ env.commit_sha }}-${{inputs.qe-type}}-${{inputs.preset}}
35
- cd ${{ env.commit_sha }}-${{inputs.qe-type}}-${{inputs.preset}}
36
34
37
35
# the target can only be accessed through a bastion (which can only be accessed from self-hosted runner)
38
36
# as so we need to map the ssh-agent from the host to the containers used to access the target host
43
41
ssh-add id_rsa
44
42
45
43
- name : reserve machine from testing farm
46
- working-directory : ${{ env.commit_sha }}-${{inputs.qe-type}}-${{inputs.preset}}
47
44
env :
48
45
TESTING_FARM_API_TOKEN : ${{ secrets.TESTING_FARM_API_TOKEN }}
49
46
PULL_SECRET : ${{ secrets.PULL_SECRET }}
@@ -72,15 +69,13 @@ jobs:
72
69
exit
73
70
74
71
- name : Download linux binary
75
- working-directory : ${{ env.commit_sha }}-${{inputs.qe-type}}-${{inputs.preset}}
76
72
uses : actions/download-artifact@v4
77
73
with :
78
74
name : linux-binary
79
75
run-id : ${{inputs.trigger-workflow-run-id}}
80
76
github-token : ${{ github.token }}
81
77
82
78
- name : Download qe oci image
83
- working-directory : ${{ env.commit_sha }}-${{inputs.qe-type}}-${{inputs.preset}}
84
79
id : download-qe-oci-image-artifact
85
80
uses : actions/download-artifact@v4
86
81
with :
104
99
-d "${data}"
105
100
106
101
- name : Install CRC on host
107
- working-directory : ${{ env.commit_sha }}-${{inputs.qe-type}}-${{inputs.preset}}
108
102
run : |
109
103
podman run --rm -d --privileged --name crc-linux-install-${{ env.commit_sha }}-${{inputs.qe-type}}-${{inputs.preset}} \
110
104
-e TARGET_HOST=$(cat host) \
@@ -129,7 +123,6 @@ jobs:
129
123
podman logs -f crc-linux-install-${{ env.commit_sha }}-${{inputs.qe-type}}-${{inputs.preset}}
130
124
131
125
- name : Run CRC ${{inputs.qe-type}} test
132
- working-directory : ${{ env.commit_sha }}-${{inputs.qe-type}}-${{inputs.preset}}
133
126
run : |
134
127
# load image
135
128
podman load -i crc-${{inputs.qe-type}}-linux-arm64.tar
@@ -161,7 +154,6 @@ jobs:
161
154
podman logs -f crc-${{ env.commit_sha }}-${{inputs.qe-type}}-${{inputs.preset}}
162
155
163
156
- name : Test Report
164
- working-directory : ${{ env.commit_sha }}-${{inputs.qe-type}}-${{inputs.preset}}
165
157
id : test-report
166
158
uses : mikepenz/action-junit-report@v4
167
159
if : always()
@@ -173,7 +165,6 @@ jobs:
173
165
report_paths : ' **/*.xml'
174
166
175
167
- name : Upload e2e results
176
- working-directory : ${{ env.commit_sha }}-${{inputs.qe-type}}-${{inputs.preset}}
177
168
uses : actions/upload-artifact@v4
178
169
if : always()
179
170
with :
@@ -205,13 +196,10 @@ jobs:
205
196
- name : Return machine and clear env
206
197
env :
207
198
TESTING_FARM_API_TOKEN : ${{ secrets.TESTING_FARM_API_TOKEN }}
208
- working-directory : ${{ env.commit_sha }}-${{inputs.qe-type}}-${{inputs.preset}}
209
199
run : |
210
200
export TESTING_FARM_API_TOKEN=${TESTING_FARM_API_TOKEN}
211
201
testing-farm cancel $(cat requestid)
212
202
kill $(cat ${{ env.commit_sha }}-${{inputs.qe-type}}-${{inputs.preset}}/ssh_agent_pid)
213
- cd ..
214
- rm -r ${{ env.commit_sha }}-${{inputs.qe-type}}-${{inputs.preset}}
215
203
216
204
217
205
0 commit comments