mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Script to copy windows installers from jenkins jobs
This commit is contained in:
committed by
Sashko Stubailo
parent
9d1c10aae2
commit
ee33b9336f
37
scripts/admin/copy-windows-installer-from-jenkins.sh
Executable file
37
scripts/admin/copy-windows-installer-from-jenkins.sh
Executable file
@@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Requires s3cmd to be installed and an appropriate ~/.s3cfg.
|
||||
# Usage:
|
||||
# scripts/admin/copy-windows-installer-from-jenkins.sh BUILDNUMBER
|
||||
# where BUILDNUMBER is the small integer Jenkins build number.
|
||||
|
||||
set -e
|
||||
set -u
|
||||
|
||||
cd "`dirname "$0"`"
|
||||
|
||||
TARGET="s3://meteor-windows/installers/"
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "usage: $0 jenkins-build-number" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DIRNAME=$(s3cmd ls s3://com.meteor.jenkins/ | perl -nle 'print $1 if m!/(installer-windows-.+-.+-.+--'$1'--.+)/!')
|
||||
RELEASE=$(echo $DIRNAME | perl -pe 's/^installer-windows-([^-]+)-.*$/$1/')
|
||||
|
||||
if [ -z "$DIRNAME" ]; then
|
||||
echo "build not found" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo Found build $DIRNAME
|
||||
|
||||
if ! s3cmd info s3://com.meteor.jenkins/$DIRNAME/InstallMeteor.exe
|
||||
then
|
||||
echo "InstallMeteor.exe wasn't found in $DIRNAME, did Jenkins job fail?"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
s3cmd -P cp -r s3://com.meteor.jenkins/$DIRNAME/ $TARGET$RELEASE/
|
||||
|
||||
Reference in New Issue
Block a user