summaryrefslogtreecommitdiffstats
path: root/jjb/daisy4nfv
diff options
context:
space:
mode:
Diffstat (limited to 'jjb/daisy4nfv')
-rw-r--r--jjb/daisy4nfv/daisy-daily-jobs.yml199
-rwxr-xr-xjjb/daisy4nfv/daisy-deploy.sh63
-rw-r--r--jjb/daisy4nfv/daisy-project-jobs.yml232
-rwxr-xr-xjjb/daisy4nfv/daisy4nfv-build.sh1
-rwxr-xr-xjjb/daisy4nfv/daisy4nfv-download-artifact.sh23
-rw-r--r--jjb/daisy4nfv/daisy4nfv-merge-jobs.yml160
-rw-r--r--jjb/daisy4nfv/daisy4nfv-verify-jobs.yml134
-rwxr-xr-xjjb/daisy4nfv/daisy4nfv-virtual-deploy.sh29
8 files changed, 620 insertions, 221 deletions
diff --git a/jjb/daisy4nfv/daisy-daily-jobs.yml b/jjb/daisy4nfv/daisy-daily-jobs.yml
new file mode 100644
index 000000000..ffae70f8f
--- /dev/null
+++ b/jjb/daisy4nfv/daisy-daily-jobs.yml
@@ -0,0 +1,199 @@
+# jenkins job templates for Daisy
+# TODO
+# [ ] enable baremetal jobs after baremetal deployment finish
+# [ ] enable jobs in danuble
+# [ ] add more scenarios
+# [ ] integration with yardstick
+
+- project:
+
+ name: 'daisy'
+ project: '{name}'
+ installer: '{name}'
+
+#--------------------------------
+# BRANCH ANCHORS
+#--------------------------------
+ master: &master
+ stream: master
+ branch: '{stream}'
+ disabled: false
+ gs-pathname: ''
+#--------------------------------
+# POD, INSTALLER, AND BRANCH MAPPING
+#--------------------------------
+# CI PODs
+#--------------------------------
+ pod:
+ - baremetal:
+ slave-label: daisy-baremetal
+ <<: *master
+ - virtual:
+ slave-label: daisy-virtual
+ <<: *master
+#--------------------------------
+# None-CI PODs
+#--------------------------------
+
+#--------------------------------
+# scenarios
+#--------------------------------
+ scenario:
+ # HA scenarios
+ - 'os-nosdn-nofeature-ha':
+ auto-trigger-name: 'daisy-{scenario}-{pod}-daily-{stream}-trigger'
+ # NOHA scenarios
+ - 'os-nosdn-nofeature-noha':
+ auto-trigger-name: 'daisy-{scenario}-{pod}-daily-{stream}-trigger'
+
+ jobs:
+ - '{project}-{scenario}-{pod}-daily-{stream}'
+ - '{project}-deploy-{pod}-daily-{stream}'
+
+########################
+# job templates
+########################
+- job-template:
+ name: '{project}-{scenario}-{pod}-daily-{stream}'
+
+ disabled: '{obj:disabled}'
+
+ concurrent: false
+
+ properties:
+ - logrotate-default
+ - throttle:
+ enabled: true
+ max-total: 4
+ max-per-node: 1
+ option: 'project'
+ - build-blocker:
+ use-build-blocker: true
+ blocking-jobs:
+ - 'daisy.*-deploy-({pod})?-daily-.*'
+ block-level: 'NODE'
+
+ wrappers:
+ - build-name:
+ name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
+
+ triggers:
+ - '{auto-trigger-name}'
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ branch: '{branch}'
+ - '{installer}-defaults'
+ - '{slave-label}-defaults':
+ installer: '{installer}'
+ - string:
+ name: DEPLOY_SCENARIO
+ default: '{scenario}'
+ - 'daisy-project-parameter':
+ gs-pathname: '{gs-pathname}'
+
+ builders:
+ - description-setter:
+ description: "POD: $NODE_NAME"
+ - trigger-builds:
+ - project: 'daisy-deploy-{pod}-daily-{stream}'
+ current-parameters: false
+ predefined-parameters:
+ DEPLOY_SCENARIO={scenario}
+ same-node: true
+ block: true
+ - trigger-builds:
+ - project: 'functest-daisy-{pod}-daily-{stream}'
+ current-parameters: false
+ predefined-parameters:
+ DEPLOY_SCENARIO={scenario}
+ same-node: true
+ block: true
+ block-thresholds:
+ build-step-failure-threshold: 'never'
+ failure-threshold: 'never'
+ unstable-threshold: 'FAILURE'
+
+- job-template:
+ name: '{project}-deploy-{pod}-daily-{stream}'
+
+ disabled: '{obj:disabled}'
+
+ concurrent: true
+
+ properties:
+ - logrotate-default
+ - throttle:
+ enabled: true
+ max-total: 4
+ max-per-node: 1
+ option: 'project'
+ - build-blocker:
+ use-build-blocker: true
+ blocking-jobs:
+ - 'daisy.*-deploy-({pod})?-daily-.*'
+ block-level: 'NODE'
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ branch: '{branch}'
+ - '{installer}-defaults'
+ - '{slave-label}-defaults':
+ installer: '{installer}'
+ - string:
+ name: DEPLOY_SCENARIO
+ default: 'os-nosdn-nofeature-ha'
+ - 'daisy-project-parameter':
+ gs-pathname: '{gs-pathname}'
+ - string:
+ name: DEPLOY_TIMEOUT
+ default: '150'
+ description: 'Deployment timeout in minutes'
+
+ scm:
+ - git-scm
+
+ wrappers:
+ - build-name:
+ name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
+
+ builders:
+ - description-setter:
+ description: "POD: $NODE_NAME"
+ - shell:
+ !include-raw-escape: ./daisy4nfv-download-artifact.sh
+ - shell:
+ !include-raw-escape: ./daisy-deploy.sh
+
+
+########################
+# trigger macros
+########################
+#-----------------------------------------------
+# Triggers for job running on daisy-baremetal against master branch
+#-----------------------------------------------
+# HA Scenarios
+- trigger:
+ name: 'daisy-os-nosdn-nofeature-ha-baremetal-daily-master-trigger'
+ triggers:
+ - timed: ''
+# NOHA Scenarios
+- trigger:
+ name: 'daisy-os-nosdn-nofeature-noha-baremetal-daily-master-trigger'
+ triggers:
+ - timed: ''
+#-----------------------------------------------
+# Triggers for job running on daisy-virtual against master branch
+#-----------------------------------------------
+- trigger:
+ name: 'daisy-os-nosdn-nofeature-ha-virtual-daily-master-trigger'
+ triggers:
+ - timed: ''
+# NOHA Scenarios
+- trigger:
+ name: 'daisy-os-nosdn-nofeature-noha-virtual-daily-master-trigger'
+ triggers:
+ - timed: 'H 8,22 * * *'
+
diff --git a/jjb/daisy4nfv/daisy-deploy.sh b/jjb/daisy4nfv/daisy-deploy.sh
new file mode 100755
index 000000000..b512e3f60
--- /dev/null
+++ b/jjb/daisy4nfv/daisy-deploy.sh
@@ -0,0 +1,63 @@
+#!/bin/bash
+set -o nounset
+set -o pipefail
+
+echo "--------------------------------------------------------"
+echo "This is $INSTALLER_TYPE deploy job!"
+echo "--------------------------------------------------------"
+
+DEPLOY_SCENARIO=${DEPLOY_SCENARIO:-"os-nosdn-nofeature-ha"}
+BRIDGE=${BRIDGE:-pxebr}
+LAB_NAME=${NODE_NAME/-*}
+POD_NAME=${NODE_NAME/*-}
+deploy_ret=0
+
+if [[ ! "$NODE_NAME" =~ "-virtual" ]] && [[ ! "$LAB_NAME" =~ (zte) ]]; then
+ echo "Unsupported lab $LAB_NAME for now, Cannot continue!"
+ exit $deploy_ret
+fi
+
+# clone the securedlab repo
+cd $WORKSPACE
+BASE_DIR=$(cd ./;pwd)
+
+echo "Cloning securedlab repo $BRANCH"
+git clone ssh://jenkins-zte@gerrit.opnfv.org:29418/securedlab --quiet \
+ --branch $BRANCH
+
+# daisy ci/deploy/deploy.sh use $BASE_DIR/labs dir
+cp -r securedlab/labs .
+
+DEPLOY_COMMAND="sudo ./ci/deploy/deploy.sh -b $BASE_DIR \
+ -l $LAB_NAME -p $POD_NAME -B $BRIDGE"
+
+# log info to console
+echo """
+Deployment parameters
+--------------------------------------------------------
+Scenario: $DEPLOY_SCENARIO
+LAB: $LAB_NAME
+POD: $POD_NAME
+BRIDGE: $BRIDGE
+BASE_DIR: $BASE_DIR
+
+Starting the deployment using $INSTALLER_TYPE. This could take some time...
+--------------------------------------------------------
+Issuing command
+$DEPLOY_COMMAND
+"""
+
+# start the deployment
+$DEPLOY_COMMAND
+
+if [ $? -ne 0 ]; then
+ echo
+ echo "Depolyment failed!"
+ deploy_ret=1
+else
+ echo
+ echo "--------------------------------------------------------"
+ echo "Deployment done!"
+fi
+
+exit $deploy_ret
diff --git a/jjb/daisy4nfv/daisy-project-jobs.yml b/jjb/daisy4nfv/daisy-project-jobs.yml
new file mode 100644
index 000000000..0127ed094
--- /dev/null
+++ b/jjb/daisy4nfv/daisy-project-jobs.yml
@@ -0,0 +1,232 @@
+######################################################################
+# Add daily jobs, for buidoing, deploying and testing
+# TODO:
+# - [ ] Add yardstick and functest for test stage
+# - [x] Use daisy-baremetal-defauls for choosing baremetal deployment
+######################################################################
+
+#############################
+# Job configuration for daisy
+#############################
+- project:
+ name: daisy-project-jobs
+
+ project: 'daisy'
+
+ installer: 'daisy'
+
+ stream:
+ - master:
+ branch: '{stream}'
+ gs-pathname: ''
+ disabled: false
+ - danube:
+ branch: 'stable/{stream}'
+ gs-pathname: '/{stream}'
+ disabled: true
+
+ phase:
+ - 'build':
+ slave-label: 'opnfv-build-centos'
+ - 'deploy':
+ slave-label: 'daisy-baremetal'
+ - 'test':
+ slave-label: 'opnfv-build-centos'
+ jobs:
+ - '{installer}-daily-{stream}'
+ - '{installer}-{phase}-daily-{stream}'
+
+########################
+# job templates
+########################
+- job-template:
+ name: '{installer}-daily-{stream}'
+
+ project-type: multijob
+
+ disabled: false
+
+ concurrent: true
+
+ properties:
+ - logrotate-default
+ - throttle:
+ enabled: true
+ max-total: 4
+ option: 'project'
+
+ scm:
+ - git-scm
+
+ triggers:
+ - timed: '0 H/8 * * *'
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ branch: '{branch}'
+ - 'opnfv-build-centos-defaults'
+ - 'daisy-defaults'
+ - '{installer}-project-parameter':
+ gs-pathname: '{gs-pathname}'
+
+ wrappers:
+ - ssh-agent-wrapper
+ - timeout:
+ timeout: 360
+ fail: true
+
+ builders:
+ - description-setter:
+ description: "Built on $NODE_NAME"
+ - multijob:
+ name: build
+ condition: SUCCESSFUL
+ projects:
+ - name: '{installer}-build-daily-{stream}'
+ current-parameters: false
+ predefined-parameters: |
+ BRANCH=$BRANCH
+ GERRIT_REFSPEC=$GERRIT_REFSPEC
+ GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+ GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+ node-parameters: false
+ kill-phase-on: FAILURE
+ abort-all-job: true
+ - multijob:
+ name: deploy
+ condition: SUCCESSFUL
+ projects:
+ - name: '{installer}-deploy-daily-{stream}'
+ current-parameters: false
+ predefined-parameters: |
+ BRANCH=$BRANCH
+ GERRIT_REFSPEC=$GERRIT_REFSPEC
+ GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+ GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+ node-parameters: false
+ kill-phase-on: FAILURE
+ abort-all-job: true
+ - multijob:
+ name: test
+ condition: SUCCESSFUL
+ projects:
+ - name: '{installer}-test-daily-{stream}'
+ current-parameters: false
+ predefined-parameters: |
+ BRANCH=$BRANCH
+ GERRIT_REFSPEC=$GERRIT_REFSPEC
+ GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+ GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+ node-parameters: false
+ kill-phase-on: FAILURE
+ abort-all-job: true
+
+ publishers:
+ - '{installer}-recipients'
+
+- job-template:
+ name: '{installer}-{phase}-daily-{stream}'
+
+ disabled: '{obj:disabled}'
+
+ concurrent: true
+
+ properties:
+ - logrotate-default
+ - throttle:
+ enabled: true
+ max-total: 6
+ option: 'project'
+ - build-blocker:
+ use-build-blocker: true
+ blocking-jobs:
+ - '{installer}-.*deploy-.*'
+ block-level: 'NODE'
+
+ scm:
+ - git-scm
+
+ wrappers:
+ - ssh-agent-wrapper
+ - timeout:
+ timeout: 360
+ fail: true
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ branch: '{branch}'
+ - 'daisy-defaults'
+ - string:
+ name: GIT_BASE
+ default: https://gerrit.opnfv.org/gerrit/$PROJECT
+ description: 'Git URL to use on this Jenkins Slave'
+ - string:
+ name: DEPLOY_SCENARIO
+ default: 'os-nosdn-nofeature-ha'
+ - 'daisy-defaults'
+ - '{slave-label}-defaults'
+ - '{installer}-project-parameter':
+ gs-pathname: '{gs-pathname}'
+
+ builders:
+ - description-setter:
+ description: "Built on $NODE_NAME"
+ - '{installer}-{phase}-daily-macro'
+
+#####################################
+# builder macros
+#####################################
+- builder:
+ name: 'daisy-build-daily-macro'
+ builders:
+ - shell:
+ !include-raw: ./daisy4nfv-basic.sh
+ - shell:
+ !include-raw: ./daisy4nfv-build.sh
+ - shell:
+ !include-raw: ./daisy4nfv-upload-artifact.sh
+ - shell:
+ !include-raw: ./daisy4nfv-workspace-cleanup.sh
+
+- builder:
+ name: 'daisy-deploy-daily-macro'
+ builders:
+ - shell:
+ !include-raw: ./daisy4nfv-download-artifact.sh
+ - shell:
+ !include-raw: ./daisy-deploy.sh
+
+- builder:
+ name: 'daisy-test-daily-macro'
+ builders:
+ - shell: |
+ #!/bin/bash
+
+ echo "Not activated!"
+
+#####################################
+# parameter macros
+#####################################
+- publisher:
+ name: 'daisy-recipients'
+ publishers:
+ - email:
+ recipients: hu.zhijiang@zte.com.cn lu.yao135@zte.com.cn zhou.ya@zte.com.cn yangyang1@zte.com.cn julienjut@gmail.com
+
+- parameter:
+ name: 'daisy-project-parameter'
+ parameters:
+ - string:
+ name: BUILD_DIRECTORY
+ default: $WORKSPACE/build_output
+ description: "Directory where the build artifact will be located upon the completion of the build."
+ - string:
+ name: CACHE_DIRECTORY
+ default: $HOME/opnfv/cache/$INSTALLER_TYPE
+ description: "Directory where the cache to be used during the build is located."
+ - string:
+ name: GS_URL
+ default: artifacts.opnfv.org/$PROJECT{gs-pathname}
+ description: "URL to Google Storage."
diff --git a/jjb/daisy4nfv/daisy4nfv-build.sh b/jjb/daisy4nfv/daisy4nfv-build.sh
index eb29fed72..375d80733 100755
--- a/jjb/daisy4nfv/daisy4nfv-build.sh
+++ b/jjb/daisy4nfv/daisy4nfv-build.sh
@@ -26,6 +26,7 @@ cd $WORKSPACE
echo "OPNFV_GIT_URL=$(git config --get remote.origin.url)"
echo "OPNFV_GIT_SHA1=$(git rev-parse HEAD)"
echo "OPNFV_ARTIFACT_URL=$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.bin"
+ echo "OPNFV_ARTIFACT_SHA512SUM=$(sha512sum $OUTPUT_DIR/opnfv-$OPNFV_ARTIFACT_VERSION.bin | cut -d' ' -f1)"
echo "OPNFV_BUILD_URL=$BUILD_URL"
) > $WORKSPACE/opnfv.properties
diff --git a/jjb/daisy4nfv/daisy4nfv-download-artifact.sh b/jjb/daisy4nfv/daisy4nfv-download-artifact.sh
index 90b5fa62f..1cc0443ad 100755
--- a/jjb/daisy4nfv/daisy4nfv-download-artifact.sh
+++ b/jjb/daisy4nfv/daisy4nfv-download-artifact.sh
@@ -12,7 +12,7 @@ set -o errexit
set -o pipefail
# use proxy url to replace the nomral URL, for googleusercontent.com will be blocked randomly
-[[ "$NODE_NAME" =~ (zte) ]] && GS_URL=$GS_BASE_PROXY
+[[ "$NODE_NAME" =~ (zte) ]] && GS_URL=${GS_BASE_PROXY%%/*}/$GS_URL
if [[ "$JOB_NAME" =~ "merge" ]]; then
echo "Downloading http://$GS_URL/opnfv-gerrit-$GERRIT_CHANGE_NUMBER.properties"
@@ -36,6 +36,25 @@ echo "Using $OPNFV_ARTIFACT for deployment"
[[ "$NODE_NAME" =~ (zte) ]] && OPNFV_ARTIFACT_URL=${GS_BASE_PROXY%%/*}/$OPNFV_ARTIFACT_URL
+if [[ ! "$JOB_NAME" =~ (verify|merge) ]]; then
+ # check if we already have the image to avoid redownload
+ BINSTORE="/bin_mount/opnfv_ci/${BRANCH##*/}"
+ if [[ -f "$BINSTORE/$OPNFV_ARTIFACT" && ! -z $OPNFV_ARTIFACT_SHA512SUM ]]; then
+ echo "BIN exists locally. Starting to check the sha512sum."
+ if [[ $OPNFV_ARTIFACT_SHA512SUM = $(sha512sum -b $BINSTORE/$OPNFV_ARTIFACT | cut -d' ' -f1) ]]; then
+ echo "Sha512sum is verified. Skipping the download and using the file from BIN store."
+ ln -s $BINSTORE/$OPNFV_ARTIFACT $WORKSPACE/opnfv.bin
+ echo "--------------------------------------------------------"
+ echo
+ ls -al $WORKSPACE/opnfv.bin
+ echo
+ echo "--------------------------------------------------------"
+ echo "Done!"
+ exit 0
+ fi
+ fi
+fi
+
# log info to console
echo "Downloading the $INSTALLER_TYPE artifact using URL http://$OPNFV_ARTIFACT_URL"
echo "This could take some time..."
@@ -43,7 +62,7 @@ echo "--------------------------------------------------------"
echo
# download the file
-curl -s -o $WORKSPACE/opnfv.bin http://$OPNFV_ARTIFACT_URL > gsutil.bin.log 2>&1
+curl -L -s -o $WORKSPACE/opnfv.bin http://$OPNFV_ARTIFACT_URL > gsutil.bin.log 2>&1
# list the file
ls -al $WORKSPACE/opnfv.bin
diff --git a/jjb/daisy4nfv/daisy4nfv-merge-jobs.yml b/jjb/daisy4nfv/daisy4nfv-merge-jobs.yml
index b7a5fec92..95d851cca 100644
--- a/jjb/daisy4nfv/daisy4nfv-merge-jobs.yml
+++ b/jjb/daisy4nfv/daisy4nfv-merge-jobs.yml
@@ -2,6 +2,14 @@
name: 'daisy4nfv-merge-jobs'
project: 'daisy'
+
+ installer: 'daisy'
+
+###########################################################
+# use alias to keep the jobs'name existed already unchanged
+###########################################################
+ alias: 'daisy4nfv'
+
#####################################
# branch definitions
#####################################
@@ -10,31 +18,29 @@
branch: '{stream}'
gs-pathname: ''
disabled: false
+ - danube:
+ branch: 'stable/{stream}'
+ gs-pathname: '/{stream}'
+ disabled: true
#####################################
# patch merge phases
#####################################
phase:
- - 'basic':
- slave-label: 'opnfv-build-centos'
- 'build':
slave-label: 'opnfv-build-centos'
- 'deploy-virtual':
slave-label: 'opnfv-build-centos'
- - 'smoke-test':
- slave-label: 'opnfv-build-centos'
- - 'promote':
- slave-label: 'opnfv-build-centos'
#####################################
# jobs
#####################################
jobs:
- - 'daisy4nfv-merge-{stream}'
- - 'daisy4nfv-merge-{phase}-{stream}'
+ - '{alias}-merge-{stream}'
+ - '{alias}-merge-{phase}-{stream}'
#####################################
# job templates
#####################################
- job-template:
- name: 'daisy4nfv-merge-{stream}'
+ name: '{alias}-merge-{stream}'
project-type: multijob
@@ -43,13 +49,14 @@
concurrent: true
properties:
+ - logrotate-default
- throttle:
enabled: true
max-total: 4
option: 'project'
scm:
- - git-scm-gerrit
+ - git-scm
wrappers:
- ssh-agent-wrapper
@@ -65,50 +72,44 @@
- comment-added-contains-event:
comment-contains-value: 'remerge'
projects:
- - project-compare-type: 'ANT'
- project-pattern: '{project}'
- branches:
- - branch-compare-type: 'ANT'
- branch-pattern: '**/{branch}'
- forbidden-file-paths:
- - compare-type: ANT
- pattern: 'docs/**|.gitignore'
+ - project-compare-type: 'ANT'
+ project-pattern: '{project}'
+ branches:
+ - branch-compare-type: 'ANT'
+ branch-pattern: '**/{branch}'
+ file-paths:
+ - compare-type: ANT
+ pattern: 'ci/**'
+ - compare-type: ANT
+ pattern: 'code/**'
+ - compare-type: ANT
+ pattern: 'deploy/**'
+ forbidden-file-paths:
+ - compare-type: ANT
+ pattern: 'docs/**'
+ - compare-type: ANT
+ pattern: '.gitignore'
readable-message: true
parameters:
- project-parameter:
project: '{project}'
- - gerrit-parameter:
branch: '{branch}'
- - 'opnfv-build-defaults'
- - 'daisy4nfv-merge-defaults':
+ - 'opnfv-build-centos-defaults'
+ - '{alias}-merge-defaults':
gs-pathname: '{gs-pathname}'
builders:
- description-setter:
description: "Built on $NODE_NAME"
- multijob:
- name: basic
- condition: SUCCESSFUL
- projects:
- - name: 'daisy4nfv-merge-basic-{stream}'
- current-parameters: false
- predefined-parameters: |
- GERRIT_BRANCH=$GERRIT_BRANCH
- GERRIT_REFSPEC=$GERRIT_REFSPEC
- GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
- GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
- node-parameters: false
- kill-phase-on: FAILURE
- abort-all-job: true
- - multijob:
name: build
condition: SUCCESSFUL
projects:
- - name: 'daisy4nfv-merge-build-{stream}'
+ - name: '{alias}-merge-build-{stream}'
current-parameters: false
predefined-parameters: |
- GERRIT_BRANCH=$GERRIT_BRANCH
+ BRANCH=$BRANCH
GERRIT_REFSPEC=$GERRIT_REFSPEC
GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
@@ -119,38 +120,10 @@
name: deploy-virtual
condition: SUCCESSFUL
projects:
- - name: 'daisy4nfv-merge-deploy-virtual-{stream}'
- current-parameters: false
- predefined-parameters: |
- GERRIT_BRANCH=$GERRIT_BRANCH
- GERRIT_REFSPEC=$GERRIT_REFSPEC
- GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
- GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
- node-parameters: false
- kill-phase-on: FAILURE
- abort-all-job: true
- - multijob:
- name: smoke-test
- condition: SUCCESSFUL
- projects:
- - name: 'daisy4nfv-merge-smoke-test-{stream}'
+ - name: '{alias}-merge-deploy-virtual-{stream}'
current-parameters: false
predefined-parameters: |
- GERRIT_BRANCH=$GERRIT_BRANCH
- GERRIT_REFSPEC=$GERRIT_REFSPEC
- GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
- GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
- node-parameters: false
- kill-phase-on: FAILURE
- abort-all-job: true
- - multijob:
- name: promote
- condition: SUCCESSFUL
- projects:
- - name: 'daisy4nfv-merge-promote-{stream}'
- current-parameters: false
- predefined-parameters: |
- GERRIT_BRANCH=$GERRIT_BRANCH
+ BRANCH=$BRANCH
GERRIT_REFSPEC=$GERRIT_REFSPEC
GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
@@ -159,26 +132,26 @@
abort-all-job: true
- job-template:
- name: 'daisy4nfv-merge-{phase}-{stream}'
+ name: '{alias}-merge-{phase}-{stream}'
disabled: '{obj:disabled}'
concurrent: true
properties:
+ - logrotate-default
- throttle:
enabled: true
- max-total: 6
+ max-total: 4
option: 'project'
- build-blocker:
use-build-blocker: true
blocking-jobs:
- - 'daisy4nfv-merge-deploy-.*'
- - 'daisy4nfv-merge-test-.*'
+ - '{alias}-merge-deploy-.*'
block-level: 'NODE'
scm:
- - git-scm-gerrit
+ - git-scm
wrappers:
- ssh-agent-wrapper
@@ -189,58 +162,41 @@
parameters:
- project-parameter:
project: '{project}'
- - gerrit-parameter:
branch: '{branch}'
- '{slave-label}-defaults'
- - 'daisy4nfv-merge-defaults':
+ - '{alias}-merge-defaults':
gs-pathname: '{gs-pathname}'
builders:
- description-setter:
description: "Built on $NODE_NAME"
- '{project}-merge-{phase}-macro'
+
#####################################
# builder macros
#####################################
- builder:
- name: 'daisy-merge-basic-macro'
+ name: 'daisy-merge-build-macro'
builders:
- shell:
!include-raw: ./daisy4nfv-basic.sh
-
-- builder:
- name: 'daisy-merge-build-macro'
- builders:
- shell:
- !include-raw:
- - ./daisy4nfv-build.sh
- - ./daisy4nfv-upload-artifact.sh
- - ./daisy4nfv-workspace-cleanup.sh
+ !include-raw: ./daisy4nfv-build.sh
+ - shell:
+ !include-raw: ./daisy4nfv-upload-artifact.sh
+ - shell:
+ !include-raw: ./daisy4nfv-workspace-cleanup.sh
- builder:
name: 'daisy-merge-deploy-virtual-macro'
builders:
- shell:
- !include-raw:
- - ./daisy4nfv-download-artifact.sh
- - ./daisy4nfv-virtual-deploy.sh
- - ./daisy4nfv-workspace-cleanup.sh
-
-- builder:
- name: 'daisy-merge-smoke-test-macro'
- builders:
- - shell: |
- #!/bin/bash
-
- echo "Not activated!"
-
-- builder:
- name: 'daisy-merge-promote-macro'
- builders:
- - shell: |
- #!/bin/bash
+ !include-raw: ./daisy4nfv-download-artifact.sh
+ - shell:
+ !include-raw: ./daisy-deploy.sh
+ - shell:
+ !include-raw: ./daisy4nfv-workspace-cleanup.sh
- echo "Not activated!"
#####################################
# parameter macros
#####################################
diff --git a/jjb/daisy4nfv/daisy4nfv-verify-jobs.yml b/jjb/daisy4nfv/daisy4nfv-verify-jobs.yml
index cba22643c..ee82c14b2 100644
--- a/jjb/daisy4nfv/daisy4nfv-verify-jobs.yml
+++ b/jjb/daisy4nfv/daisy4nfv-verify-jobs.yml
@@ -2,6 +2,14 @@
name: 'daisy4nfv-verify-jobs'
project: 'daisy'
+
+ installer: 'daisy'
+
+##########################################################
+# use alias to keep the jobs'name existed alread unchanged
+##########################################################
+ alias: 'daisy4nfv'
+
#####################################
# branch definitions
#####################################
@@ -10,29 +18,27 @@
branch: '{stream}'
gs-pathname: ''
disabled: false
+ - danube:
+ branch: 'stable/{stream}'
+ gs-pathname: '/{stream}'
+ disabled: true
#####################################
# patch verification phases
#####################################
phase:
- - 'basic':
- slave-label: 'opnfv-build-centos'
- 'build':
slave-label: 'opnfv-build-centos'
- - 'deploy-virtual':
- slave-label: 'opnfv-build'
- - 'smoke-test':
- slave-label: 'opnfv-build'
#####################################
# jobs
#####################################
jobs:
- - 'daisy4nfv-verify-{stream}'
- - 'daisy4nfv-verify-{phase}-{stream}'
+ - '{alias}-verify-{stream}'
+ - '{alias}-verify-{phase}-{stream}'
#####################################
# job templates
#####################################
- job-template:
- name: 'daisy4nfv-verify-{stream}'
+ name: '{alias}-verify-{stream}'
project-type: multijob
@@ -41,13 +47,14 @@
concurrent: true
properties:
+ - logrotate-default
- throttle:
enabled: true
max-total: 4
option: 'project'
scm:
- - git-scm-gerrit
+ - git-scm
wrappers:
- ssh-agent-wrapper
@@ -69,78 +76,44 @@
- comment-added-contains-event:
comment-contains-value: 'reverify'
projects:
- - project-compare-type: 'ANT'
- project-pattern: '{project}'
- branches:
- - branch-compare-type: 'ANT'
- branch-pattern: '**/{branch}'
- forbidden-file-paths:
- - compare-type: ANT
- pattern: 'docs/**|.gitignore'
+ - project-compare-type: 'ANT'
+ project-pattern: '{project}'
+ branches:
+ - branch-compare-type: 'ANT'
+ branch-pattern: '**/{branch}'
+ file-paths:
+ - compare-type: ANT
+ pattern: 'ci/**'
+ - compare-type: ANT
+ pattern: 'code/**'
+ - compare-type: ANT
+ pattern: 'deploy/**'
+ forbidden-file-paths:
+ - compare-type: ANT
+ pattern: 'docs/**'
+ - compare-type: ANT
+ pattern: '.gitignore'
readable-message: true
parameters:
- project-parameter:
project: '{project}'
- - gerrit-parameter:
branch: '{branch}'
- - 'opnfv-build-defaults'
- - 'daisy4nfv-verify-defaults':
+ - 'opnfv-build-centos-defaults'
+ - '{alias}-verify-defaults':
gs-pathname: '{gs-pathname}'
builders:
- description-setter:
description: "Built on $NODE_NAME"
- multijob:
- name: basic
- condition: SUCCESSFUL
- projects:
- - name: 'daisy4nfv-verify-basic-{stream}'
- current-parameters: false
- predefined-parameters: |
- GERRIT_BRANCH=$GERRIT_BRANCH
- GERRIT_REFSPEC=$GERRIT_REFSPEC
- GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
- GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
- node-parameters: false
- kill-phase-on: FAILURE
- abort-all-job: true
- - multijob:
name: build
condition: SUCCESSFUL
projects:
- - name: 'daisy4nfv-verify-build-{stream}'
+ - name: '{alias}-verify-build-{stream}'
current-parameters: false
predefined-parameters: |
- GERRIT_BRANCH=$GERRIT_BRANCH
- GERRIT_REFSPEC=$GERRIT_REFSPEC
- GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
- GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
- node-parameters: false
- kill-phase-on: FAILURE
- abort-all-job: true
- - multijob:
- name: deploy-virtual
- condition: SUCCESSFUL
- projects:
- - name: 'daisy4nfv-verify-deploy-virtual-{stream}'
- current-parameters: false
- predefined-parameters: |
- GERRIT_BRANCH=$GERRIT_BRANCH
- GERRIT_REFSPEC=$GERRIT_REFSPEC
- GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
- GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
- node-parameters: false
- kill-phase-on: FAILURE
- abort-all-job: true
- - multijob:
- name: smoke-test
- condition: SUCCESSFUL
- projects:
- - name: 'daisy4nfv-verify-smoke-test-{stream}'
- current-parameters: false
- predefined-parameters: |
- GERRIT_BRANCH=$GERRIT_BRANCH
+ BRANCH=$BRANCH
GERRIT_REFSPEC=$GERRIT_REFSPEC
GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
@@ -149,13 +122,14 @@
abort-all-job: true
- job-template:
- name: 'daisy4nfv-verify-{phase}-{stream}'
+ name: '{alias}-verify-{phase}-{stream}'
disabled: '{obj:disabled}'
concurrent: true
properties:
+ - logrotate-default
- throttle:
enabled: true
max-total: 6
@@ -163,12 +137,11 @@
- build-blocker:
use-build-blocker: true
blocking-jobs:
- - 'daisy4nfv-verify-deploy-.*'
- - 'daisy4nfv-verify-test-.*'
+ - '{alias}-verify-deploy-.*'
block-level: 'NODE'
scm:
- - git-scm-gerrit
+ - git-scm
wrappers:
- ssh-agent-wrapper
@@ -179,44 +152,29 @@
parameters:
- project-parameter:
project: '{project}'
- - gerrit-parameter:
branch: '{branch}'
- '{slave-label}-defaults'
- - 'daisy4nfv-verify-defaults':
+ - '{alias}-verify-defaults':
gs-pathname: '{gs-pathname}'
builders:
- description-setter:
description: "Built on $NODE_NAME"
- '{project}-verify-{phase}-macro'
+
#####################################
# builder macros
#####################################
- builder:
- name: 'daisy-verify-basic-macro'
+ name: 'daisy-verify-build-macro'
builders:
- shell:
!include-raw: ./daisy4nfv-basic.sh
-
-- builder:
- name: 'daisy-verify-build-macro'
- builders:
- shell:
!include-raw: ./daisy4nfv-build.sh
-
-- builder:
- name: 'daisy-verify-deploy-virtual-macro'
- builders:
- shell:
- !include-raw: ./daisy4nfv-virtual-deploy.sh
-
-- builder:
- name: 'daisy-verify-smoke-test-macro'
- builders:
- - shell: |
- #!/bin/bash
+ !include-raw: ./daisy4nfv-workspace-cleanup.sh
- echo "Not activated!"
#####################################
# parameter macros
#####################################
diff --git a/jjb/daisy4nfv/daisy4nfv-virtual-deploy.sh b/jjb/daisy4nfv/daisy4nfv-virtual-deploy.sh
deleted file mode 100755
index 4aa7b0bd5..000000000
--- a/jjb/daisy4nfv/daisy4nfv-virtual-deploy.sh
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/bash
-
-echo "--------------------------------------------------------"
-echo "This is diasy4nfv virtual deploy job!"
-echo "--------------------------------------------------------"
-
-cd $WORKSPACE
-
-if [[ "$NODE_NAME" =~ "-virtual" ]]; then
- export NETWORK_CONF=./deploy/config/vm_environment/$NODE_NAME/network.yml
- export DHA_CONF=./deploy/config/vm_environment/$NODE_NAME/deploy.yml
-else
- # TODO: For the time being, we need to pass this script to let contributors merge their work.
- echo "No support for non-virtual node"
- exit 0
-fi
-
-./ci/deploy/deploy.sh ${DHA_CONF} ${NETWORK_CONF}
-
-if [ $? -ne 0 ]; then
- echo "depolyment failed!"
- deploy_ret=1
-fi
-
-echo
-echo "--------------------------------------------------------"
-echo "Done!"
-
-exit $deploy_ret