Stephan Herrmann | 7ad0b12 | 2018-09-13 20:11:32 +0200 | [diff] [blame] | 1 | # MANDATORY VARIABLE: |
| 2 | # BUILDID |
Stephan Herrmann | 288c70c | 2018-06-28 21:25:30 +0200 | [diff] [blame] | 3 | # OPTIONAL VARIABLES TO BE SUPPLIED VIA ENV: |
| 4 | # SIGN (unset or nosign) |
| 5 | # PROMOTE (unset or false or target directory) |
| 6 | |
| 7 | BASE=`pwd` |
| 8 | |
| 9 | # ABSOLUTE PATHS: |
| 10 | export ECOTJ_BASE=/home/data/httpd/download.eclipse.org/objectteams/ecotj |
| 11 | |
| 12 | |
| 13 | OTDTVERSION=`cat ${BASE}/testrun/build-root/src/finalFeaturesVersions.properties|grep "objectteams.otdt="|cut -d '=' -f 2` |
| 14 | if [ "${OTDTVERSION}" == "" ] |
| 15 | then |
| 16 | echo "finalFeaturesVersions.properties not found, maybe build hasn't run successfully?" |
| 17 | exit 3 |
| 18 | fi |
| 19 | echo "OTDTVERSION is $OTDTVERSION" |
| 20 | |
Stephan Herrmann | 7ad0b12 | 2018-09-13 20:11:32 +0200 | [diff] [blame] | 21 | ECOTJ_DIR=${BASE}/testrun/ecj/${BUILDID} |
Stephan Herrmann | 288c70c | 2018-06-28 21:25:30 +0200 | [diff] [blame] | 22 | |
| 23 | echo "====Step 1: request signing ====" |
| 24 | cd ${ECOTJ_DIR} |
| 25 | ECOTJ_JAR=`ls ecotj-*[0-9].jar` |
| 26 | echo "ecotj is ${ECOTJ_JAR}" |
| 27 | |
| 28 | ECOTJ_NAME="ecotj-${BUILDTYPE}-${OTDTVERSION}" |
| 29 | echo "ecotj name = ${ECOTJ_NAME}" |
| 30 | |
| 31 | curl -o ${ECOTJ_NAME}-signed.jar -F file=@${ECOTJ_JAR} http://build.eclipse.org:31338/sign |
| 32 | |
| 33 | echo "Signing completed" |
| 34 | |
| 35 | |
| 36 | echo "====Step 2: upload ====" |
| 37 | |
| 38 | if [ "${PROMOTE}" != "false" ] |
| 39 | then |
| 40 | cp ${ECOTJ_JAR} ${ECOTJ_BASE}/${ECOTJ_NAME}.jar |
| 41 | cp ${ECOTJ_NAME}-signed.jar ${ECOTJ_BASE}/ |
| 42 | ls -latr ${ECOTJ_BASE} |
| 43 | fi |
| 44 | echo "====DONE====" |