X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fgenesis%2Fgenesis-fuel.yml;h=79347b0579ccf63ca002d330e82cc1332147e3d4;hb=d69071f1fadf4e0db9c881f27c07cb527a43589e;hp=d31cba104d0a0677998221c13fac33e81c28e99f;hpb=dc420d25cb39f8dfa46786bd426840e432248523;p=releng.git diff --git a/jjb/genesis/genesis-fuel.yml b/jjb/genesis/genesis-fuel.yml index d31cba104..79347b057 100644 --- a/jjb/genesis/genesis-fuel.yml +++ b/jjb/genesis/genesis-fuel.yml @@ -10,23 +10,29 @@ installer: 'fuel' jobs: - - 'genesis-fuel-verify' + - 'genesis-fuel-verify-{stream}' - 'genesis-fuel-merge' - 'genesis-fuel-daily-{stream}' - - 'genesis-fuel-build' - - 'genesis-fuel-deploy' + - 'genesis-fuel-build-{stream}' + - 'genesis-fuel-deploy-{stream}' - 'genesis-fuel-deploy-virtual' + # stream: branch with - in place of / (eg. stable-arno) + # branch: branch (eg. stable/arno) stream: - master: branch: 'master' + gs-pathname: '' + - stable-arno: + branch: 'stable/arno' + gs-pathname: '/arno' ######################## # job templates ######################## - job-template: - name: 'genesis-fuel-verify' + name: 'genesis-fuel-verify-{stream}' project-type: freestyle @@ -49,9 +55,10 @@ - project-parameter: project: '{project}' - gerrit-parameter: - branch: 'master' + branch: '{branch}' - fuel-parameter: installer: '{installer}' + gs-pathname: '{gs-pathname}' scm: - gerrit-trigger-scm: @@ -80,7 +87,7 @@ project-pattern: 'genesis' branches: - branch-compare-type: 'ANT' - branch-pattern: '**/master' + branch-pattern: '**/{branch}' file-paths: - compare-type: ANT pattern: 'common/**' @@ -118,6 +125,7 @@ branch: 'master' - fuel-parameter: installer: '{installer}' + gs-pathname: '' scm: - gerrit-trigger-scm: @@ -165,15 +173,13 @@ project: '{project}' - fuel-parameter: installer: '{installer}' + gs-pathname: '{gs-pathname}' scm: - git-scm: credentials-id: '{ssh-credentials}' refspec: '' - branch: master - - triggers: - - timed: '@midnight' + branch: '{branch}' logrotate: daysToKeep: 30 @@ -183,16 +189,19 @@ builders: - trigger-builds: - - project: 'genesis-fuel-build' + - project: 'genesis-fuel-build-{stream}' git-revision: true block: true - trigger-builds: - - project: 'genesis-fuel-deploy-virtual' + - project: 'genesis-fuel-deploy-{stream}' git-revision: true - block: false + block: true + - trigger-builds: + - project: 'functest-opnfv-jump-1' + block: true - job-template: - name: 'genesis-fuel-build' + name: 'genesis-fuel-build-{stream}' project-type: freestyle @@ -209,12 +218,13 @@ project: '{project}' - fuel-parameter: installer: '{installer}' + gs-pathname: '{gs-pathname}' scm: - git-scm: credentials-id: '{ssh-credentials}' refspec: '' - branch: master + branch: '{branch}' builders: - 'fuel-build' @@ -222,11 +232,11 @@ - 'fuel-workspace-cleanup' - job-template: - name: 'genesis-fuel-deploy' + name: 'genesis-fuel-deploy-{stream}' project-type: freestyle - disabled: true + disabled: false node: opnfv-jump-1 @@ -235,19 +245,34 @@ project: '{project}' - fuel-parameter: installer: '{installer}' + gs-pathname: '{gs-pathname}' + - string: + name: GIT_BASE + default: ssh://gerrit.opnfv.org:29418/$PROJECT + description: "POD1 has some issues with cloning using https so that's why GIT_BASE is overriden here again." scm: - git-scm: credentials-id: '{ssh-credentials}' refspec: '' - branch: master + branch: '{branch}' + + logrotate: + daysToKeep: 30 + numToKeep: 10 + artifactDaysToKeep: -1 + artifactNumToKeep: -1 + + builders: + - 'fuel-download-artifact' + - 'fuel-deploy' - job-template: name: 'genesis-fuel-deploy-virtual' project-type: freestyle - disabled: false + disabled: true node: ericsson-build @@ -256,6 +281,7 @@ project: '{project}' - fuel-parameter: installer: '{installer}' + gs-pathname: '' scm: - git-scm: @@ -270,7 +296,6 @@ artifactNumToKeep: -1 builders: - - 'fuel-download-artifact' - 'fuel-deploy-virtual' ######################## @@ -297,7 +322,7 @@ description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW." - string: name: GS_URL - default: artifacts.opnfv.org/$PROJECT/$INSTALLER + default: artifacts.opnfv.org/$PROJECT/$INSTALLER{gs-pathname} description: "URL to Google Storage." ######################## @@ -330,9 +355,6 @@ # list the build artifacts ls -al $BUILD_DIRECTORY - # list the contents of BUILD_OUTPUT directory - ls -al $BUILD_DIRECTORY - # save information regarding artifact into file ( echo "OPNFV_ARTIFACT_VERSION=$OPNFV_ARTIFACT_VERSION" @@ -362,16 +384,26 @@ # echo the info about artifact that is used during the deployment echo "Using $(echo $OPNFV_ARTIFACT_URL | cut -d'/' -f4) for deployment" + # create TMPDIR if it doesn't exist + export TMPDIR=$HOME/tmpdir + [[ -d $TMPDIR ]] || mkdir -p $TMPDIR + + # change permissions down to TMPDIR + chmod a+x $HOME + chmod a+x $TMPDIR + # set TOPDIR export TOPDIR=$WORKSPACE/fuel/prototypes/auto-deploy # log info to console - echo "Startint the deployment using $INSTALLER. This could take some time..." + echo "Starting the deployment using $INSTALLER. This could take some time..." echo "--------------------------------------------------------" echo # start the deployment - echo "sudo ${TOPDIR}/deploy/deploy.sh $WORKSPACE/opnfv.iso ${TOPDIR}/configs/lf_pod1/dea.yaml ${TOPDIR}/configs/lf_pod1/dha.yaml" + echo "Issuing command" + echo "sudo TMPDIR=${TMPDIR} ${TOPDIR}/deploy/deploy.sh ${WORKSPACE}/opnfv.iso ${TOPDIR}/configs/lf_pod1/dea_no-ha.yaml ${TOPDIR}/configs/lf_pod1/dha.yaml" + sudo TMPDIR=${TMPDIR} ${TOPDIR}/deploy/deploy.sh ${WORKSPACE}/opnfv.iso ${TOPDIR}/configs/lf_pod1/dea_no-ha.yaml ${TOPDIR}/configs/lf_pod1/dha.yaml echo echo "--------------------------------------------------------" @@ -387,7 +419,7 @@ set -o pipefail # log info to console - echo "Startint the deployment on virtual environment using $INSTALLER. This could take some time..." + echo "Starting the deployment on virtual environment using $INSTALLER. This could take some time..." echo "--------------------------------------------------------" echo @@ -432,13 +464,8 @@ set -o nounset set -o pipefail - # log info to console - echo "Downloading the $INSTALLER artifact. This could take some time..." - echo "--------------------------------------------------------" - echo - # get the latest.properties file in order to get info regarding latest artifact - gsutil cp gs://$GS_URL/latest.properties $WORKSPACE/latest.properties + curl -s -o $WORKSPACE/latest.properties http://$GS_URL/latest.properties # check if we got the file [[ -f latest.properties ]] || exit 1 @@ -446,8 +473,14 @@ # source the file so we get OPNFV vars source latest.properties + # log info to console + echo "Downloading the $INSTALLER artifact using URL http://$OPNFV_ARTIFACT_URL" + echo "This could take some time..." + echo "--------------------------------------------------------" + echo + # download the file - gsutil cp gs://$OPNFV_ARTIFACT_URL $WORKSPACE/opnfv.iso + curl -s -o $WORKSPACE/opnfv.iso http://$OPNFV_ARTIFACT_URL > gsutil.iso.log 2>&1 # list the file ls -al $WORKSPACE/opnfv.iso