File tree 2 files changed +41
-0
lines changed
2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change @@ -551,6 +551,10 @@ jobs:
551
551
run : |
552
552
./project/scripts/sbtPublish ";project scala3-bootstrapped ;publishSigned ;sonatypeBundleRelease"
553
553
554
+ - name : Trigger unmanaged community build
555
+ continue-on-error : true
556
+ run : .github/workflows/scripts/triggerUnmanagedCommunityBuild.sh "${{ secrets.BUILD_TOKEN }}" "$THISBUILD_VERSION"
557
+
554
558
nightly_documentation :
555
559
runs-on : [self-hosted, Linux]
556
560
container :
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # This is script for triggering unamanged community build upon releasing nightly version.
4
+ # Script sends request to CB Jenkins instance to start the build for given released Scala version
5
+ # Prints url of created job to stdout
6
+ #
7
+ # Requirement:
8
+ # - the latest (nightly) version of scala should be published
9
+
10
+ set -u
11
+
12
+ if [ $# -ne 2 ]; then
13
+ echo " Wrong number of script arguments, expected <token> <scala-version>, got $# : $@ "
14
+ exit 1
15
+ fi
16
+
17
+ CB_ENDPOINT=https://scala3.westeurope.cloudapp.azure.com
18
+ CB_BUILD_TOKEN=" $1 "
19
+ SCALA_VERSION=" $2 "
20
+
21
+ startRunResponse=$( curl " ${CB_ENDPOINT} /job/runBuild/buildWithParameters?token=${CB_BUILD_TOKEN} &publishedScalaVersion=${SCALA_VERSION} " -v 2>&1 )
22
+ echo " ${startRunResponse} "
23
+ queueItem=$( echo " ${startRunResponse} " | grep -oP " < Location: \K[\w\d:/.//]+" )
24
+ # Wait until Jenkins does acknowledge the build (max 1 min )
25
+ for i in {1..12}; do
26
+ buildUrl=$( curl -s " ${queueItem} /api/json?tree=executable[url]" | jq .executable.url)
27
+ if [[ " null" == " ${buildUrl} " ]]; then
28
+ echo " Waiting for build start..."
29
+ sleep 5
30
+ else
31
+ echo " Created build url: ${buildUrl} "
32
+ exit 0
33
+ fi
34
+ done
35
+
36
+ # Set error if failed to resolve build url
37
+ exit 1
You can’t perform that action at this time.
0 commit comments