From 804b25d9289e683684eb88e9b550b40d44da3c7a Mon Sep 17 00:00:00 2001 From: Thomas F Herbert Date: Sat, 19 Dec 2015 16:12:07 -0500 Subject: Use GS_URL as it is now defined by Jenkins and detect Jenkins job name Fix Typo Change-Id: Ib17628deac512ca37060d087509fda290a23d1ab Signed-off-by: Thomas F Herbert --- ci/build.sh | 3 +-- ci/buildovs.sh | 12 +++++------- ci/upload_artifacts.sh | 10 +++++----- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/ci/build.sh b/ci/build.sh index 5272b21..d079ad5 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -1,10 +1,9 @@ #!/bin/bash -DIR=`pwd` echo "Hello OVSNFV community!" echo "Build ovs RPM for Linux kernel data plane from master branch of OVS." -$DIR/buildovs.sh +./buildovs.sh exit 0 diff --git a/ci/buildovs.sh b/ci/buildovs.sh index b731bd1..b967c16 100755 --- a/ci/buildovs.sh +++ b/ci/buildovs.sh @@ -13,8 +13,6 @@ if [ -z ${WORKSPACE+1} ]; then # We are not being run by Jenkins. export WORKSPACE=$HOME/opnfv/ovsnfv -else - export JENKINS=true fi @@ -33,9 +31,10 @@ export BUILD_BASE=$WORKSPACE/build if [ ! -d $BUILD_BASE ] then mkdir -p $BUILD_BASE - if [ ! -f $BUILD_BASE/config ]; then - touch $BUILd_BASE/config - fi +fi + +if [ ! -f $BUILD_BASE/config ]; then + touch $BUILD_BASE/config fi export PATH=$PATH:$WORKSPACE/ci:$BUILD_BASE @@ -56,7 +55,6 @@ echo "--------------------------------------------------" echo "Build OVS RPM from upstream git $TAG" echo -mkdir -p $RPMDIR/BUILD mkdir -p $RPMDIR/RPMS mkdir -p $RPMDIR/SOURCES mkdir -p $RPMDIR/SPECS @@ -167,7 +165,7 @@ fi # copy artifacts. -if [ ! -z ${JENKINS+1} ]; then +if [ "$JOB_NAME" == "daily" ]; then upload_artifacts.sh fi diff --git a/ci/upload_artifacts.sh b/ci/upload_artifacts.sh index 765a336..848d672 100755 --- a/ci/upload_artifacts.sh +++ b/ci/upload_artifacts.sh @@ -12,13 +12,13 @@ export RPMFILE_D=openvswitch-debuginfo-$VERSION-1.x86_64.rpm export RPMFILE=openvswitch-$VERSION-1.x86_64.rpm # upload artifact and additional files to google storage -echo gsutil cp $TMP_RELEASE_DIR/$RPMFILE_D gs://artifacts.opnfv.org/ovsnfv/opnfv-$DATE-$RPMFILE_D -gsutil cp $TMP_RELEASE_DIR/$RPMFILE_D gs://artifacts.opnfv.org/ovsnfv/opnfv-$DATE-$RPMFILE_D +echo gsutil cp $TMP_RELEASE_DIR/$RPMFILE_D $GS_URL/opnfv-$DATE-$RPMFILE_D +gsutil cp $TMP_RELEASE_DIR/$RPMFILE_D $GS_URL/opnfv-$DATE-$RPMFILE_D -echo gsutil cp $TMP_RELEASE_DIR/$RPMFILE gs://artifacts.opnfv.org/ovsnfv/opnfv-$DATE-$RPMFILE -gsutil cp $TMP_RELEASE_DIR/$RPMFILE gs://artifacts.opnfv.org/ovsnfv/opnfv-$DATE-$RPMFILE +echo gsutil cp $TMP_RELEASE_DIR/$RPMFILE $GS_URL/opnfv-$DATE-$RPMFILE +gsutil cp $TMP_RELEASE_DIR/$RPMFILE $GS_URL/opnfv-$DATE-$RPMFILE echo echo "------------------------------------------------------" echo "Done!" -echo "Artifacts are available as http://artifacts.opnfv.org/ovsnfv/opnfv-$DATE-$RPMFILE" +echo "Artifacts are available as $GS_URL/opnfv-$DATE-$RPMFILE" -- cgit 1.2.3-korg