Skip to content
This repository was archived by the owner on Feb 23, 2018. It is now read-only.

fixes to publishing nighlies #126

Merged
merged 1 commit into from
Aug 8, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 21 additions & 13 deletions archive-nightly
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,36 @@ mkdir jenkins-artifacts
# publish-nightly publishes scaladoc, distribution archives
[[ -d build/scaladoc ]] && {
mkdir -p jenkins-artifacts/build
rsync -rlv build/scaladoc jenkins-artifacts/build/
}
[[ -d dists/archives ]] && {
mkdir -p jenkins-artifacts/dists
rsync -rlv dists/archives jenkins-artifacts/dists/
rsync -rl build/scaladoc jenkins-artifacts/build/
}

# since 2.11.x, we don't publish nightly archives anymore (tgz/zip etc). commenting
# this out also stops publishing archiving them for 2.10.x
#[[ -d dists/archives ]] && {
# mkdir -p jenkins-artifacts/dists
# rsync -rl dists/archives jenkins-artifacts/dists/
#}

# sbaz is long gone.
#[[ -d dists/sbaz ]] && {
# mkdir -p jenkins-artifacts/dists
# rsync -rlv dists/sbaz jenkins-artifacts/dists/
# rsync -rl dists/sbaz jenkins-artifacts/dists/
#}

# publish-nightly publishes maven artifacts
[[ -d dists/maven ]] && {
# publish-nightly publishes maven artifacts. this is still in use for 2.10.x.
# for 2.11.x and later, maven nightlies are published directly in scala-nightly-main.
# the dists/maven/latest/build.xml file does not exist for 2.11.x and later, so we test on that.
[[ -e dists/maven/latest/build.xml ]] && {
mkdir -p jenkins-artifacts/dists
rsync -rlv dists/maven jenkins-artifacts/dists/
rsync -rl dists/maven jenkins-artifacts/dists/
}

# scala-nightly-signatures checks signatures of scala-library.jar
[[ -e dists/latest/lib/scala-library.jar ]] && {
mkdir -p jenkins-artifacts/dists/latest/lib
cp dists/latest/lib/scala-library.jar jenkins-artifacts/dists/latest/lib/scala-library.jar
}
# disabled - scala-nighlty-signatures is disabled for months.
#[[ -e dists/latest/lib/scala-library.jar ]] && {
# mkdir -p jenkins-artifacts/dists/latest/lib
# cp dists/latest/lib/scala-library.jar jenkins-artifacts/dists/latest/lib/scala-library.jar
#}

tar czf jenkins-artifacts.tgz jenkins-artifacts
rm -rf jenkins-artifacts
9 changes: 7 additions & 2 deletions job/scala-nightly-main
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@ scriptsDir="$( cd "$( dirname "$0" )/.." && pwd )"
$scriptsDir/build
savedState=$?

if grep -q '<target name="publish"' build.xml; then
# on 2.10.x, publishing to maven is not done here. instead, the archive-nightly task (below)
# saves the files in dists/maven/latest, and the downstream job (archive-nightly) will do the
# publishing.
# this has changed 2.11.x, maven publishing is part of the main build.xml. so we do it here,
# easier than fixing up the archive-nightly script.
[[ $publish == "true" ]] && grep -q '<target name="publish"' build.xml && {
ant publish
savedStatePublish=$?
fi
}

$scriptsDir/archive-nightly
exit $(($savedState || $savedStatePublish))
14 changes: 5 additions & 9 deletions publish-nightly
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,16 @@ EOM

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 (no-op by now, we no longer publish nightly tgz/zip/...)
[[ -d dists/archives ]] && {
rsync -az dists/archives/ "$nightly_rsync_dest/distributions"
}

# Archive Scala nightly distribution
rsync -az dists/archives/ "$nightly_rsync_dest/distributions"

# publish scaladoc nightlies
rsync -az build/scaladoc/ "$nightly_rsync_dest/$scaladocDir"

# push to the maven repository
# in master, we've already published during the main job
if [[ "$jobName" != *-master ]]; then
# push to the maven repository. in 2.11.x and above, we've already published during the main job
[[ -e dists/maven/latest/build.xml ]]; then
cd dists/maven/latest
ant deploy -Dsettings.file=$maven_settings_file
fi
Expand Down