File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -108,7 +108,9 @@ jobs:
108108 - name : Collect logs
109109 if : ${{ always() }}
110110 run : |
111- ./hack/gh-workflow-ci.sh collect_logs
111+ ./hack/gh-workflow-ci.sh collect_logs \
112+ "${{ secrets.TEST_GITEA_SMEEURL }}" \
113+ "${{ secrets.TEST_GITHUB_SECOND_SMEE_URL }}"
112114
113115 - name : Upload artifacts
114116 if : ${{ always() }}
Original file line number Diff line number Diff line change @@ -125,6 +125,8 @@ run_e2e_tests() {
125125}
126126
127127collect_logs () {
128+ test_gitea_smee_url=" ${1} "
129+ github_ghe_smee_url=" ${2} "
128130 mkdir -p /tmp/logs
129131 kind export logs /tmp/logs
130132 [[ -d /tmp/gosmee-replay ]] && cp -a /tmp/gosmee-replay /tmp/logs/
@@ -142,6 +144,11 @@ collect_logs() {
142144 done
143145 kubectl -n ${ns} get events > /tmp/logs/ns/${ns} /events
144146 done
147+
148+ for url in " ${test_gitea_smee_url} " " ${github_ghe_smee_url} " ; do
149+ # shellcheck disable=SC2038
150+ find /tmp/logs -type f -exec grep -l " ${url} " {} \; | xargs -r sed -i " s|${url} |SMEE_URL|g"
151+ done
145152}
146153
147154help () {
@@ -175,7 +182,7 @@ run_e2e_tests)
175182 run_e2e_tests " ${2} " " ${3} " " ${4} " " ${5} " " ${6} " " ${7} " " ${8} " " ${9} " " ${10} " " ${11} "
176183 ;;
177184collect_logs)
178- collect_logs
185+ collect_logs " ${2} " " ${3} "
179186 ;;
180187help)
181188 help
You can’t perform that action at this time.
0 commit comments