summaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
Diffstat (limited to 'jjb')
-rwxr-xr-xjjb/apex/apex-deploy.sh7
-rw-r--r--jjb/apex/apex-snapshot-create.sh23
-rwxr-xr-xjjb/apex/apex-upload-artifact.sh9
-rw-r--r--jjb/apex/apex.yml54
4 files changed, 76 insertions, 17 deletions
diff --git a/jjb/apex/apex-deploy.sh b/jjb/apex/apex-deploy.sh
index 63baa5783..29468992e 100755
--- a/jjb/apex/apex-deploy.sh
+++ b/jjb/apex/apex-deploy.sh
@@ -183,10 +183,13 @@ if [[ "$JOB_NAME" == *virtual* ]]; then
# settings for virtual deployment
DEPLOY_CMD="${DEPLOY_CMD} -v"
if [[ "${DEPLOY_SCENARIO}" =~ fdio|ovs ]]; then
- DEPLOY_CMD="${DEPLOY_CMD} --virtual-ram 14"
+ DEPLOY_CMD="${DEPLOY_CMD} --virtual-default-ram 14 --virtual-compute-ram 8"
fi
if [[ "$JOB_NAME" == *csit* ]]; then
- DEPLOY_CMD="${DEPLOY_CMD} -e csit-environment.yaml --virtual-computes 2"
+ DEPLOY_CMD="${DEPLOY_CMD} -e csit-environment.yaml"
+ fi
+ if [[ "$JOB_NAME" == *promote* ]]; then
+ DEPLOY_CMD="${DEPLOY_CMD} --virtual-computes 2"
fi
else
# settings for bare metal deployment
diff --git a/jjb/apex/apex-snapshot-create.sh b/jjb/apex/apex-snapshot-create.sh
index f146dd810..b2a39449e 100644
--- a/jjb/apex/apex-snapshot-create.sh
+++ b/jjb/apex/apex-snapshot-create.sh
@@ -13,6 +13,7 @@ set -o nounset
set -o pipefail
SSH_OPTIONS=(-o StrictHostKeyChecking=no -o GlobalKnownHostsFile=/dev/null -o UserKnownHostsFile=/dev/null -o LogLevel=error)
+SNAP_TYPE=$(echo ${JOB_NAME} | sed -n 's/^apex-\(.\+\)-promote.*$/\1/p')
echo "Creating Apex snapshot..."
echo "-------------------------"
@@ -81,17 +82,19 @@ sudo chown jenkins-ci:jenkins-ci *
# tar up artifacts
DATE=`date +%Y-%m-%d`
-tar czf ../apex-csit-snap-${DATE}.tar.gz .
+tar czf ../apex-${SNAP_TYPE}-snap-${DATE}.tar.gz .
popd > /dev/null
sudo rm -rf ${tmp_dir}
-echo "Snapshot saved as apex-csit-snap-${DATE}.tar.gz"
+echo "Snapshot saved as apex-${SNAP_TYPE}-snap-${DATE}.tar.gz"
# update opnfv properties file
-curl -O -L http://$GS_URL/snapshot.properties
-sed -i '/^OPNFV_SNAP_URL=/{h;s#=.*#='${GS_URL}'/apex-csit-snap-'${DATE}'.tar.gz#};${x;/^$/{s##OPNFV_SNAP_URL='${GS_URL}'/apex-csit-snap-'${DATE}'.tar.gz#;H};x}' snapshot.properties
-snap_sha=$(sha512sum apex-csit-snap-${DATE}.tar.gz | cut -d' ' -f1)
-sed -i '/^OPNFV_SNAP_SHA512SUM=/{h;s/=.*/='${snap_sha}'/};${x;/^$/{s//OPNFV_SNAP_SHA512SUM='${snap_sha}'/;H};x}' snapshot.properties
-echo "OPNFV_SNAP_URL=$GS_URL/apex-csit-snap-${DATE}.tar.gz"
-echo "OPNFV_SNAP_SHA512SUM=$(sha512sum apex-csit-snap-${DATE}.tar.gz | cut -d' ' -f1)"
-echo "Updated properties file: "
-cat snapshot.properties
+if [ "$SNAP_TYPE" == 'csit' ]; then
+ curl -O -L http://$GS_URL/snapshot.properties
+ sed -i '/^OPNFV_SNAP_URL=/{h;s#=.*#='${GS_URL}'/apex-csit-snap-'${DATE}'.tar.gz#};${x;/^$/{s##OPNFV_SNAP_URL='${GS_URL}'/apex-csit-snap-'${DATE}'.tar.gz#;H};x}' snapshot.properties
+ snap_sha=$(sha512sum apex-csit-snap-${DATE}.tar.gz | cut -d' ' -f1)
+ sed -i '/^OPNFV_SNAP_SHA512SUM=/{h;s/=.*/='${snap_sha}'/};${x;/^$/{s//OPNFV_SNAP_SHA512SUM='${snap_sha}'/;H};x}' snapshot.properties
+ echo "OPNFV_SNAP_URL=$GS_URL/apex-csit-snap-${DATE}.tar.gz"
+ echo "OPNFV_SNAP_SHA512SUM=$(sha512sum apex-csit-snap-${DATE}.tar.gz | cut -d' ' -f1)"
+ echo "Updated properties file: "
+ cat snapshot.properties
+fi
diff --git a/jjb/apex/apex-upload-artifact.sh b/jjb/apex/apex-upload-artifact.sh
index ef8ad5329..15aa67a6b 100755
--- a/jjb/apex/apex-upload-artifact.sh
+++ b/jjb/apex/apex-upload-artifact.sh
@@ -76,12 +76,15 @@ gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/latest.properties > gsutil.la
uploadsnap () {
# Uploads snapshot artifact and updated properties file
echo "Uploading snapshot artifacts"
- gsutil cp $WORKSPACE/apex-csit-snap-`date +%Y-%m-%d`.tar.gz gs://$GS_URL/ > gsutil.iso.log
- gsutil cp $WORKSPACE/snapshot.properties gs://$GS_URL/snapshot.properties > gsutil.latest.log
+ SNAP_TYPE=$(echo ${JOB_NAME} | sed -n 's/^apex-\(.\+\)-promote.*$/\1/p')
+ gsutil cp $WORKSPACE/apex-${SNAP_TYPE}-snap-`date +%Y-%m-%d`.tar.gz gs://$GS_URL/ > gsutil.iso.log
+ if [ "$SNAP_TYPE" == 'csit' ]; then
+ gsutil cp $WORKSPACE/snapshot.properties gs://$GS_URL/snapshot.properties > gsutil.latest.log
+ fi
echo "Upload complete for Snapshot"
}
-if echo $WORKSPACE | grep csit > /dev/null; then
+if echo $WORKSPACE | grep promote > /dev/null; then
uploadsnap
elif gpg2 --list-keys | grep "opnfv-helpdesk@rt.linuxfoundation.org"; then
echo "Signing Key avaliable"
diff --git a/jjb/apex/apex.yml b/jjb/apex/apex.yml
index 3938f159b..126651e6c 100644
--- a/jjb/apex/apex.yml
+++ b/jjb/apex/apex.yml
@@ -14,6 +14,7 @@
- 'apex-build-colorado'
- 'apex-deploy-baremetal-os-odl_l2-fdio-ha-colorado'
- 'apex-csit-promote-daily-{stream}'
+ - 'apex-fdio-promote-daily-{stream}'
# stream: branch with - in place of / (eg. stable-arno)
# branch: branch (eg. stable/arno)
@@ -304,7 +305,7 @@
blocking-jobs:
- 'apex-daily.*'
- 'apex-verify.*'
- - 'apex-csit.*'
+ - 'apex-.*-promote.*'
builders:
- trigger-builds:
@@ -556,7 +557,7 @@
- 'apex-deploy.*'
- 'apex-build.*'
- 'apex-runner.*'
- - 'apex-csit.*'
+ - 'apex-.*-promote.*'
triggers:
- 'apex-{stream}'
@@ -961,6 +962,55 @@
- shell:
!include-raw-escape: ./apex-upload-artifact.sh
+# FDIO promote
+- job-template:
+ name: 'apex-fdio-promote-daily-{stream}'
+
+ # Job template for promoting CSIT Snapshots
+ #
+ # Required Variables:
+ # stream: branch with - in place of / (eg. stable)
+ # branch: branch (eg. stable)
+ node: '{daily-slave}'
+
+ disabled: false
+
+ scm:
+ - git-scm
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ branch: '{branch}'
+ - apex-parameter:
+ gs-pathname: '{gs-pathname}'
+
+ properties:
+ - build-blocker:
+ use-build-blocker: true
+ block-level: 'NODE'
+ blocking-jobs:
+ - 'apex-verify.*'
+ - 'apex-deploy.*'
+ - 'apex-build.*'
+ - 'apex-runner.*'
+ - 'apex-daily.*'
+
+ builders:
+ - 'apex-build'
+ - trigger-builds:
+ - project: 'apex-deploy-virtual-os-odl_l2-fdio-noha-{stream}'
+ predefined-parameters: |
+ BUILD_DIRECTORY=apex-fdio-promote-daily-{stream}
+ OPNFV_CLEAN=yes
+ git-revision: false
+ block: true
+ same-node: true
+ - shell:
+ !include-raw-escape: ./apex-snapshot-create.sh
+ - shell:
+ !include-raw-escape: ./apex-upload-artifact.sh
+
- job-template:
name: 'apex-gs-clean-{stream}'