Skip to content

Commit da1fb08

Browse files
committed
Trigger AppVeyor release from travis
1 parent 0952eba commit da1fb08

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ env:
1313
global:
1414
# PRIV_KEY_SECRET
1515
- secure: "NlnFqZs4mvCi63GqCdUNDsx9BoiyrjgoV0cUaKlhVYp49/qAMlEaKf6JABWy/oCHoWsTyysyLEtZLsWfjAyE4+FUHSzngNUHVFBbtyudA6aKQ7jMsqkcMM/K0h+ymnhHSv8bugc8jXKFgmfYk4YTi5dZgv8CAOSQFAFUaxVdYTY="
16+
# APPVEYOR_TOKEN
17+
- secure: "aHM0UWkbFN0bXQja2f9lUcSgqHzXYkYqqV8/nP5MTLKJG8BpuaLYxI4gHfkPmxSm9/TTniA3zUVN//lJTvhco5J5Dtxfo5DeCLWsjQcQxrsgAFD97FpMpGbtFAViZuiv7SdPGvzXQY6AwvteBpxOday4T224aH5OjZJ0DxySx8Q="
1618

1719
script:
1820
- admin/build.sh

admin/build.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ if ($env:APPVEYOR_FORCED_BUILD -eq 'true') {
3131
}
3232
} else {
3333
# By default, test building the packages (but don't uplaod)
34-
& sbt "-Dproject.version=2.12.0" "show s3Upload::mappings"
34+
# Need to redirect stderr, otherwise any error output (like jvm warning) fails the build (ErrorActionPreference)
35+
& cmd /c 'sbt "-Dproject.version=2.12.4" "show s3Upload::mappings"' '2>&1'
3536
checkExit
3637
}

admin/build.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,16 @@ function setupS3() {
6060
echo "setup s3"
6161
}
6262

63+
function triggerMsiRelease() {
64+
local jsonTemplate='{"accountName": "scala", "projectSlug": "scala-dist", "branch": "%s", "commitId": "%s", "environmentVariables": { "mode": "%s", "version": "%s" } }'
65+
local json=$(printf "$jsonTemplate" "$TRAVIS_BRANCH" "$TRAVIS_COMMIT" "$mode" "$version")
66+
curl \
67+
-H "Authorization: Bearer $APPVEYOR_TOKEN" \
68+
-H "Content-Type: application/json" \
69+
-d "$json" \
70+
https://ci.appveyor.com/api/builds
71+
}
72+
6373
if [[ "$TRAVIS_EVENT_TYPE" == "api" ]]; then
6474
ensureVersion
6575
if [[ isManualTrigger && "$mode" == "archives" ]]; then
@@ -74,6 +84,7 @@ if [[ "$TRAVIS_EVENT_TYPE" == "api" ]]; then
7484
# . scripts/jobs/release/website/update-api
7585
elif [[ isManualTrigger && "$mode" == "release" ]]; then
7686
echo "Running a release for $version"
87+
triggerMsiRelease
7788
setupS3
7889
else
7990
echo "Unknown build mode: '$mode'"

0 commit comments

Comments
 (0)