diff options
Diffstat (limited to 'jjb')
74 files changed, 1433 insertions, 629 deletions
diff --git a/jjb/3rd_party_ci/odl-netvirt.yml b/jjb/3rd_party_ci/odl-netvirt.yml index 3dd4c0b44..ca1936156 100644 --- a/jjb/3rd_party_ci/odl-netvirt.yml +++ b/jjb/3rd_party_ci/odl-netvirt.yml @@ -3,7 +3,7 @@ project: 'netvirt' - installer: 'apex' + installer: 'netvirt' ##################################### # branch definitions ##################################### @@ -123,6 +123,7 @@ predefined-parameters: | FUNCTEST_SUITE_NAME=vping_userdata,bgpvpn RC_FILE_PATH=/home/jenkins/cloner-info/overcloudrc + DEPLOY_SCENARIO=os-odl_l2-bgpvpn-noha node-parameters: true kill-phase-on: FAILURE abort-all-job: false @@ -166,9 +167,7 @@ block-level: 'NODE' wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true diff --git a/jjb/3rd_party_ci/postprocess-netvirt.sh b/jjb/3rd_party_ci/postprocess-netvirt.sh index adffaf42d..2e99477c5 100755 --- a/jjb/3rd_party_ci/postprocess-netvirt.sh +++ b/jjb/3rd_party_ci/postprocess-netvirt.sh @@ -2,6 +2,13 @@ set -e # wipe the WORKSPACE +if [ -z ${WORKSPACE} ]; then echo "WORKSPACE is unset"; else echo "WORKSPACE is set to \"$WORKSPACE\""; fi +WORKSPACE=${WORKSPACE:-$PWD} /bin/rm -rf $WORKSPACE/* - -echo "Hello World" +set -e +# clone opnfv sdnvpn repo +git clone https://gerrit.opnfv.org/gerrit/p/sdnvpn.git $WORKSPACE/sdnvpn +. $WORKSPACE/sdnvpn/odl-pipeline/odl-pipeline-common.sh +pushd $LIB +./post_process.sh +popd
\ No newline at end of file diff --git a/jjb/apex/apex.yml b/jjb/apex/apex.yml index d8784c678..70731b568 100644 --- a/jjb/apex/apex.yml +++ b/jjb/apex/apex.yml @@ -9,6 +9,9 @@ - 'apex-deploy-virtual-{scenario}-{stream}' - 'apex-deploy-baremetal-{scenario}-{stream}' - 'apex-daily-{stream}' + - 'apex-daily-colorado' + - 'apex-build-colorado' + - 'apex-deploy-baremetal-os-odl_l2-fdio-ha-colorado' # stream: branch with - in place of / (eg. stable-arno) # branch: branch (eg. stable/arno) @@ -60,10 +63,7 @@ description: "Used for overriding the GIT URL coming from parameters macro." scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: @@ -117,10 +117,7 @@ description: "Used for overriding the GIT URL coming from parameters macro." scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: @@ -223,10 +220,7 @@ description: "Used for overriding the GIT URL coming from parameters macro." scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - choosing-strategy: 'default' + - git-scm properties: - build-blocker: @@ -283,10 +277,7 @@ description: "Used for overriding the GIT URL coming from parameters macro." scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - choosing-strategy: 'default' + - git-scm properties: - build-blocker: @@ -341,10 +332,7 @@ description: "Used for overriding the GIT URL coming from parameters macro." scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm properties: - build-blocker: @@ -384,14 +372,13 @@ disabled: false scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm parameters: - project-parameter: project: '{project}' + - gerrit-parameter: + branch: '{branch}' - apex-parameter: gs-pathname: '{gs-pathname}' - string: @@ -431,14 +418,13 @@ disabled: false scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm parameters: - project-parameter: project: '{project}' + - gerrit-parameter: + branch: '{branch}' - apex-parameter: gs-pathname: '{gs-pathname}' - string: @@ -474,14 +460,13 @@ disabled: false scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm parameters: - project-parameter: project: '{project}' + - gerrit-parameter: + branch: '{branch}' - apex-parameter: gs-pathname: '{gs-pathname}' @@ -566,6 +551,160 @@ failure-threshold: 'never' unstable-threshold: 'FAILURE' + +# Colorado Build +- job-template: + name: 'apex-build-colorado' + + # Job template for builds + # + # Required Variables: + # stream: branch with - in place of / (eg. stable) + # branch: branch (eg. stable) + node: 'apex-daily-colorado' + + disabled: false + + concurrent: true + + parameters: + - project-parameter: + project: '{project}' + - apex-parameter: + gs-pathname: '/colorado' + - gerrit-parameter: + branch: 'stable/colorado' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: "Used for overriding the GIT URL coming from parameters macro." + + scm: + - git-scm + + properties: + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-deploy.*' + - throttle: + max-per-node: 1 + max-total: 10 + option: 'project' + + builders: + - 'apex-build' + - 'apex-upload-artifact' + + +# Colorado FDIO Deploy +- job-template: + name: 'apex-deploy-baremetal-os-odl_l2-fdio-ha-colorado' + + # Job template for baremetal deployment + # + # Required Variables: + # stream: branch with - in place of / (eg. stable) + # branch: branch (eg. stable) + node: 'lf-pod1' + + disabled: false + + scm: + - git-scm + + parameters: + - project-parameter: + project: '{project}' + - gerrit-parameter: + branch: 'stable/colorado' + - apex-parameter: + gs-pathname: '/colorado' + - string: + name: DEPLOY_SCENARIO + default: 'os-odl_l2-fdio-ha' + description: "Scenario to deploy with." + + properties: + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-verify.*' + - 'apex-deploy.*' + - 'apex-build.*' + + + builders: + - 'apex-deploy' + - 'apex-workspace-cleanup' + +# Colorado FDIO Daily +- job-template: + name: 'apex-daily-colorado' + + # Job template for daily build + # + # Required Variables: + # stream: branch with - in place of / (eg. stable) + # branch: branch (eg. stable) + node: 'apex-daily-colorado' + + disabled: false + + scm: + - git-scm + + parameters: + - project-parameter: + project: '{project}' + - gerrit-parameter: + branch: 'stable/colorado' + - apex-parameter: + gs-pathname: '/colorado' + + properties: + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-verify.*' + - 'apex-deploy.*' + - 'apex-build.*' + - 'apex-runner.*' + + triggers: + - 'apex-colorado' + + builders: + - trigger-builds: + - project: 'apex-build-colorado' + git-revision: true + current-parameters: true + same-node: true + block: true + - trigger-builds: + - project: 'apex-deploy-baremetal-os-odl_l2-fdio-ha-colorado' + predefined-parameters: | + BUILD_DIRECTORY=apex-build-colorado/.build + OPNFV_CLEAN=yes + git-revision: true + same-node: true + block-thresholds: + build-step-failure-threshold: 'never' + block: true + - trigger-builds: + - project: 'functest-apex-apex-daily-colorado-daily-colorado' + predefined-parameters: + DEPLOY_SCENARIO=os-odl_l2-fdio-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}' @@ -673,6 +812,10 @@ triggers: - timed: '0 3 * * *' - trigger: + name: 'apex-colorado' + triggers: + - timed: '0 12 * * *' +- trigger: name: 'apex-gs-clean-{stream}' triggers: - timed: '0 2 * * *' diff --git a/jjb/armband/armband-ci-jobs.yml b/jjb/armband/armband-ci-jobs.yml index 77718e181..22e1dafba 100644 --- a/jjb/armband/armband-ci-jobs.yml +++ b/jjb/armband/armband-ci-jobs.yml @@ -199,6 +199,8 @@ parameters: - project-parameter: project: '{project}' + - gerrit-parameter: + branch: '{branch}' - '{installer}-defaults' - '{slave-label}-defaults': installer: '{installer}' @@ -209,10 +211,7 @@ gs-pathname: '{gs-pathname}' scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm wrappers: - build-name: diff --git a/jjb/armband/armband-project-jobs.yml b/jjb/armband/armband-project-jobs.yml index 4b2a7b50e..e3853fa16 100644 --- a/jjb/armband/armband-project-jobs.yml +++ b/jjb/armband/armband-project-jobs.yml @@ -35,16 +35,15 @@ parameters: - project-parameter: project: '{project}' + - gerrit-parameter: + branch: '{branch}' - 'opnfv-build-arm-defaults' - '{installer}-defaults' - armband-project-parameter: gs-pathname: '{gs-pathname}' scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm triggers: - pollscm: diff --git a/jjb/armband/armband-verify-jobs.yml b/jjb/armband/armband-verify-jobs.yml index f99ed572c..9bfe4f4fd 100644 --- a/jjb/armband/armband-verify-jobs.yml +++ b/jjb/armband/armband-verify-jobs.yml @@ -53,15 +53,10 @@ option: 'project' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true @@ -184,15 +179,10 @@ block-level: 'NODE' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true diff --git a/jjb/availability/availability.yml b/jjb/availability/availability.yml index 485010def..ae9f163e6 100644 --- a/jjb/availability/availability.yml +++ b/jjb/availability/availability.yml @@ -33,10 +33,7 @@ - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: diff --git a/jjb/barometer/barometer.yml b/jjb/barometer/barometer.yml index c763f3001..4afe40e38 100644 --- a/jjb/barometer/barometer.yml +++ b/jjb/barometer/barometer.yml @@ -35,10 +35,7 @@ - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: @@ -94,10 +91,7 @@ - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - choosing-strategy: 'default' + - git-scm triggers: - gerrit: @@ -148,10 +142,7 @@ - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - choosing-strategy: 'default' + - git-scm triggers: - timed: '@midnight' diff --git a/jjb/bottlenecks/bottlenecks-ci-jobs.yml b/jjb/bottlenecks/bottlenecks-ci-jobs.yml index 7f2e6bf8a..0054dddaf 100644 --- a/jjb/bottlenecks/bottlenecks-ci-jobs.yml +++ b/jjb/bottlenecks/bottlenecks-ci-jobs.yml @@ -95,6 +95,8 @@ parameters: - project-parameter: project: '{project}' + - gerrit-parameter: + branch: '{branch}' - '{slave-label}-defaults' - '{installer}-defaults' - 'bottlenecks-params-{slave-label}' @@ -119,10 +121,7 @@ description: "docker image tag used for version control" scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm builders: - 'bottlenecks-env-cleanup' diff --git a/jjb/bottlenecks/bottlenecks-project-jobs.yml b/jjb/bottlenecks/bottlenecks-project-jobs.yml index 27eb01afa..a461c6a66 100644 --- a/jjb/bottlenecks/bottlenecks-project-jobs.yml +++ b/jjb/bottlenecks/bottlenecks-project-jobs.yml @@ -47,10 +47,7 @@ - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: @@ -88,10 +85,7 @@ - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - choosing-strategy: 'default' + - git-scm triggers: - gerrit: @@ -129,15 +123,14 @@ parameters: - project-parameter: project: '{project}' + - gerrit-parameter: + branch: '{branch}' - 'opnfv-build-ubuntu-defaults' - bottlenecks-parameter: gs-packagepath: '{gs-packagepath}' scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm builders: - 'bottlenecks-builder-upload-artifact' diff --git a/jjb/compass4nfv/compass-ci-jobs.yml b/jjb/compass4nfv/compass-ci-jobs.yml index 0d97fef75..b4910cfc2 100644 --- a/jjb/compass4nfv/compass-ci-jobs.yml +++ b/jjb/compass4nfv/compass-ci-jobs.yml @@ -22,11 +22,11 @@ pod: - baremetal: slave-label: compass-baremetal - os-version: 'trusty' + os-version: 'xenial' <<: *master - virtual: slave-label: compass-virtual - os-version: 'trusty' + os-version: 'xenial' <<: *master # - baremetal: # slave-label: compass-baremetal @@ -190,6 +190,8 @@ parameters: - project-parameter: project: '{project}' + - gerrit-parameter: + branch: '{branch}' - compass-ci-parameter: installer: '{installer}' gs-pathname: '{gs-pathname}' @@ -197,10 +199,7 @@ - '{installer}-defaults' scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm wrappers: - build-name: @@ -238,9 +237,7 @@ - choice: name: COMPASS_OPENSTACK_VERSION choices: - - 'mitaka' - 'newton' - - 'liberty' ######################## # trigger macros diff --git a/jjb/compass4nfv/compass-project-jobs.yml b/jjb/compass4nfv/compass-project-jobs.yml index 50ff072fb..6cf35d631 100644 --- a/jjb/compass4nfv/compass-project-jobs.yml +++ b/jjb/compass4nfv/compass-project-jobs.yml @@ -38,6 +38,8 @@ parameters: - project-parameter: project: '{project}' + - gerrit-parameter: + branch: '{branch}' - compass-project-parameter: installer: '{installer}' gs-pathname: '{gs-pathname}' @@ -45,10 +47,7 @@ - '{installer}-defaults' scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm triggers: - timed: 'H 8 * * *' @@ -80,16 +79,15 @@ parameters: - project-parameter: project: '{project}' + - gerrit-parameter: + branch: '{branch}' - compass-project-parameter: installer: '{installer}' gs-pathname: '{gs-pathname}' - '{node}-defaults' - '{installer}-defaults' scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm builders: - shell: @@ -121,15 +119,4 @@ - string: name: PPA_CACHE default: "$WORKSPACE/work/repo/" - - choice: - name: COMPASS_OPENSTACK_VERSION - choices: - - 'mitaka' - - 'newton' - - 'liberty' - - choice: - name: COMPASS_OS_VERSION - choices: - - 'trusty' - - 'centos7' diff --git a/jjb/compass4nfv/compass-verify-jobs.yml b/jjb/compass4nfv/compass-verify-jobs.yml index 69cc958a8..2277e92ab 100644 --- a/jjb/compass4nfv/compass-verify-jobs.yml +++ b/jjb/compass4nfv/compass-verify-jobs.yml @@ -18,13 +18,9 @@ disabled: true distro: - - 'trusty': + - 'xenial': disabled: false - os-version: 'trusty' - openstack-os-version: '' - - 'centos7': - disabled: false - os-version: 'centos7' + os-version: 'xenial' openstack-os-version: '' ##################################### # patch verification phases @@ -64,15 +60,10 @@ block-level: 'NODE' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 120 fail: true @@ -174,15 +165,10 @@ block-level: 'NODE' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 120 fail: true @@ -242,11 +228,8 @@ - choice: name: COMPASS_OPENSTACK_VERSION choices: - - 'mitaka' - 'newton' - - 'liberty' - choice: name: COMPASS_OS_VERSION choices: - - 'trusty' - - 'centos7' + - 'xenial' diff --git a/jjb/conductor/conductor.yml b/jjb/conductor/conductor.yml index 15a3b59e1..f9978804f 100644 --- a/jjb/conductor/conductor.yml +++ b/jjb/conductor/conductor.yml @@ -33,10 +33,7 @@ - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: diff --git a/jjb/copper/copper.yml b/jjb/copper/copper.yml index 80ad9294e..9c736db7c 100644 --- a/jjb/copper/copper.yml +++ b/jjb/copper/copper.yml @@ -33,10 +33,7 @@ - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: diff --git a/jjb/cperf/cperf-ci-jobs.yml b/jjb/cperf/cperf-ci-jobs.yml index d6c8601c6..4ffc3b013 100644 --- a/jjb/cperf/cperf-ci-jobs.yml +++ b/jjb/cperf/cperf-ci-jobs.yml @@ -57,6 +57,8 @@ parameters: - project-parameter: project: '{project}' + - gerrit-parameter: + branch: '{branch}' - '{pod}-defaults' - '{installer}-defaults' - cperf-parameter: @@ -65,10 +67,7 @@ docker-tag: '{docker-tag}' scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm builders: - 'cperf-{testsuite}-builder' diff --git a/jjb/daisy4nfv/daisy4nfv-merge-jobs.yml b/jjb/daisy4nfv/daisy4nfv-merge-jobs.yml index 5964adb32..b7a5fec92 100644 --- a/jjb/daisy4nfv/daisy4nfv-merge-jobs.yml +++ b/jjb/daisy4nfv/daisy4nfv-merge-jobs.yml @@ -49,15 +49,10 @@ option: 'project' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true @@ -183,15 +178,10 @@ block-level: 'NODE' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true diff --git a/jjb/daisy4nfv/daisy4nfv-verify-jobs.yml b/jjb/daisy4nfv/daisy4nfv-verify-jobs.yml index bd9f1b51e..cba22643c 100644 --- a/jjb/daisy4nfv/daisy4nfv-verify-jobs.yml +++ b/jjb/daisy4nfv/daisy4nfv-verify-jobs.yml @@ -47,15 +47,10 @@ option: 'project' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true @@ -173,15 +168,10 @@ block-level: 'NODE' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true diff --git a/jjb/doctor/doctor.yml b/jjb/doctor/doctor.yml index f9ee3de79..335eb7133 100644 --- a/jjb/doctor/doctor.yml +++ b/jjb/doctor/doctor.yml @@ -27,6 +27,7 @@ jobs: - 'doctor-verify-{stream}' - 'doctor-verify-{installer}-{inspector}-{stream}' + - 'doctor-profiling-{stream}' - job-template: name: 'doctor-verify-{stream}' @@ -41,10 +42,7 @@ - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: @@ -130,10 +128,7 @@ description: "Show debug output information" scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: @@ -176,3 +171,60 @@ publishers: - archive: artifacts: 'tests/*.log' + +- job-template: + name: 'doctor-profiling-{stream}' + + disabled: '{obj:disabled}' + + parameters: + - 'doctor-default' + - string: + name: PROFILER + default: poc + description: "Profiler to be used" + + scm: + - git-scm-gerrit + + triggers: + - 'doctor-experimental' + +##################################### +# parameter macros +##################################### +# TODO(yujunz) replace common parameter in doctor-verify-{stream} with macro +- parameter: + name: 'doctor-default' + parameters: + - project-parameter: + project: '{project}' + - gerrit-parameter: + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' + +##################################### +# trigger macros +##################################### +- trigger: + name: 'doctor-experimental' + triggers: + - gerrit: + server-name: 'gerrit.opnfv.org' + trigger-on: + - comment-added-contains-event: + comment-contains-value: 'check experimental' + projects: + - project-compare-type: 'ANT' + project-pattern: '{project}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + file-paths: + - compare-type: 'ANT' + pattern: 'tests/**' + skip-vote: + successful: true + failed: true + unstable: true + notbuilt: true diff --git a/jjb/domino/domino.yml b/jjb/domino/domino.yml index d34f8fadf..b6533009e 100644 --- a/jjb/domino/domino.yml +++ b/jjb/domino/domino.yml @@ -29,10 +29,7 @@ - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: diff --git a/jjb/dovetail/dovetail-artifacts-upload.sh b/jjb/dovetail/dovetail-artifacts-upload.sh new file mode 100755 index 000000000..ce02dd569 --- /dev/null +++ b/jjb/dovetail/dovetail-artifacts-upload.sh @@ -0,0 +1,93 @@ +#!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2016 Huawei Technologies Co.,Ltd and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +set -o pipefail + +echo "dovetail: pull and save the images" + +[[ -d ${CACHE_DIR} ]] || mkdir -p ${CACHE_DIR} + +cd ${CACHE_DIR} +sudo docker pull ${DOCKER_REPO_NAME}:${DOCKER_TAG} +sudo docker save -o ${STORE_FILE_NAME} ${DOCKER_REPO_NAME}:${DOCKER_TAG} + +OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d_%H-%M-%S") +GS_UPLOAD_LOCATION="${STORE_URL}/${OPNFV_ARTIFACT_VERSION}" +( + echo "OPNFV_ARTIFACT_VERSION=$OPNFV_ARTIFACT_VERSION" + echo "OPNFV_GIT_URL=$(git config --get remote.origin.url)" + echo "OPNFV_GIT_SHA1=$(git rev-parse HEAD)" + echo "OPNFV_ARTIFACT_URL=$GS_UPLOAD_LOCATION" + echo "OPNFV_BUILD_URL=$BUILD_URL" +) > $WORKSPACE/opnfv.properties +source $WORKSPACE/opnfv.properties + +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 +} + +sign () { +gpg2 -vvv --batch --yes --no-tty \ + --default-key opnfv-helpdesk@rt.linuxfoundation.org \ + --passphrase besteffort \ + --detach-sig ${CACHE_DIR}/${STORE_FILE_NAME} + +gsutil cp ${CACHE_DIR}/${STORE_FILE_NAME}.sig ${STORE_URL}/${STORE_FILE_NAME}.sig +echo "signature Upload Complete!" +} + +upload () { +# log info to console +echo "Uploading to artifact. This could take some time..." +echo + +cd $WORKSPACE +# upload artifact and additional files to google storage +gsutil cp ${CACHE_DIR}/${STORE_FILE_NAME} \ +${STORE_URL}/${STORE_FILE_NAME} > gsutil.dockerfile.log 2>&1 +gsutil cp $WORKSPACE/opnfv.properties \ +${STORE_URL}/opnfv-$OPNFV_ARTIFACT_VERSION.properties > gsutil.properties.log 2>&1 +gsutil cp $WORKSPACE/opnfv.properties \ + ${STORE_URL}/latest.properties > gsutil.latest.log 2>&1 + +gsutil -m setmeta \ + -h "Content-Type:text/html" \ + -h "Cache-Control:private, max-age=0, no-transform" \ + ${STORE_URL}/latest.properties \ + ${STORE_URL}/opnfv-$OPNFV_ARTIFACT_VERSION.properties > /dev/null 2>&1 + +gsutil -m setmeta \ + -h "Cache-Control:private, max-age=0, no-transform" \ + ${STORE_URL}/${STORE_FILE_NAME} > /dev/null 2>&1 + +# disabled errexit due to gsutil setmeta complaints +# BadRequestException: 400 Invalid argument +# check if we uploaded the file successfully to see if things are fine +gsutil ls ${STORE_URL}/${STORE_FILE_NAME} > /dev/null 2>&1 +if [[ $? -ne 0 ]]; then + echo "Problem while uploading artifact!" + exit 1 +fi + +echo "dovetail: uploading Done!" +echo +echo "--------------------------------------------------------" +echo +} + +importkey +sign +upload diff --git a/jjb/dovetail/dovetail-artifacts-upload.yml b/jjb/dovetail/dovetail-artifacts-upload.yml new file mode 100644 index 000000000..dc2ae5aa2 --- /dev/null +++ b/jjb/dovetail/dovetail-artifacts-upload.yml @@ -0,0 +1,130 @@ +############################################ +# dovetail upload artifacts job +############################################ +- project: + name: dovetail-artifacts-upload + + project: 'dovetail' + + jobs: + - 'dovetail-{image}-artifacts-upload-{stream}' + + stream: + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + + image: + - 'dovetail' + - 'functest' + - 'yardstick' + +############################################# +# job template +############################################# + +- job-template: + name: 'dovetail-{image}-artifacts-upload-{stream}' + + + disabled: '{obj:disabled}' + + concurrent: true + + properties: + - throttle: + enabled: true + max-total: 1 + max-per-node: 1 + option: 'project' + + parameters: + - project-parameter: + project: '{project}' + - gerrit-parameter: + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' + - dovetail-parameter: + gs-pathname: '{gs-pathname}' + image: '{image}' + branch: '{branch}' + + scm: + - git-scm + + builders: + - 'dovetail-builder-artifacts-upload' + - 'dovetail-workspace-cleanup' + +#################### +# parameter macros +#################### +- parameter: + name: dovetail-parameter + parameters: + - string: + name: CACHE_DIR + default: $WORKSPACE/cache{gs-pathname} + description: "the cache to store packages downloaded" + - string: + name: STORE_URL + default: gs://artifacts.opnfv.org/dovetail{gs-pathname} + description: "LF artifacts url for storage of dovetail packages" + - string: + name: DOCKER_REPO_NAME + default: opnfv/{image} + description: "docker repo name" + - string: + name: DOCKER_TAG + default: latest + description: "docker image tag of which will be uploaded to artifacts" + - string: + name: STORE_FILE_NAME + default: image_{image}_{branch}_$BUILD_ID.docker + description: "stored file name" + +#################################### +#builders for dovetail project +#################################### +- builder: + name: dovetail-builder-artifacts-upload + builders: + - shell: + !include-raw: ./dovetail-artifacts-upload.sh + +- builder: + name: dovetail-workspace-cleanup + builders: + - shell: | + #!/bin/bash + set -o errexit + + echo "Dovetail: cleanup cache used for storage downloaded packages" + + /bin/rm -rf $CACHE_DIR + + # Remove previous running containers if exist + if [[ -n "$(docker ps -a | grep $DOCKER_REPO_NAME)" ]]; then + echo "Removing existing $DOCKER_REPO_NAME containers..." + docker ps -a | grep $DOCKER_REPO_NAME | awk '{print $1}' | xargs docker rm -f + t=60 + # Wait max 60 sec for containers to be removed + while [[ $t -gt 0 ]] && [[ -n "$(docker ps| grep $DOCKER_REPO_NAME)" ]]; do + sleep 1 + let t=t-1 + done + fi + + # Remove existing images if exist + if [[ -n "$(docker images | grep $DOCKER_REPO_NAME)" ]]; then + echo "Docker images to remove:" + docker images | head -1 && docker images | grep $DOCKER_REPO_NAME + image_tags=($(docker images | grep $DOCKER_REPO_NAME | awk '{print $2}')) + for tag in "${image_tags[@]}"; do + if [[ -n "$(docker images|grep $DOCKER_REPO_NAME|grep $tag)" ]]; then + echo "Removing docker image $DOCKER_REPO_NAME:$tag..." + docker rmi -f $DOCKER_REPO_NAME:$tag + fi + done + fi diff --git a/jjb/dovetail/dovetail-ci-jobs.yml b/jjb/dovetail/dovetail-ci-jobs.yml index 0c7dbe33a..2b6ab7621 100644 --- a/jjb/dovetail/dovetail-ci-jobs.yml +++ b/jjb/dovetail/dovetail-ci-jobs.yml @@ -103,22 +103,22 @@ auto-trigger-name: 'daily-trigger-disabled' <<: *colorado #armband CI PODs - - armband_baremetal: + - armband-baremetal: slave-label: armband-baremetal SUT: fuel auto-trigger-name: 'daily-trigger-disabled' <<: *master - - armband_virtual: + - armband-virtual: slave-label: armband-virtual SUT: fuel auto-trigger-name: 'daily-trigger-disabled' <<: *master - - armband_baremetal: + - armband-baremetal: slave-label: armband-baremetal SUT: fuel auto-trigger-name: 'daily-trigger-disabled' <<: *colorado - - armband_virtual: + - armband-virtual: slave-label: armband-virtual SUT: fuel auto-trigger-name: 'daily-trigger-disabled' @@ -179,6 +179,8 @@ parameters: - project-parameter: project: '{project}' + - gerrit-parameter: + branch: '{branch}' - '{SUT}-defaults' - '{slave-label}-defaults' - string: @@ -202,10 +204,7 @@ description: "Directory where the dovetail repository is cloned" scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{dovetail-branch}' + - git-scm builders: - description-setter: diff --git a/jjb/dovetail/dovetail-cleanup.sh b/jjb/dovetail/dovetail-cleanup.sh index f215278db..22b2ba2ce 100755 --- a/jjb/dovetail/dovetail-cleanup.sh +++ b/jjb/dovetail/dovetail-cleanup.sh @@ -2,14 +2,35 @@ [[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null" -echo "Cleaning up docker containers/images..." -# Remove previous running containers if exist +#clean up dependent project docker images, which has no containers and image tag None +clean_images=(opnfv/functest opnfv/yardstick) +for clean_image in "${clean_images[@]}"; do + echo "Removing image $image_id, which has no containers and image tag is None" + dangling_images=($(docker images -f "dangling=true" | grep ${clean_image} | awk '{print $3}')) + if [[ -n ${dangling_images} ]]; then + for image_id in "${dangling_images[@]}"; do + docker rmi $image_id >${redirect} + done + fi +done + +echo "Remove containers with image dovetail:<None>..." +dangling_images=($(docker images -f "dangling=true" | grep opnfv/dovetail | awk '{print $3}')) +if [[ -n ${dangling_images} ]]; then + for image_id in "${dangling_images[@]}"; do + echo "Removing image $image_id with tag None and its related containers" + docker ps -a | grep $image_id | awk '{print $1}'| xargs docker rm -f >${redirect} + docker rmi $image_id >${redirect} + done +fi + +echo "Cleaning up dovetail docker containers/images..." if [[ ! -z $(docker ps -a | grep opnfv/dovetail) ]]; then echo "Removing existing opnfv/dovetail containers..." docker ps -a | grep opnfv/dovetail | awk '{print $1}' | xargs docker rm -f >${redirect} fi -# Remove existing images if exist +echo "Remove dovetail existing images if exist..." if [[ ! -z $(docker images | grep opnfv/dovetail) ]]; then echo "Docker images to remove:" docker images | head -1 && docker images | grep opnfv/dovetail >${redirect} diff --git a/jjb/dovetail/dovetail-project-jobs.yml b/jjb/dovetail/dovetail-project-jobs.yml index 07106f609..904841396 100644 --- a/jjb/dovetail/dovetail-project-jobs.yml +++ b/jjb/dovetail/dovetail-project-jobs.yml @@ -33,10 +33,7 @@ - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: @@ -73,10 +70,7 @@ - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - choosing-strategy: 'default' + - git-scm triggers: - gerrit: @@ -99,25 +93,21 @@ #builders for dovetail project ############################### - builder: - name: dovetail-unit-tests + name: dovetail-hello-world builders: - shell: | #!/bin/bash set -o errexit - set -o pipefail - echo "Running unit tests..." - cd $WORKSPACE - virtualenv $WORKSPACE/dovetail_venv - source $WORKSPACE/dovetail_venv/bin/activate + echo "hello world" - #packages installation - easy_install -U setuptools - easy_install -U pip - pip install -r unittests/requirements.txt - pip install -e . - #unit tests - /bin/bash $WORKSPACE/unittests/unittest.sh +- builder: + name: dovetail-unit-tests + builders: + - shell: | + #!/bin/bash + set -o errexit + set -o pipefail - deactivate + tox diff --git a/jjb/dpacc/dpacc.yml b/jjb/dpacc/dpacc.yml index bcad2a329..3eb581ec1 100644 --- a/jjb/dpacc/dpacc.yml +++ b/jjb/dpacc/dpacc.yml @@ -33,10 +33,7 @@ - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: diff --git a/jjb/escalator/escalator.yml b/jjb/escalator/escalator.yml index 11da789f0..4149ee93c 100644 --- a/jjb/escalator/escalator.yml +++ b/jjb/escalator/escalator.yml @@ -45,15 +45,10 @@ option: 'project' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true @@ -131,15 +126,10 @@ concurrent: true scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true @@ -174,15 +164,10 @@ option: 'project' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true @@ -254,15 +239,10 @@ concurrent: true scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true diff --git a/jjb/fuel/fuel-daily-jobs.yml b/jjb/fuel/fuel-daily-jobs.yml index 6c2d6f021..87488c886 100644 --- a/jjb/fuel/fuel-daily-jobs.yml +++ b/jjb/fuel/fuel-daily-jobs.yml @@ -206,6 +206,8 @@ parameters: - project-parameter: project: '{project}' + - gerrit-parameter: + branch: '{branch}' - '{installer}-defaults' - '{slave-label}-defaults': installer: '{installer}' @@ -220,10 +222,7 @@ description: 'Deployment timeout in minutes' scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm wrappers: - build-name: diff --git a/jjb/fuel/fuel-plugin-verify-jobs.yml b/jjb/fuel/fuel-plugin-verify-jobs.yml index 4fea26b32..bf847edfe 100644 --- a/jjb/fuel/fuel-plugin-verify-jobs.yml +++ b/jjb/fuel/fuel-plugin-verify-jobs.yml @@ -71,9 +71,7 @@ wipe-workspace: true wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true @@ -195,9 +193,7 @@ wipe-workspace: true wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true diff --git a/jjb/fuel/fuel-project-jobs.yml b/jjb/fuel/fuel-project-jobs.yml index 2aa17abd5..8fdf8deae 100644 --- a/jjb/fuel/fuel-project-jobs.yml +++ b/jjb/fuel/fuel-project-jobs.yml @@ -44,6 +44,8 @@ parameters: - project-parameter: project: '{project}' + - gerrit-parameter: + branch: '{branch}' - 'opnfv-build-ubuntu-defaults' - '{installer}-defaults' - choice: @@ -56,10 +58,7 @@ gs-pathname: '{gs-pathname}' scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm triggers: - timed: '0 H/4 * * *' @@ -99,15 +98,10 @@ gs-pathname: '{gs-pathname}' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - choosing-strategy: 'default' + - git-scm wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true @@ -175,15 +169,10 @@ - fuel-project-parameter: gs-pathname: '{gs-pathname}' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - choosing-strategy: 'default' + - git-scm wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper triggers: - gerrit: @@ -244,6 +233,8 @@ parameters: - project-parameter: project: '{project}' + - gerrit-parameter: + branch: '{branch}' - '{installer}-defaults' - string: name: GIT_BASE @@ -265,10 +256,7 @@ gs-pathname: '{gs-pathname}' scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm wrappers: - build-name: diff --git a/jjb/fuel/fuel-verify-jobs-experimental.yml b/jjb/fuel/fuel-verify-jobs-experimental.yml index cc16133f6..3aa85b22d 100644 --- a/jjb/fuel/fuel-verify-jobs-experimental.yml +++ b/jjb/fuel/fuel-verify-jobs-experimental.yml @@ -58,15 +58,10 @@ option: 'project' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true @@ -191,15 +186,10 @@ block-level: 'NODE' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true diff --git a/jjb/fuel/fuel-verify-jobs.yml b/jjb/fuel/fuel-verify-jobs.yml index 7b8656800..4a76d9da7 100644 --- a/jjb/fuel/fuel-verify-jobs.yml +++ b/jjb/fuel/fuel-verify-jobs.yml @@ -21,13 +21,13 @@ ##################################### phase: - 'basic': - slave-label: 'opnfv-build' + slave-label: 'opnfv-build-ubuntu' - 'build': slave-label: 'opnfv-build-ubuntu' - 'deploy-virtual': - slave-label: 'opnfv-build' + slave-label: 'opnfv-build-ubuntu' - 'smoke-test': - slave-label: 'opnfv-build' + slave-label: 'opnfv-build-ubuntu' ##################################### # jobs ##################################### @@ -53,15 +53,10 @@ option: 'project' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true @@ -102,7 +97,7 @@ project: '{project}' - gerrit-parameter: branch: '{branch}' - - 'opnfv-build-defaults' + - 'opnfv-build-ubuntu-defaults' - 'fuel-verify-defaults': gs-pathname: '{gs-pathname}' @@ -186,15 +181,10 @@ block-level: 'NODE' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true diff --git a/jjb/functest/functest-ci-jobs.yml b/jjb/functest/functest-ci-jobs.yml index a578fcecd..f8fdeb811 100644 --- a/jjb/functest/functest-ci-jobs.yml +++ b/jjb/functest/functest-ci-jobs.yml @@ -219,6 +219,8 @@ parameters: - project-parameter: project: '{project}' + - gerrit-parameter: + branch: '{branch}' - '{installer}-defaults' - '{slave-label}-defaults' - 'functest-{testsuite}-parameter' @@ -237,10 +239,7 @@ gs-pathname: '{gs-pathname}' scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm builders: - description-setter: diff --git a/jjb/functest/functest-cleanup.sh b/jjb/functest/functest-cleanup.sh index 3c4c7f965..b03d4778d 100755 --- a/jjb/functest/functest-cleanup.sh +++ b/jjb/functest/functest-cleanup.sh @@ -3,19 +3,34 @@ [[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null" echo "Cleaning up docker containers/images..." +FUNCTEST_IMAGE=opnfv/functest +# Remove containers along with image opnfv/functest:<none> +dangling_images=($(docker images -f "dangling=true" | grep $FUNCTEST_IMAGE | awk '{print $3}')) +if [[ -n ${dangling_images} ]]; then + echo " Removing $FUNCTEST_IMAGE:<none> images and their containers..." + for image_id in "${dangling_images[@]}"; do + echo " Removing image_id: $image_id and its containers" + docker ps -a | grep $image_id | awk '{print $1}'| xargs docker rm -f >${redirect} + docker rmi $image_id >${redirect} + done +fi + # Remove previous running containers if exist -if [[ ! -z $(docker ps -a | grep opnfv/functest) ]]; then - echo "Removing existing opnfv/functest containers..." - docker ps -a | grep opnfv/functest | awk '{print $1}' | xargs docker rm -f >${redirect} +functest_containers=$(docker ps -a | grep $FUNCTEST_IMAGE | awk '{print $1}') +if [[ -n ${functest_containers} ]]; then + echo " Removing existing $FUNCTEST_IMAGE containers..." + docker rm -f $functest_containers >${redirect} fi # Remove existing images if exist -if [[ $CLEAN_DOCKER_IMAGES ]] && [[ ! -z $(docker images | grep opnfv/functest) ]]; then - echo "Docker images to remove:" - docker images | head -1 && docker images | grep opnfv/functest >${redirect} - image_tags=($(docker images | grep opnfv/functest | awk '{print $2}')) - for tag in "${image_tags[@]}"; do - echo "Removing docker image opnfv/functest:$tag..." - docker rmi opnfv/functest:$tag >/dev/null - done +if [[ $CLEAN_DOCKER_IMAGES == true ]]; then + functest_image_tags=($(docker images | grep $FUNCTEST_IMAGE | awk '{print $2}')) + if [[ -n ${functest_image_tags} ]]; then + echo " Docker images to be removed:" >${redirect} + (docker images | head -1 && docker images | grep $FUNCTEST_IMAGE) >${redirect} + for tag in "${functest_image_tags[@]}"; do + echo " Removing docker image $FUNCTEST_IMAGE:$tag..." + docker rmi $FUNCTEST_IMAGE:$tag >${redirect} + done + fi fi diff --git a/jjb/functest/functest-project-jobs.yml b/jjb/functest/functest-project-jobs.yml index 888f0ed79..11bc364e1 100644 --- a/jjb/functest/functest-project-jobs.yml +++ b/jjb/functest/functest-project-jobs.yml @@ -33,10 +33,7 @@ - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: diff --git a/jjb/global/installer-params.yml b/jjb/global/installer-params.yml index 610072d1b..4a50a5906 100644 --- a/jjb/global/installer-params.yml +++ b/jjb/global/installer-params.yml @@ -109,11 +109,11 @@ description: 'IP of the installer' - string: name: INSTALLER_TYPE - default: apex + default: netvirt description: 'Installer used for deploying OPNFV on this POD' - string: name: DEPLOY_SCENARIO - default: 'none' + default: 'os-odl_l2-bgpvpn-noha' description: 'Scenario to deploy and test' - string: name: EXTERNAL_NETWORK diff --git a/jjb/global/releng-defaults.yml b/jjb/global/releng-defaults.yml index bf3330657..5003a8f48 100644 --- a/jjb/global/releng-defaults.yml +++ b/jjb/global/releng-defaults.yml @@ -9,13 +9,9 @@ artifactDaysToKeep: 30 artifactNumToKeep: 100 - ssh-credentials: 'd42411ac011ad6f3dd2e1fa34eaa5d87f910eb2e' wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper project-type: freestyle node: master - diff --git a/jjb/global/releng-macros.yml b/jjb/global/releng-macros.yml index 3afd355e6..10835f6a3 100644 --- a/jjb/global/releng-macros.yml +++ b/jjb/global/releng-macros.yml @@ -1,4 +1,15 @@ -# OLD Releng macros +# Releng macros +# +# NOTE: make sure macros are listed in execution ordered. +# +# 1. parameters/properties +# 2. scm +# 3. triggers +# 4. wrappers +# 5. prebuilders (maven only, configured like Builders) +# 6. builders (maven, freestyle, matrix, etc..) +# 7. postbuilders (maven only, configured like Builders) +# 8. publishers/reporters/notifications - parameter: name: project-parameter @@ -27,38 +38,27 @@ - scm: name: git-scm scm: - - git: - credentials-id: '{credentials-id}' + - git: &git-scm-defaults + credentials-id: '$SSH_CREDENTIAL_ID' url: '$GIT_BASE' - refspec: '' branches: - - 'origin/{branch}' - skip-tag: true - wipe-workspace: true + - 'origin/$GERRIT_BRANCH' + timeout: 15 - scm: - name: gerrit-trigger-scm + name: git-scm-gerrit scm: - git: - credentials-id: '{credentials-id}' - url: '$GIT_BASE' - refspec: '{refspec}' - branches: - - 'origin/$GERRIT_BRANCH' - skip-tag: true - choosing-strategy: '{choosing-strategy}' - timeout: 15 + choosing-strategy: 'gerrit' + refspec: '$GERRIT_REFSPEC' + <<: *git-scm-defaults - trigger: name: 'daily-trigger-disabled' triggers: - timed: '' -- trigger: - name: 'weekly-trigger-disabled' - triggers: - - timed: '' - +# NOTE: unused macro, but we may use this for some jobs. - trigger: name: gerrit-trigger-patch-submitted triggers: @@ -79,6 +79,7 @@ - branch-compare-type: 'ANT' branch-pattern: '**/{branch}' +# NOTE: unused macro, but we may use this for some jobs. - trigger: name: gerrit-trigger-patch-merged triggers: @@ -95,16 +96,12 @@ - branch-compare-type: 'ANT' branch-pattern: '**/{branch}' -- publisher: - name: archive-artifacts - publishers: - - archive: - artifacts: '{artifacts}' - allow-empty: true - fingerprint: true - latest-only: true - -# New Releng macros +- wrapper: + name: ssh-agent-wrapper + wrappers: + - ssh-agent-credentials: + users: + - 'd42411ac011ad6f3dd2e1fa34eaa5d87f910eb2e' - builder: name: build-html-and-pdf-docs-output @@ -355,3 +352,45 @@ name: check-bash-syntax builders: - shell: "find . -name '*.sh' | xargs bash -n" + +- builder: + name: lint-yaml-code + builders: + - shell: | + #!/bin/bash + set -o errexit + set -o pipefail + set -o xtrace + export PATH=$PATH:/usr/local/bin/ + + # install python packages + pip install "yamllint==1.6.0" + + # generate and upload lint log + echo "Running yaml code on $PROJECT ..." + + # Ensure we start with a clean environment + rm -f yaml-violation.log lint.log + + # Get number of yaml violations. If none, this will be an + # empty string: "" + find . \ + -type f -name "*.yml" -print \ + -o -name "*.yaml" -print | \ + xargs yamllint > yaml-violation.log || true + + if [ -s "yaml-violation.log" ]; then + SHOWN=$(cat yaml-violation.log| grep -v "^$" |wc -l) + echo -e "First $SHOWN shown\n---" > lint.log + cat yaml-violation.log >> lint.log + sed -r -i '4,$s/^/ /g' lint.log + fi + +- publisher: + name: archive-artifacts + publishers: + - archive: + artifacts: '{artifacts}' + allow-empty: true + fingerprint: true + latest-only: true diff --git a/jjb/global/slave-params.yml b/jjb/global/slave-params.yml index 7eec70918..30ebb950f 100644 --- a/jjb/global/slave-params.yml +++ b/jjb/global/slave-params.yml @@ -425,6 +425,19 @@ name: GIT_BASE default: https://gerrit.opnfv.org/gerrit/$PROJECT - parameter: + name: 'huawei-pod7-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - huawei-pod7 + default-slaves: + - huawei-pod7 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT +- parameter: name: 'zte-pod1-defaults' parameters: - node: diff --git a/jjb/infra/bifrost-verify-jobs.yml b/jjb/infra/bifrost-verify-jobs.yml index 422a42274..baf33ea3a 100644 --- a/jjb/infra/bifrost-verify-jobs.yml +++ b/jjb/infra/bifrost-verify-jobs.yml @@ -132,10 +132,6 @@ timeout: 10 wipe-workspace: true - triggers: - - '{project}-gerrit-trigger': - branch: '{branch}' - builders: - description-setter: description: "Built on $NODE_NAME" diff --git a/jjb/ipv6/ipv6.yml b/jjb/ipv6/ipv6.yml index 069599e82..db662aed8 100644 --- a/jjb/ipv6/ipv6.yml +++ b/jjb/ipv6/ipv6.yml @@ -33,10 +33,7 @@ - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: diff --git a/jjb/joid/joid-daily-jobs.yml b/jjb/joid/joid-daily-jobs.yml index 6d0370983..20429f1a4 100644 --- a/jjb/joid/joid-daily-jobs.yml +++ b/jjb/joid/joid-daily-jobs.yml @@ -178,6 +178,8 @@ parameters: - project-parameter: project: '{project}' + - gerrit-parameter: + branch: '{branch}' - '{installer}-defaults' - '{slave-label}-defaults': installer: '{installer}' @@ -186,10 +188,7 @@ default: 'os-odl_l2-nofeature-ha' scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm builders: - description-setter: diff --git a/jjb/joid/joid-verify-jobs.yml b/jjb/joid/joid-verify-jobs.yml index 649c31bea..516e822a7 100644 --- a/jjb/joid/joid-verify-jobs.yml +++ b/jjb/joid/joid-verify-jobs.yml @@ -58,15 +58,10 @@ block-level: 'NODE' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true @@ -168,15 +163,10 @@ block-level: 'NODE' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true diff --git a/jjb/kvmfornfv/kvmfornfv.yml b/jjb/kvmfornfv/kvmfornfv.yml index 1c2bf5053..8ab821c9b 100644 --- a/jjb/kvmfornfv/kvmfornfv.yml +++ b/jjb/kvmfornfv/kvmfornfv.yml @@ -96,19 +96,19 @@ node-parameters: false kill-phase-on: FAILURE abort-all-job: true - - multijob: - name: test - condition: SUCCESSFUL - projects: - - name: 'kvmfornfv-verify-test-{stream}' - current-parameters: false - predefined-parameters: | - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - node-parameters: false - kill-phase-on: FAILURE - abort-all-job: true +# - multijob: +# name: test +# condition: SUCCESSFUL +# projects: +# - name: 'kvmfornfv-verify-test-{stream}' +# current-parameters: false +# predefined-parameters: | +# GERRIT_BRANCH=$GERRIT_BRANCH +# GERRIT_REFSPEC=$GERRIT_REFSPEC +# GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER +# node-parameters: false +# kill-phase-on: FAILURE +# abort-all-job: true - job-template: name: 'kvmfornfv-verify-{phase}-{stream}' @@ -117,15 +117,10 @@ concurrent: true scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true @@ -158,10 +153,7 @@ gs-pathname: '{gs-pathname}' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - choosing-strategy: 'default' + - git-scm triggers: - gerrit: @@ -200,32 +192,49 @@ gs-pathname: '{gs-pathname}' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - choosing-strategy: 'default' + - git-scm - triggers: - - timed: '@midnight' +# triggers: +# - timed: '@midnight' builders: - description-setter: description: "Built on $NODE_NAME" - multijob: - name: build + name: cyclictest-build condition: SUCCESSFUL projects: - - name: 'kvmfornfv-{testname}-daily-build-{stream}' + - name: 'kvmfornfv-cyclictest-daily-build-{stream}' current-parameters: false node-parameters: false git-revision: true kill-phase-on: FAILURE abort-all-job: true - multijob: - name: build + name: cyclictest-test + condition: SUCCESSFUL + projects: + - name: 'kvmfornfv-cyclictest-daily-test-{stream}' + current-parameters: false + node-parameters: false + git-revision: true + kill-phase-on: FAILURE + abort-all-job: true + - multijob: + name: packetforward-build + condition: SUCCESSFUL + projects: + - name: 'kvmfornfv-packet_forward-daily-build-{stream}' + current-parameters: false + node-parameters: false + git-revision: true + kill-phase-on: FAILURE + abort-all-job: true + - multijob: + name: packetforward-test condition: SUCCESSFUL projects: - - name: 'kvmfornfv-{testname}-daily-test-{stream}' + - name: 'kvmfornfv-packet_forward-daily-test-{stream}' current-parameters: false node-parameters: false git-revision: true @@ -240,15 +249,10 @@ concurrent: false scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - choosing-strategy: 'default' + - git-scm wrappers: - - ssh-agent-credentials: - users: - - '{ssh-credentials}' + - ssh-agent-wrapper - timeout: timeout: 360 fail: true diff --git a/jjb/moon/moon.yml b/jjb/moon/moon.yml index a52cf2cd1..15c3ddec8 100644 --- a/jjb/moon/moon.yml +++ b/jjb/moon/moon.yml @@ -22,10 +22,7 @@ - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: diff --git a/jjb/multisite/multisite.yml b/jjb/multisite/multisite.yml index 8e542995e..cfe9b2d13 100644 --- a/jjb/multisite/multisite.yml +++ b/jjb/multisite/multisite.yml @@ -39,10 +39,7 @@ - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: @@ -96,10 +93,7 @@ default: 'os-nosdn-multisite-ha' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - choosing-strategy: 'default' + - git-scm triggers: - timed: '{timed}' @@ -128,10 +122,7 @@ concurrent: false scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - choosing-strategy: 'gerrit' + - git-scm-gerrit builders: - 'multisite-kingbird-deploy' diff --git a/jjb/netready/netready-gluon-build.sh b/jjb/netready/netready-gluon-build.sh new file mode 100755 index 000000000..141e84cbd --- /dev/null +++ b/jjb/netready/netready-gluon-build.sh @@ -0,0 +1,42 @@ +#!/bin/bash +set -o errexit +set -o nounset +set -o pipefail + +echo "Building Gluon packages." +echo "------------------------" +echo + +OPNFV_ARTIFACT_VERSION=$(echo $(date -u +"%Y%m%d")) + +# build all packages +cd $WORKSPACE/ci +./build-gluon-packages.sh + +# list the contents of BUILD_OUTPUT directory +echo "Build Directory is ${BUILD_DIRECTORY}" +echo "Build Directory Contents:" +echo "---------------------------------------" +ls -alR $BUILD_DIRECTORY + +# get version infos from Gluon from spec +GLUON_VERSION=$(grep Version: $BUILD_DIRECTORY/rpm_specs/gluon.spec | awk '{ print $2 }') +GLUON_RELEASE=$(grep 'define release' $BUILD_DIRECTORY/rpm_specs/gluon.spec | awk '{ print $3 }')_$OPNFV_ARTIFACT_VERSION + +ARTIFACT_NAME=gluon-$GLUON_VERSION-$GLUON_RELEASE.noarch.rpm +ARTIFACT_PATH=$BUILD_DIRECTORY/noarch/$ARTIFACT_NAME + +echo "Writing opnfv.properties file" +# save information regarding artifact into file +( + echo "OPNFV_ARTIFACT_VERSION=$OPNFV_ARTIFACT_VERSION" + echo "OPNFV_GIT_URL=$(git config --get remote.origin.url)" + echo "OPNFV_GIT_SHA1=$(git rev-parse HEAD)" + echo "OPNFV_ARTIFACT_URL=$GS_URL/$ARTIFACT_NAME" + echo "OPNFV_ARTIFACT_SHA512SUM=$(sha512sum $ARTIFACT_PATH | cut -d' ' -f1)" + echo "OPNFV_BUILD_URL=$BUILD_URL" + echo "ARTIFACT_LIST=$ARTIFACT_PATH" +) > $WORKSPACE/opnfv.properties + +echo "---------------------------------------" +echo "Done!" diff --git a/jjb/netready/netready-upload-gluon-packages.sh b/jjb/netready/netready-upload-gluon-packages.sh new file mode 100755 index 000000000..7c1e33727 --- /dev/null +++ b/jjb/netready/netready-upload-gluon-packages.sh @@ -0,0 +1,27 @@ +#!/bin/bash +set -o errexit +set -o nounset +set -o pipefail + +echo "Uploading Gluon packages" +echo "--------------------------------------------------------" +echo + +source $WORKSPACE/opnfv.properties + +for artifact in $ARTIFACT_LIST; do + echo "Uploading artifact: ${artifact}" + gsutil cp $artifact gs://$GS_URL/$(basename $artifact) > gsutil.$(basename $artifact).log + echo "Upload complete for ${artifact}" +done + +gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > gsutil.properties.log +gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/latest.properties > gsutil.properties.log + +echo "--------------------------------------------------------" +echo "Upload done!" + +echo "Artifacts are not available as:" +for artifact in $ARTIFACT_LIST; do + echo "http://$GS_URL/$(basename $artifact)" +done diff --git a/jjb/netready/netready.yml b/jjb/netready/netready.yml index cc6769e92..3d043f9e3 100644 --- a/jjb/netready/netready.yml +++ b/jjb/netready/netready.yml @@ -5,16 +5,13 @@ jobs: - 'netready-verify-{stream}' + - 'netready-build-gluon-packages-daily-{stream}' stream: - master: branch: '{stream}' gs-pathname: '' disabled: false - - colorado: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false - job-template: name: 'netready-verify-{stream}' @@ -27,10 +24,7 @@ - gerrit-parameter: branch: '{branch}' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: @@ -58,3 +52,60 @@ builders: - shell: | echo "Nothing to verify!" + + + +- job-template: + name: 'netready-build-gluon-packages-daily-{stream}' + + disabled: false + + concurrent: true + + parameters: + - project-parameter: + project: '{project}' + - gerrit-parameter: + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' + - 'netready-parameter': + gs-pathname: '{gs-pathname}' + + scm: + - git-scm + + builders: + - 'netready-gluon-build' + + triggers: + - timed: '@midnight' + + +######################## +# builder macros +######################## + +- builder: + name: 'netready-gluon-build' + builders: + - shell: + !include-raw: ./netready-gluon-build.sh + - shell: + !include-raw: ./netready-upload-gluon-packages.sh + + +######################## +# parameter macros +######################## + +- parameter: + name: netready-parameter + parameters: + - string: + name: BUILD_DIRECTORY + default: $WORKSPACE/build + description: "Directory where the build artifact will be located upon the completion of the build." + - string: + name: GS_URL + default: artifacts.opnfv.org/$PROJECT{gs-pathname} + description: "URL to Google Storage." diff --git a/jjb/octopus/octopus.yml b/jjb/octopus/octopus.yml index 741aa0905..71d6a41fe 100644 --- a/jjb/octopus/octopus.yml +++ b/jjb/octopus/octopus.yml @@ -32,10 +32,7 @@ - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: diff --git a/jjb/onosfw/onosfw.yml b/jjb/onosfw/onosfw.yml index 33ede475f..07bcdc5f6 100644 --- a/jjb/onosfw/onosfw.yml +++ b/jjb/onosfw/onosfw.yml @@ -36,10 +36,7 @@ - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: @@ -75,13 +72,12 @@ parameters: - project-parameter: project: '{project}' + - gerrit-parameter: + branch: '{branch}' - 'opnfv-build-ubuntu-defaults' scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm triggers: - timed: '@midnight' @@ -100,6 +96,8 @@ parameters: - project-parameter: project: '{project}' + - gerrit-parameter: + branch: '{branch}' - 'opnfv-build-ubuntu-defaults' - string: name: GS_URL @@ -107,10 +105,7 @@ description: "Directory where the build artifact will be located upon the completion of the build." scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm builders: - 'builder-onosfw-helloworld' diff --git a/jjb/opera/opera-daily-jobs.yml b/jjb/opera/opera-daily-jobs.yml new file mode 100644 index 000000000..556d59fcb --- /dev/null +++ b/jjb/opera/opera-daily-jobs.yml @@ -0,0 +1,143 @@ +- project: + name: 'opera-daily-jobs' + + project: 'opera' + +##################################### +# branch definitions +##################################### + stream: + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + +##################################### +# patch verification phases +##################################### + phase: + - 'basic' + - 'deploy' + +##################################### +# jobs +##################################### + jobs: + - 'opera-daily-{stream}' + - 'opera-daily-{phase}-{stream}' +##################################### +# job templates +##################################### +- job-template: + name: 'opera-daily-{stream}' + + project-type: multijob + + disabled: '{obj:disabled}' + + concurrent: false + + properties: + - throttle: + enabled: true + max-total: 1 + max-per-node: 1 + option: 'project' + + scm: + - git-scm + + wrappers: + - ssh-agent-wrapper + + - timeout: + timeout: 120 + fail: true + + triggers: + - timed: '@midnight' + + parameters: + - project-parameter: + project: '{project}' + - gerrit-parameter: + branch: '{branch}' + - 'huawei-pod7-defaults' + + builders: + - description-setter: + description: "Built on $NODE_NAME" + - multijob: + name: basic + condition: SUCCESSFUL + projects: + - name: 'opera-daily-basic-{stream}' + current-parameters: true + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + - multijob: + name: deploy + condition: SUCCESSFUL + projects: + - name: 'opera-daily-deploy-{stream}' + current-parameters: true + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true +# - multijob: +# name: functest +# condition: SUCCESSFUL +# projects: +# - name: 'functest-compass-baremetal-suite-{stream}' +# current-parameters: true +# predefined-parameters: +# FUNCTEST_SUITE_NAME=opera +# node-parameters: true +# kill-phase-on: NEVER +# abort-all-job: true + +- job-template: + name: 'opera-daily-{phase}-{stream}' + + disabled: '{obj:disabled}' + + concurrent: true + + properties: + - throttle: + enabled: true + max-per-node: 1 + option: 'project' + + scm: + - git-scm + + wrappers: + - ssh-agent-wrapper + - timeout: + timeout: 120 + fail: true + + builders: + - description-setter: + description: "Built on $NODE_NAME" + - '{project}-daily-{phase}-macro' + +##################################### +# builder macros +##################################### +- builder: + name: 'opera-daily-basic-macro' + builders: + - shell: | + #!/bin/bash + echo "Hello world!" + +- builder: + name: 'opera-daily-deploy-macro' + builders: + - shell: | + #!/bin/bash + echo "Hello world!" + diff --git a/jjb/opera/opera-project-jobs.yml b/jjb/opera/opera-project-jobs.yml new file mode 100644 index 000000000..19f066b5f --- /dev/null +++ b/jjb/opera/opera-project-jobs.yml @@ -0,0 +1,57 @@ +- project: + + name: opera-project + + project: 'opera' + + stream: + - master: + branch: '{stream}' + gs-pathname: '' + + jobs: + - 'opera-build-{stream}' + +######################## +# job templates +######################## +- job-template: + name: 'opera-build-{stream}' + + concurrent: true + + properties: + - throttle: + enabled: true + max-total: 1 + max-per-node: 1 + option: 'project' + + parameters: + - project-parameter: + project: '{project}' + - 'opnfv-build-ubuntu-defaults' + - gerrit-parameter: + branch: '{branch}' + + scm: + - git-scm + + triggers: + - timed: 'H 23 * * *' + + builders: + - 'opera-build-macro' + +##################################### +# builder macros +##################################### +- builder: + name: 'opera-build-macro' + builders: + - shell: | + #!/bin/bash + + echo "Hello world!" + + diff --git a/jjb/opera/opera-verify-jobs.yml b/jjb/opera/opera-verify-jobs.yml new file mode 100644 index 000000000..0e9dba01d --- /dev/null +++ b/jjb/opera/opera-verify-jobs.yml @@ -0,0 +1,155 @@ +- project: + name: 'opera-verify-jobs' + + project: 'opera' + +##################################### +# branch definitions +##################################### + stream: + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + +##################################### +# patch verification phases +##################################### + phase: + - 'basic' + - 'deploy' + +##################################### +# jobs +##################################### + jobs: + - 'opera-verify-{stream}' + - 'opera-verify-{phase}-{stream}' +##################################### +# job templates +##################################### +- job-template: + name: 'opera-verify-{stream}' + + project-type: multijob + + disabled: '{obj:disabled}' + + concurrent: true + + properties: + - throttle: + enabled: true + max-total: 1 + max-per-node: 1 + option: 'project' + + scm: + - git-scm-gerrit + + wrappers: + - ssh-agent-wrapper + - timeout: + timeout: 120 + fail: true + + triggers: + - gerrit: + server-name: 'gerrit.opnfv.org' + trigger-on: + - patchset-created-event: + exclude-drafts: 'false' + exclude-trivial-rebase: 'false' + exclude-no-code-change: 'false' + - draft-published-event + - comment-added-contains-event: + comment-contains-value: 'recheck' + - comment-added-contains-event: + comment-contains-value: 'reverify' + projects: + - project-compare-type: 'ANT' + project-pattern: '{project}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + file-paths: + - compare-type: ANT + pattern: '**/*' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**' + readable-message: true + + parameters: + - project-parameter: + project: '{project}' + - gerrit-parameter: + branch: '{branch}' + - 'huawei-pod7-defaults' + + builders: + - description-setter: + description: "Built on $NODE_NAME" + - multijob: + name: basic + condition: SUCCESSFUL + projects: + - name: 'opera-verify-basic-{stream}' + current-parameters: true + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + - multijob: + name: deploy + condition: SUCCESSFUL + projects: + - name: 'opera-verify-deploy-{stream}' + current-parameters: true + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + +- job-template: + name: 'opera-verify-{phase}-{stream}' + + disabled: '{obj:disabled}' + + concurrent: true + + properties: + - throttle: + enabled: true + max-per-node: 1 + option: 'project' + + scm: + - git-scm-gerrit + + wrappers: + - ssh-agent-wrapper + - timeout: + timeout: 120 + fail: true + + builders: + - description-setter: + description: "Built on $NODE_NAME" + - '{project}-verify-{phase}-macro' + +##################################### +# builder macros +##################################### +- builder: + name: 'opera-verify-basic-macro' + builders: + - shell: | + #!/bin/bash + echo "Hello world!" + +- builder: + name: 'opera-verify-deploy-macro' + builders: + - shell: | + #!/bin/bash + echo "Hello world!" + diff --git a/jjb/opnfvdocs/opnfvdocs.yml b/jjb/opnfvdocs/opnfvdocs.yml index 724ef6aab..d8cfabc05 100644 --- a/jjb/opnfvdocs/opnfvdocs.yml +++ b/jjb/opnfvdocs/opnfvdocs.yml @@ -42,10 +42,7 @@ description: "Used for overriding the GIT URL coming from parameters macro." scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: @@ -90,10 +87,7 @@ description: "Directory where the build artifact will be located upon the completion of the build." scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: @@ -134,10 +128,7 @@ description: 'Specify the branch in this way in order to be able to use build-opnfv-composite-docs builder.' scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm triggers: - timed: '0 H/6 * * *' diff --git a/jjb/ovsnfv/ovsnfv.yml b/jjb/ovsnfv/ovsnfv.yml index 28d268379..a5b8fd812 100644 --- a/jjb/ovsnfv/ovsnfv.yml +++ b/jjb/ovsnfv/ovsnfv.yml @@ -35,10 +35,7 @@ description: "Directory where the build artifact will be located upon the completion of the build." scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: @@ -85,10 +82,7 @@ description: "Directory where the build artifact will be located upon the completion of the build." scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - choosing-strategy: 'default' + - git-scm wrappers: - timeout: @@ -125,6 +119,8 @@ parameters: - project-parameter: project: '{project}' + - gerrit-parameter: + branch: '{branch}' - 'opnfv-build-centos-defaults' - string: name: GS_URL @@ -132,10 +128,7 @@ description: "Directory where the build artifact will be located upon the completion of the build." scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm wrappers: - timeout: diff --git a/jjb/parser/parser.yml b/jjb/parser/parser.yml index cd6c6e093..50c7d2585 100644 --- a/jjb/parser/parser.yml +++ b/jjb/parser/parser.yml @@ -33,10 +33,7 @@ - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: diff --git a/jjb/pharos/pharos.yml b/jjb/pharos/pharos.yml index 92216ee35..1a605d395 100644 --- a/jjb/pharos/pharos.yml +++ b/jjb/pharos/pharos.yml @@ -33,10 +33,7 @@ - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: diff --git a/jjb/prediction/prediction.yml b/jjb/prediction/prediction.yml index 951188ce2..c0066bf7f 100644 --- a/jjb/prediction/prediction.yml +++ b/jjb/prediction/prediction.yml @@ -33,10 +33,7 @@ - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: diff --git a/jjb/promise/promise.yml b/jjb/promise/promise.yml index f620f6f9e..38e181476 100644 --- a/jjb/promise/promise.yml +++ b/jjb/promise/promise.yml @@ -33,10 +33,7 @@ - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: diff --git a/jjb/qtip/qtip-ci-jobs.yml b/jjb/qtip/qtip-ci-jobs.yml index ac9854365..b83014edb 100644 --- a/jjb/qtip/qtip-ci-jobs.yml +++ b/jjb/qtip/qtip-ci-jobs.yml @@ -44,6 +44,8 @@ parameters: - project-parameter: project: '{project}' + - gerrit-parameter: + branch: '{branch}' - '{installer}-defaults' - '{pod}-defaults' - string: @@ -55,10 +57,7 @@ description: 'Tag to pull docker image' scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm triggers: - '{auto-trigger-name}' diff --git a/jjb/qtip/qtip-project-jobs.yml b/jjb/qtip/qtip-project-jobs.yml index 8798fd115..a9c8251fc 100644 --- a/jjb/qtip/qtip-project-jobs.yml +++ b/jjb/qtip/qtip-project-jobs.yml @@ -28,10 +28,7 @@ - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: diff --git a/jjb/releng/artifact-cleanup.yml b/jjb/releng/artifact-cleanup.yml index 1c609a4b2..e10d5defb 100644 --- a/jjb/releng/artifact-cleanup.yml +++ b/jjb/releng/artifact-cleanup.yml @@ -27,12 +27,11 @@ parameters: - project-parameter: project: '{project}' + - gerrit-parameter: + branch: '{branch}' scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm triggers: - timed: 'H H * * *' diff --git a/jjb/releng/opnfv-docker.yml b/jjb/releng/opnfv-docker.yml index 7a4c9af51..be04b15c9 100644 --- a/jjb/releng/opnfv-docker.yml +++ b/jjb/releng/opnfv-docker.yml @@ -45,6 +45,18 @@ - '{project}-docker-build-push-{stream}' +- project: + + name: opnfv-monitor-docker # projects which only monitor dedicated file or path + + project: + # projects with jobs for master + - 'daisy': + <<: *master + + jobs: + - '{project}-docker-build-push-monitor-{stream}' + ######################## # job templates ######################## @@ -53,9 +65,11 @@ disabled: '{obj:disabled}' - parameters: + parameters: ¶meters - project-parameter: project: '{project}' + - gerrit-parameter: + branch: '{branch}' - 'opnfv-build-ubuntu-defaults' - string: name: PUSH_IMAGE @@ -71,12 +85,9 @@ description: "Release version, e.g. 1.0, 2.0, 3.0" scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm - builders: + builders: &builders - shell: !include-raw-escape: ./opnfv-docker.sh @@ -84,3 +95,28 @@ - pollscm: cron: "*/30 * * * *" +- job-template: + name: '{project}-docker-build-push-monitor-{stream}' + disabled: '{obj:disabled}' + parameters: *parameters + scm: + - git-scm + builders: *builders + + # trigger only matching the file name + triggers: + - gerrit: + trigger-on: + - change-merged-event + - comment-added-contains-event: + comment-contains-value: 'remerge' + projects: + - project-compare-type: 'ANT' + project-pattern: '{project}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + file-paths: + - compare-type: ANT + pattern: 'docker/**' + diff --git a/jjb/releng/opnfv-docs.yml b/jjb/releng/opnfv-docs.yml index a18374592..cd70a80e4 100644 --- a/jjb/releng/opnfv-docs.yml +++ b/jjb/releng/opnfv-docs.yml @@ -39,10 +39,7 @@ branch: '{branch}' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: @@ -92,10 +89,7 @@ description: "JJB configured GERRIT_REFSPEC parameter" scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: diff --git a/jjb/releng/opnfv-lint.yml b/jjb/releng/opnfv-lint.yml index c2624debc..a96fce6b0 100644 --- a/jjb/releng/opnfv-lint.yml +++ b/jjb/releng/opnfv-lint.yml @@ -9,6 +9,7 @@ jobs: - 'opnfv-lint-verify-{stream}' + - 'opnfv-yamllint-verify-{stream}' stream: - master: @@ -36,10 +37,7 @@ branch: '{branch}' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: @@ -67,3 +65,55 @@ builders: - lint-python-code - report-lint-result-to-gerrit + +- job-template: + name: 'opnfv-yamllint-verify-{stream}' + + disabled: '{obj:disabled}' + + concurrent: true + + parameters: + - project-parameter: + project: $GERRIT_PROJECT + - gerrit-parameter: + branch: '{branch}' + - node: + name: SLAVE_NAME + description: Slaves to execute yamllint + default-slaves: + - lf-build1 + allowed-multiselect: true + ignore-offline-nodes: true + + scm: + - git-scm-gerrit + + triggers: + - gerrit: + server-name: 'gerrit.opnfv.org' + trigger-on: + - patchset-created-event: + exclude-drafts: 'false' + exclude-trivial-rebase: 'false' + exclude-no-code-change: 'false' + - draft-published-event + - comment-added-contains-event: + comment-contains-value: 'recheck' + - comment-added-contains-event: + comment-contains-value: 'reverify' + projects: + - project-compare-type: 'REG_EXP' + project-pattern: 'compass4nfv' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + file-paths: + - compare-type: ANT + pattern: '**/*.yml' + - compare-type: ANT + pattern: '**/*.yaml' + + builders: + - lint-yaml-code + - report-lint-result-to-gerrit diff --git a/jjb/releng/releng-ci-jobs.yml b/jjb/releng/releng-ci-jobs.yml index fc77c2d48..626daffbd 100644 --- a/jjb/releng/releng-ci-jobs.yml +++ b/jjb/releng/releng-ci-jobs.yml @@ -16,10 +16,7 @@ - gerrit-parameter: branch: 'master' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: @@ -71,10 +68,7 @@ branch: 'master' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - choosing-strategy: 'default' + - git-scm triggers: - gerrit: @@ -114,10 +108,7 @@ branch: 'master' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - choosing-strategy: 'default' + - git-scm triggers: - timed: '@hourly' diff --git a/jjb/securityscanning/opnfv-security-scan.yml b/jjb/securityaudit/opnfv-security-audit.yml index 546f4e7e5..680be20d2 100644 --- a/jjb/securityscanning/opnfv-security-scan.yml +++ b/jjb/securityaudit/opnfv-security-audit.yml @@ -8,7 +8,7 @@ project: anteaterfw jobs: - - 'opnfv-security-scan-verify-{stream}' + - 'opnfv-security-audit-verify-{stream}' stream: - master: @@ -20,7 +20,7 @@ # job templates ######################## - job-template: - name: 'opnfv-security-scan-verify-{stream}' + name: 'opnfv-security-audit-verify-{stream}' disabled: '{obj:disabled}' @@ -31,10 +31,7 @@ branch: '{branch}' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: @@ -65,13 +62,13 @@ notbuilt: true builders: - - security-scan-python-code - - report-security-scan-result-to-gerrit + - security-audit-python-code + - report-security-audit-result-to-gerrit ######################## # builder macros ######################## - builder: - name: security-scan-python-code + name: security-audit-python-code builders: - shell: | #!/bin/bash @@ -80,10 +77,10 @@ set -o xtrace export PATH=$PATH:/usr/local/bin/ - # this is where the security/license scan script will be executed + # this is where the security/license audit script will be executed echo "Hello World!" - builder: - name: report-security-scan-result-to-gerrit + name: report-security-audit-result-to-gerrit builders: - shell: | #!/bin/bash @@ -93,15 +90,15 @@ export PATH=$PATH:/usr/local/bin/ # If no violations were found, no lint log will exist. - if [[ -e securityscan.log ]] ; then - echo -e "\nposting security scan report to gerrit...\n" + if [[ -e securityaudit.log ]] ; then + echo -e "\nposting security audit report to gerrit...\n" - cat securityscan.log + cat securityaudit.log echo ssh -p 29418 gerrit.opnfv.org \ "gerrit review -p $GERRIT_PROJECT \ - -m \"$(cat securityscan.log)\" \ + -m \"$(cat securityaudit.log)\" \ $GERRIT_PATCHSET_REVISION \ --notify NONE" diff --git a/jjb/storperf/storperf.yml b/jjb/storperf/storperf.yml index 4e72af50b..1a2eb5e31 100644 --- a/jjb/storperf/storperf.yml +++ b/jjb/storperf/storperf.yml @@ -36,10 +36,7 @@ description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW." scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: @@ -100,10 +97,7 @@ description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW." scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - choosing-strategy: 'default' + - git-scm triggers: - gerrit: @@ -157,12 +151,11 @@ parameters: - project-parameter: project: '{project}' + - gerrit-parameter: + branch: '{branch}' scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm triggers: - timed: 'H H * * *' diff --git a/jjb/vnf_forwarding_graph/vnf_forwarding_graph.yml b/jjb/vnf_forwarding_graph/vnf_forwarding_graph.yml index 6dd3acf3a..54e83386b 100644 --- a/jjb/vnf_forwarding_graph/vnf_forwarding_graph.yml +++ b/jjb/vnf_forwarding_graph/vnf_forwarding_graph.yml @@ -27,10 +27,7 @@ - gerrit-parameter: branch: '{branch}' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: diff --git a/jjb/vswitchperf/vswitchperf.yml b/jjb/vswitchperf/vswitchperf.yml index cda5128e2..fe8ea5381 100644 --- a/jjb/vswitchperf/vswitchperf.yml +++ b/jjb/vswitchperf/vswitchperf.yml @@ -30,13 +30,12 @@ parameters: - project-parameter: project: '{project}' + - gerrit-parameter: + branch: '{branch}' - 'intel-pod3-defaults' scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm triggers: - pollscm: @@ -47,7 +46,7 @@ pwd cd src make clobber - make + make MORE_MAKE_FLAGS="-j 10" # run basic sanity test make sanity cd ../ci @@ -78,10 +77,7 @@ - '{slave-label}-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: @@ -111,7 +107,7 @@ pwd cd src make clobber - make + make MORE_MAKE_FLAGS="-j 5" # run basic sanity test make sanity cd ../ci @@ -142,10 +138,7 @@ - '{slave-label}-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - choosing-strategy: 'default' + - git-scm triggers: - gerrit: @@ -169,6 +162,6 @@ pwd cd src make clobber - make + make MORE_MAKE_FLAGS="-j 5" cd ../ci ./build-vsperf.sh merge diff --git a/jjb/yardstick/yardstick-ci-jobs.yml b/jjb/yardstick/yardstick-ci-jobs.yml index 9d80e42ae..1ad5417d4 100644 --- a/jjb/yardstick/yardstick-ci-jobs.yml +++ b/jjb/yardstick/yardstick-ci-jobs.yml @@ -238,6 +238,8 @@ parameters: - project-parameter: project: '{project}' + - gerrit-parameter: + branch: '{branch}' - '{installer}-defaults' - '{slave-label}-defaults' - 'yardstick-params-{slave-label}' @@ -258,10 +260,7 @@ description: "Show debut output information" scm: - - git-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - branch: '{branch}' + - git-scm builders: - description-setter: @@ -269,6 +268,7 @@ - 'yardstick-cleanup' #- 'yardstick-fetch-os-creds' - 'yardstick-{testsuite}' + - 'yardstick-store-results' publishers: - email: @@ -296,6 +296,12 @@ !include-raw: ../../utils/fetch_os_creds.sh - builder: + name: yardstick-store-results + builders: + - shell: + !include-raw: ../../utils/push-test-logs.sh + +- builder: name: yardstick-cleanup builders: - shell: diff --git a/jjb/yardstick/yardstick-daily.sh b/jjb/yardstick/yardstick-daily.sh index b3705415f..da9042bbc 100755 --- a/jjb/yardstick/yardstick-daily.sh +++ b/jjb/yardstick/yardstick-daily.sh @@ -37,8 +37,15 @@ envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \ echo "Yardstick: Pulling image opnfv/yardstick:${DOCKER_TAG}" docker pull opnfv/yardstick:$DOCKER_TAG >$redirect +# map log directory +branch=${GIT_BRANCH##*/} +dir_result="${HOME}/opnfv/yardstick/results/${branch}" +mkdir -p ${dir_result} +sudo rm -rf ${dir_result}/* +map_log_dir="-v ${dir_result}:/tmp/yardstick" + # Run docker -cmd="sudo docker run ${opts} ${envs} ${labconfig} ${sshkey} opnfv/yardstick:${DOCKER_TAG} \ +cmd="sudo docker run ${opts} ${envs} ${labconfig} ${map_log_dir} ${sshkey} opnfv/yardstick:${DOCKER_TAG} \ exec_tests.sh ${YARDSTICK_DB_BACKEND} ${YARDSTICK_SCENARIO_SUITE_NAME}" echo "Yardstick: Running docker cmd: ${cmd}" ${cmd} diff --git a/jjb/yardstick/yardstick-project-jobs.yml b/jjb/yardstick/yardstick-project-jobs.yml index afa6b7844..48c9d9d56 100644 --- a/jjb/yardstick/yardstick-project-jobs.yml +++ b/jjb/yardstick/yardstick-project-jobs.yml @@ -38,10 +38,7 @@ - 'opnfv-build-ubuntu-defaults' scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' + - git-scm-gerrit triggers: - gerrit: @@ -82,10 +79,7 @@ description: "Directory where the build artifact will be located upon the completion of the build." scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '' - choosing-strategy: 'default' + - git-scm triggers: - gerrit: |