forked from adriaanm/jenkins-scripts
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpublish-nightly
executable file
·45 lines (36 loc) · 1.18 KB
/
publish-nightly
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash -x
publishNightly () {
[[ $# -eq 4 ]] || {
cat <<EOM
publishNightly <publish> <jobName> <buildNr> <scaladocDir>
- <publish> if not "true" then this function does nothing
- <jobName> name of jenkins job that built the distribution
- <buildNr> build number
- <scaladocDir> the directory name to which scaladoc is published
EOM
exit 1
}
publish=$1
jobName=$2
buildNr=$3
scaladocDir=$4
[[ $publish == "true" ]] && {
rm -rf jenkins-artifacts jenkins-artifacts.tgz
wgetFile job/$jobName/$buildNr/artifact/jenkins-artifacts.tgz
tar xzf jenkins-artifacts.tgz
cd jenkins-artifacts
[[ -d dists/archives ]] || {
echo "Can't find build, has it completed? No directory at dists/archives"
exit 1
}
# Archive Scala nightly distribution
rsync -az dists/archives/ "$nightly_rsync_dest/distributions"
# publish scaladoc nightlies
rsync -az build/scaladoc/ "$nightly_rsync_dest/$scaladocDir"
# publish sbaz packages
#[[ -d dists/sbaz ]] && rsync -az dists/sbaz/ "$nightly_rsync_dest/sbaz"
# push to the maven repository
cd dists/maven/latest
ant deploy.snapshot -Dsettings.file=$maven_settings_file
}
}