Skip to content

Commit 9c6dd5e

Browse files
committed
Trigger smoketest after publishing to s3
1 parent da1fb08 commit 9c6dd5e

File tree

3 files changed

+27
-4
lines changed

3 files changed

+27
-4
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ env:
1515
- secure: "NlnFqZs4mvCi63GqCdUNDsx9BoiyrjgoV0cUaKlhVYp49/qAMlEaKf6JABWy/oCHoWsTyysyLEtZLsWfjAyE4+FUHSzngNUHVFBbtyudA6aKQ7jMsqkcMM/K0h+ymnhHSv8bugc8jXKFgmfYk4YTi5dZgv8CAOSQFAFUaxVdYTY="
1616
# APPVEYOR_TOKEN
1717
- secure: "aHM0UWkbFN0bXQja2f9lUcSgqHzXYkYqqV8/nP5MTLKJG8BpuaLYxI4gHfkPmxSm9/TTniA3zUVN//lJTvhco5J5Dtxfo5DeCLWsjQcQxrsgAFD97FpMpGbtFAViZuiv7SdPGvzXQY6AwvteBpxOday4T224aH5OjZJ0DxySx8Q="
18+
# TRAVIS_TOKEN
19+
- secure: "K6G3SeMRMgC8JUZADyd4RKvQpgHOZb8/8kk3AlDtRWZmrBPkZpTrtcuQLYXRiEAO/beQH956i3+uDeFryF079YTJZKtdqLTxwXS53gVurOv9VVbZFubu4HzXWMWeCIi9Np7S0eB1qc4NIKB+T5pbmIfEFGKThBGK179uwf2lqQ8="
1820

1921
script:
2022
- admin/build.sh

admin/build.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,11 @@ if ($env:APPVEYOR_FORCED_BUILD -eq 'true') {
2626
ensureVersion
2727
if ($env:mode -eq 'release') {
2828
echo "Running a release for $env:version"
29+
# setup s3 credentials
30+
# run sbt s3-upload
2931
} else {
3032
echo "Unknown mode: '$env:mode'"
33+
Exit 1
3134
}
3235
} else {
3336
# By default, test building the packages (but don't uplaod)

admin/build.sh

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ function setupS3() {
6161
}
6262

6363
function triggerMsiRelease() {
64-
local jsonTemplate='{"accountName": "scala", "projectSlug": "scala-dist", "branch": "%s", "commitId": "%s", "environmentVariables": { "mode": "%s", "version": "%s" } }'
64+
local jsonTemplate='{ "accountName": "scala", "projectSlug": "scala-dist", "branch": "%s", "commitId": "%s", "environmentVariables": { "mode": "%s", "version": "%s" } }'
6565
local json=$(printf "$jsonTemplate" "$TRAVIS_BRANCH" "$TRAVIS_COMMIT" "$mode" "$version")
6666
curl \
6767
-H "Authorization: Bearer $APPVEYOR_TOKEN" \
@@ -70,22 +70,40 @@ function triggerMsiRelease() {
7070
https://ci.appveyor.com/api/builds
7171
}
7272

73+
function triggerSmoketest() {
74+
local jsonTemplate='{ "request": { "branch": "%s", "message": "Smoketest %s", "config": { "before_install": "export version=%s" } } }'
75+
local json=$(printf "$jsonTemplate" "$TRAVIS_BRANCH" "$version" "$version")
76+
77+
curl \
78+
-H "Travis-API-Version: 3" \
79+
-H "Authorization: token $TRAVIS_TOKEN" \
80+
-H "Content-Type: application/json" \
81+
-d "$json" \
82+
https://api.travis-ci.org/repo/scala%2Fscala-dist-smoketest/requests
83+
}
84+
7385
if [[ "$TRAVIS_EVENT_TYPE" == "api" ]]; then
7486
ensureVersion
75-
if [[ isManualTrigger && "$mode" == "archives" ]]; then
87+
if [[ "$mode" == "archives" ]]; then
7688
echo "Running 'archives' for $version"
7789
setupSSH
7890
ssh chara whoami
7991
# . scripts/jobs/release/website/archives
80-
elif [[ isManualTrigger && "$mode" == "update-api" ]]; then
92+
elif [[ "$mode" == "update-api" ]]; then
8193
echo "Running 'update-api' for $version"
8294
setupSSH
8395
ssh chara whoami
8496
# . scripts/jobs/release/website/update-api
85-
elif [[ isManualTrigger && "$mode" == "release" ]]; then
97+
elif [[ "$mode" == "release" ]]; then
8698
echo "Running a release for $version"
8799
triggerMsiRelease
88100
setupS3
101+
repositoriesFile="$TRAVIS_BUILD_DIR/conf/repositories"
102+
# sbt \
103+
# -Dsbt.override.build.repos=true -Dsbt.repository.config="$repositoriesFile" \
104+
# -Dproject.version=$version \
105+
# clean update s3-upload
106+
triggerSmoketest
89107
else
90108
echo "Unknown build mode: '$mode'"
91109
exit 1

0 commit comments

Comments
 (0)