forked from cms-sw/cms-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
upload-release
executable file
·35 lines (29 loc) · 1.13 KB
/
upload-release
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
#!/bin/sh -ex
# This script assumes that the release is built without errors in the directory
# /build/cmsbuild/auto-builds/$CMSSW_X_Y_Z-$ARCHITECTURE/build
# CMSSW_X_Y_Z: the release to upload
# ARCHITECTURE: architecture for the upload
# ISSUE_NUMBER: the number of the issue that triggered the upload
# DRY_RUN_PARAM: parameter that to use dry-run
CMSSW_X_Y_Z=not-assigned
ARCHITECTURE=not-assigned
ISSUE_NUMBER=not-assigned
DRY_RUN_PARAM=not-assigned
BUILD_NUMBER=not-assigned
WORKSPACE=${WORKSPACE-"/build/cmsbuild/auto-builds/$CMSSW_X_Y_Z-$ARCHITECTURE/"}
HERE=$WORKSPACE/build
BUILD_DIR=$HERE/$CMSSW_X_Y_Z-build
case $CMSSW_X_Y_Z in
*patch*)
PATCH='-patch';;
*)
/afs/cern.ch/cms/sdt/internal/scripts/requestNewAfsSpace.py --platform $ARCHITECTURE --version $CMSSW_X_Y_Z;
;;
esac
WORKER=`hostname -s`
# the jenkins build number is the one of the job in jenkins doing the upload
$WORKSPACE/report-build-release-status $BUILD_NUMBER $WORKER $ISSUE_NUMBER $ARCHITECTURE $CMSSW_X_Y_Z UPLOADING $DRY_RUN_PARAM
pushd $BUILD_DIR
PKGTOOLS/cmsBuild --architecture=$ARCHITECTURE --sync-back upload cmssw$PATCH
popd
echo 'ALL_OK'