Commit 612ffc3 Dmytro Rezchykov
committed
1 parent c5d55de commit 612ffc3 Copy full SHA for 612ffc3
File tree 2 files changed +17
-2
lines changed
2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -205,6 +205,7 @@ jobs:
205
205
comment-id : ${{ github.event.inputs.comment-id }}
206
206
body : |
207
207
> :x: ${{github.event.inputs.connector}} https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
208
+ > :bug: ${{env.GRADLE_SCAN_LINK}}
208
209
# In case of self-hosted EC2 errors, remove this block.
209
210
stop-test-runner :
210
211
name : Stop Build EC2 Runner
Original file line number Diff line number Diff line change 8
8
9
9
connector=" $1 "
10
10
all_integration_tests=$( ./gradlew integrationTest --dry-run | grep ' integrationTest SKIPPED' | cut -d: -f 4)
11
-
11
+ run () {
12
12
if [[ " $connector " == " all" ]] ; then
13
13
echo " Running: ./gradlew --no-daemon --scan integrationTest"
14
14
./gradlew --no-daemon --scan integrationTest
36
36
./gradlew --no-daemon --scan " $integrationTestCommand "
37
37
else
38
38
echo " Connector '$connector ' not found..."
39
- exit 1
39
+ return 1
40
40
fi
41
41
fi
42
+ }
43
+
44
+ # Copy command output to extract gradle scan link.
45
+ run | tee build.out
46
+ # return status of "run" command, not "tee"
47
+ # https://tldp.org/LDP/abs/html/internalvariables.html#PIPESTATUSREF
48
+ run_status=${PIPESTATUS[0]}
49
+ test $run_status == " 0" || {
50
+ # Save gradle scan link to github GRADLE_SCAN_LINK variable for next job.
51
+ # https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
52
+ LINK=$( cat build.out | grep -A1 " Publishing build scan..." | tail -n1 | tr -d " \n" )
53
+ echo " GRADLE_SCAN_LINK=$LINK " >> $GITHUB_ENV
54
+ }
55
+ exit $run_status
You can’t perform that action at this time.
0 commit comments