diff options
-rw-r--r-- | jjb/apex/apex.yml | 62 | ||||
-rw-r--r-- | jjb/compass4nfv/compass-deploy.sh | 2 | ||||
-rwxr-xr-x | jjb/fuel/fuel-upload-artifact.sh | 38 | ||||
-rw-r--r-- | jjb/functest/functest-ci-jobs.yml | 11 | ||||
-rwxr-xr-x | jjb/functest/set-functest-env.sh | 5 | ||||
-rw-r--r-- | jjb/joid/joid-ci-jobs.yml | 32 | ||||
-rw-r--r-- | jjb/opnfv/opnfv-lint.yml | 2 | ||||
-rw-r--r-- | jjb/releng-macros.yaml | 2 | ||||
-rw-r--r-- | jjb/releng/releng-ci-jobs.yml | 50 | ||||
-rwxr-xr-x | utils/fetch_os_creds.sh | 9 | ||||
-rw-r--r-- | utils/push-test-logs.sh | 2 |
11 files changed, 204 insertions, 11 deletions
diff --git a/jjb/apex/apex.yml b/jjb/apex/apex.yml index 8f9f49e27..f380233cc 100644 --- a/jjb/apex/apex.yml +++ b/jjb/apex/apex.yml @@ -4,6 +4,7 @@ - 'apex-verify-{stream1}' - 'apex-verify-{stream2}' - 'apex-runner-{platform}-{scenario}-{stream}' + - 'apex-runner-cperf-{stream1}' - 'apex-build-{stream}' - 'apex-deploy-virtual-{scenario}-{stream}' - 'apex-deploy-baremetal-{scenario}-{stream}' @@ -58,6 +59,7 @@ - 'os-odl_l2-sfc-noha' - 'os-odl_l3-nofeature-ha' - 'os-onos-nofeature-ha' + - 'os-onos-sfc-ha' - 'os-ocl-nofeature-ha' platform: @@ -827,6 +829,66 @@ build-step-failure-threshold: 'never' failure-threshold: 'never' unstable-threshold: 'FAILURE' + - trigger-builds: + - project: 'apex-deploy-baremetal-os-odl_l2-bgpvpn-ha-{stream1}' + predefined-parameters: | + BUILD_DIRECTORY=apex-build-{stream1}/build + OPNFV_CLEAN=yes + git-revision: true + same-node: true + block-thresholds: + build-step-failure-threshold: 'never' + block: true + - trigger-builds: + - project: 'functest-apex-{daily-slave}-daily-{stream1}' + predefined-parameters: + DEPLOY_SCENARIO=os-odl_l2-bgpvpn-ha + block: true + same-node: true + block-thresholds: + build-step-failure-threshold: 'never' + failure-threshold: 'never' + unstable-threshold: 'FAILURE' + - trigger-builds: + - project: 'yardstick-apex-{slave}-daily-{stream1}' + predefined-parameters: + DEPLOY_SCENARIO=os-odl_l2-bgpvpn-ha + block: true + same-node: true + block-thresholds: + build-step-failure-threshold: 'never' + failure-threshold: 'never' + unstable-threshold: 'FAILURE' + - trigger-builds: + - project: 'apex-deploy-baremetal-os-onos-sfc-ha-{stream1}' + predefined-parameters: | + BUILD_DIRECTORY=apex-build-{stream1}/build + OPNFV_CLEAN=yes + git-revision: true + same-node: true + block-thresholds: + build-step-failure-threshold: 'never' + block: true + - trigger-builds: + - project: 'functest-apex-{daily-slave}-daily-{stream1}' + predefined-parameters: + DEPLOY_SCENARIO=os-onos-sfc-ha + block: true + same-node: true + block-thresholds: + build-step-failure-threshold: 'never' + failure-threshold: 'never' + unstable-threshold: 'FAILURE' + - trigger-builds: + - project: 'yardstick-apex-{slave}-daily-{stream1}' + predefined-parameters: + DEPLOY_SCENARIO=os-onos-sfc-ha + block: true + same-node: true + block-thresholds: + build-step-failure-threshold: 'never' + failure-threshold: 'never' + unstable-threshold: 'FAILURE' - job-template: name: 'apex-gs-clean-{stream}' diff --git a/jjb/compass4nfv/compass-deploy.sh b/jjb/compass4nfv/compass-deploy.sh index c70a4ec53..d71316459 100644 --- a/jjb/compass4nfv/compass-deploy.sh +++ b/jjb/compass4nfv/compass-deploy.sh @@ -61,6 +61,6 @@ echo "--------------------------------------------------------" echo "Done!" ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" -sshpass -p root scp 2>/dev/null $ssh_options root@${INSTALLER_IP}:/var/ansible/run/openstack_${COMPASS_OPENSTACK_VERSION}-opnfv2/ansible.log ./ &> /dev/null +sshpass -p root scp 2>/dev/null $ssh_options root@${INSTALLER_IP}:/var/ansible/run/openstack_${OPENSTACK_VERSION}-opnfv2/ansible.log ./ &> /dev/null exit $deploy_ret diff --git a/jjb/fuel/fuel-upload-artifact.sh b/jjb/fuel/fuel-upload-artifact.sh index 47cf8985c..1ccd3282c 100755 --- a/jjb/fuel/fuel-upload-artifact.sh +++ b/jjb/fuel/fuel-upload-artifact.sh @@ -19,6 +19,7 @@ fi # source the opnfv.properties to get ARTIFACT_VERSION source $WORKSPACE/opnfv.properties +nfsstore () { # storing ISOs for verify & merge jobs will be done once we get the disk array if [[ ! "$JOB_NAME" =~ (verify|merge) ]]; then # store ISO locally on NFS first @@ -34,7 +35,30 @@ if [[ ! "$JOB_NAME" =~ (verify|merge) ]]; then $ISOSTORE/opnfv-$OPNFV_ARTIFACT_VERSION.iso fi fi +} +importkey () { +# clone releng repository +echo "Cloning releng repository..." +[ -d releng ] && rm -rf releng +git clone https://gerrit.opnfv.org/gerrit/releng $WORKSPACE/releng/ &> /dev/null +#this is where we import the siging key +if [ -f $WORKSPACE/releng/utils/gpg_import_key.sh ]; then + source $WORKSPACE/releng/utils/gpg_import_key.sh +fi +} + +signiso () { +gpg2 -vvv --batch --yes --no-tty \ + --default-key opnfv-helpdesk@rt.linuxfoundation.org \ + --passphrase besteffort \ + --detach-sig $BUILD_DIRECTORY/opnfv-$OPNFV_ARTIFACT_VERSION.iso + +gsutil cp $BUILD_DIRECTORY/opnfv-$OPNFV_ARTIFACT_VERSION.iso.sig gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso.sig +echo "ISO signature Upload Complete!" +} + +uploadiso () { # log info to console echo "Uploading $INSTALLER_TYPE artifact. This could take some time..." echo @@ -80,3 +104,17 @@ echo "Artifact is available as http://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso" echo echo "--------------------------------------------------------" echo +} + +nfsstore + +if [[ ! "$JOB_NAME" =~ merge ]]; then + importkey + signiso + uploadiso +fi + +if [[ ! "$JOB_NAME" =~ verify ]]; then + uploadiso +fi + diff --git a/jjb/functest/functest-ci-jobs.yml b/jjb/functest/functest-ci-jobs.yml index 28ea6438f..6a571abc6 100644 --- a/jjb/functest/functest-ci-jobs.yml +++ b/jjb/functest/functest-ci-jobs.yml @@ -126,9 +126,12 @@ #-------------------------------- testsuite: - - 'daily' - - 'weekly' - - 'suite' + - 'suite': + job-timeout: 60 + - 'daily': + job-timeout: 120 + - 'weekly': + job-timeout: 400 jobs: - 'functest-{installer}-{pod}-{testsuite}-{stream}' @@ -151,7 +154,7 @@ - build-name: name: '$BUILD_NUMBER Suite: $FUNCTEST_SUITE_NAME Scenario: $DEPLOY_SCENARIO' - timeout: - timeout: 400 + timeout: '{job-timeout}' abort: true parameters: diff --git a/jjb/functest/set-functest-env.sh b/jjb/functest/set-functest-env.sh index d2e232de5..b7d745a79 100755 --- a/jjb/functest/set-functest-env.sh +++ b/jjb/functest/set-functest-env.sh @@ -41,10 +41,13 @@ if ! sudo iptables -C FORWARD -j RETURN 2> ${redirect} || ! sudo iptables -L FOR sudo iptables -I FORWARD -j RETURN fi +DEPLOY_TYPE=baremetal +[[ $BUILD_TAG =~ "virtual" ]] && DEPLOY_TYPE=virt + echo "Functest: Start Docker and prepare environment" envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \ -e NODE_NAME=${NODE_NAME} -e DEPLOY_SCENARIO=${DEPLOY_SCENARIO} \ - -e BUILD_TAG=${BUILD_TAG} -e CI_DEBUG=${CI_DEBUG}" + -e BUILD_TAG=${BUILD_TAG} -e CI_DEBUG=${CI_DEBUG} -e DEPLOY_TYPE=${DEPLOY_TYPE}" branch=${GIT_BRANCH##*/} dir_result="${HOME}/opnfv/functest/results/${branch}" mkdir -p ${dir_result} diff --git a/jjb/joid/joid-ci-jobs.yml b/jjb/joid/joid-ci-jobs.yml index 61c1f825e..ae03eab4a 100644 --- a/jjb/joid/joid-ci-jobs.yml +++ b/jjb/joid/joid-ci-jobs.yml @@ -70,7 +70,7 @@ - 'os-onos-nofeature-noha': auto-trigger-name: 'daily-trigger-disabled' - 'os-onos-sfc-ha': - auto-trigger-name: 'daily-trigger-disabled' + auto-trigger-name: 'joid-{scenario}-{pod}-{stream}-trigger' - 'os-ocl-nofeature-ha': auto-trigger-name: 'daily-trigger-disabled' - 'os-ocl-nofeature-noha': @@ -307,7 +307,19 @@ - trigger: name: 'joid-os-onos-sfc-ha-baremetal-master-trigger' triggers: - - timed: '0 21 * * *' + - timed: '0 22 * * *' +- trigger: + name: 'joid-os-onos-sfc-ha-virtual-master-trigger' + triggers: + - timed: '' +- trigger: + name: 'joid-os-onos-sfc-ha-orange-pod2-master-trigger' + triggers: + - timed: '' +- trigger: + name: 'joid-os-onos-sfc-ha-juniper-pod1-master-trigger' + triggers: + - timed: '' # os-onos-nofeature-ha trigger - branch: stable/brahmaputra - trigger: @@ -326,6 +338,22 @@ name: 'joid-os-onos-nofeature-ha-juniper-pod1-brahmaputra-trigger' triggers: - timed: '' +- trigger: + name: 'joid-os-onos-sfc-ha-baremetal-brahmaputra-trigger' + triggers: + - timed: '' +- trigger: + name: 'joid-os-onos-sfc-ha-virtual-brahmaputra-trigger' + triggers: + - timed: '' +- trigger: + name: 'joid-os-onos-sfc-ha-orange-pod2-brahmaputra-trigger' + triggers: + - timed: '' +- trigger: + name: 'joid-os-onos-sfc-ha-juniper-pod1-brahmaputra-trigger' + triggers: + - timed: '' # os-nosdn-lxd-noha trigger - branch: master - trigger: diff --git a/jjb/opnfv/opnfv-lint.yml b/jjb/opnfv/opnfv-lint.yml index 4f3f7ac1b..9611a380c 100644 --- a/jjb/opnfv/opnfv-lint.yml +++ b/jjb/opnfv/opnfv-lint.yml @@ -51,7 +51,7 @@ comment-contains-value: 'reverify' projects: - project-compare-type: 'REG_EXP' - project-pattern: 'functest|sdnvpn' + project-pattern: 'functest|sdnvpn|qtip' branches: - branch-compare-type: 'ANT' branch-pattern: '**/{branch}' diff --git a/jjb/releng-macros.yaml b/jjb/releng-macros.yaml index 7733abac4..a69badbf4 100644 --- a/jjb/releng-macros.yaml +++ b/jjb/releng-macros.yaml @@ -349,6 +349,7 @@ # empty string: "" FLAKE_COUNT="$(find . \ -path './releng_flake8' -prune -o \ + -path './.tox' -prune -o \ -type f -name "*.py" -print | \ xargs flake8 --exit-zero -qq --count 2>&1)" @@ -359,6 +360,7 @@ echo "Flake8 Violations: $FLAKE_COUNT" > lint.log find . \ -path './releng_flake8' -prune -o \ + -path './.tox' -prune -o \ -type f -name "*.py" -print | \ xargs flake8 --exit-zero --first >> violation.log SHOWN=$(wc -l violation.log | cut -d' ' -f1) diff --git a/jjb/releng/releng-ci-jobs.yml b/jjb/releng/releng-ci-jobs.yml index 60551f5bb..f346c1c5f 100644 --- a/jjb/releng/releng-ci-jobs.yml +++ b/jjb/releng/releng-ci-jobs.yml @@ -2,6 +2,7 @@ name: builder-jobs jobs: - 'builder-verify-jjb' + - 'builder-sandbox' - 'builder-merge' - 'artifacts-api' @@ -101,6 +102,55 @@ jenkins-jobs update --delete-old jjb/ - job-template: + name: 'builder-sandbox' + + # Upload all jjb jobs to sandbox instance, excluding jobs jjb + # builder jobs + + parameters: + - project-parameter: + project: '{project}' + - gerrit-parameter: + branch: 'master' + + scm: + - gerrit-trigger-scm: + credentials-id: '{ssh-credentials}' + refspec: '' + choosing-strategy: 'default' + + triggers: + - gerrit: + trigger-on: + - change-merged-event + - comment-added-contains-event: + comment-contains-value: 'remerge' + projects: + - project-compare-type: 'ANT' + project-pattern: 'releng' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/sandbox' + file-paths: + - compare-type: ANT + pattern: jjb/** + - compare-type: ANT + pattern: utils/** + + builders: + - shell: + !include-raw: verify-releng.sh + - shell: | + #!/bin/bash + source /opt/virtualenv/jenkins-job-builder/bin/activate + cd /opt/jenkins-ci/releng + git pull + cp /etc/jenkins_jobs/jenkins_jobs.ini jenkins_sandbox.ini + sed -i 's/url=.*/url=https:\/\/sandbox.opnfv.org\//g' jenkins_sandbox.ini + jenkins-jobs --conf jenkins_sandbox.ini update -r -x jjb/releng --delete-old jjb + rm -f jenkins_sandbox.ini + +- job-template: name: 'artifacts-api' # Generate and upload the JSON file to used for artifacts site diff --git a/utils/fetch_os_creds.sh b/utils/fetch_os_creds.sh index c240976d8..34c81af1a 100755 --- a/utils/fetch_os_creds.sh +++ b/utils/fetch_os_creds.sh @@ -80,9 +80,16 @@ if [ "$installer_type" == "fuel" ]; then #ip_fuel="10.20.0.2" verify_connectivity $installer_ip + env=$(sshpass -p r00tme ssh 2>/dev/null $ssh_options root@${installer_ip} \ + 'fuel env'|grep operational|tail -1|awk '{print $1}') &> /dev/null + if [ -z $env ]; then + error "No operational environment detected in Fuel" + fi + env_id="${FUEL_ENV:-$env}" + # Check if controller is alive (online='True') controller_ip=$(sshpass -p r00tme ssh 2>/dev/null $ssh_options root@${installer_ip} \ - 'fuel node | grep controller | grep "True\| 1" | awk -F\| "{print \$5}" | tail -1' | \ + 'fuel node --env ${env_id} | grep controller | grep "True\| 1" | awk -F\| "{print \$5}" | tail -1' | \ sed 's/ //g') &> /dev/null if [ -z $controller_ip ]; then diff --git a/utils/push-test-logs.sh b/utils/push-test-logs.sh index b385fa88a..d36561d2d 100644 --- a/utils/push-test-logs.sh +++ b/utils/push-test-logs.sh @@ -54,7 +54,7 @@ if [ -d "$dir_result" ]; then echo "Not possible to push results to artifact: gsutil not installed."; else echo "copy result files to artifact $project_artifact" - gsutil -m cp -r "$dir_result" gs://artifacts.opnfv.org/"$project_artifact"/ + gsutil -m cp -r "$dir_result" gs://artifacts.opnfv.org/"$project_artifact"/ >/dev/null 2>&1 fi fi else |