diff options
Diffstat (limited to 'jjb/3rd_party_ci')
-rwxr-xr-x | jjb/3rd_party_ci/create-apex-vms.sh | 12 | ||||
-rwxr-xr-x | jjb/3rd_party_ci/download-netvirt-artifact.sh | 23 | ||||
-rwxr-xr-x | jjb/3rd_party_ci/functest-netvirt.sh | 7 | ||||
-rwxr-xr-x | jjb/3rd_party_ci/install-netvirt.sh | 8 | ||||
-rw-r--r-- | jjb/3rd_party_ci/odl-netvirt.yml | 212 | ||||
-rwxr-xr-x | jjb/3rd_party_ci/postprocess-netvirt.sh | 7 |
6 files changed, 269 insertions, 0 deletions
diff --git a/jjb/3rd_party_ci/create-apex-vms.sh b/jjb/3rd_party_ci/create-apex-vms.sh new file mode 100755 index 000000000..a076dd084 --- /dev/null +++ b/jjb/3rd_party_ci/create-apex-vms.sh @@ -0,0 +1,12 @@ +#!/bin/bash +set -e + +# wipe the WORKSPACE +/bin/rm -rf $WORKSPACE/* + +# 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 +./test_environment.sh --env-number $APEX_ENV_NUMBER --cloner-info $CLONER_INFO --snapshot-disks $SNAPSHOT_DISKS --vjump-hosts $VIRTUAL_JUMPHOSTS +popd diff --git a/jjb/3rd_party_ci/download-netvirt-artifact.sh b/jjb/3rd_party_ci/download-netvirt-artifact.sh new file mode 100755 index 000000000..0a48e3aec --- /dev/null +++ b/jjb/3rd_party_ci/download-netvirt-artifact.sh @@ -0,0 +1,23 @@ +#!/bin/bash +set -e + +# wipe the WORKSPACE +/bin/rm -rf $WORKSPACE/* + +echo "Attempting to fetch the artifact location from ODL Jenkins" +CHANGE_DETAILS_URL="https://git.opendaylight.org/gerrit/changes/netvirt~master~$GERRIT_CHANGE_ID/detail" +# due to limitation with the Jenkins Gerrit Trigger, we need to use Gerrit REST API to get the change details +ODL_JOB_URL=$(curl -s $CHANGE_DETAILS_URL | grep netvirt-patch-test-current-carbon | tail -1 | \ + sed 's/\\n//g' | awk '{print $6}') +NETVIRT_ARTIFACT_URL="${ODL_JOB_URL}org.opendaylight.integration\$distribution-karaf/artifact/org.opendaylight.integration/distribution-karaf/0.6.0-SNAPSHOT/distribution-karaf-0.6.0-SNAPSHOT.tar.gz" +echo -e "URL to artifact is\n\t$NETVIRT_ARTIFACT_URL" + +echo "Downloading the artifact. This could take time..." +wget -q -O $NETVIRT_ARTIFACT $NETVIRT_ARTIFACT_URL +if [[ $? -ne 0 ]]; then + echo "The artifact does not exist! Probably removed due to ODL Jenkins artifact retention policy." + echo "Rerun netvirt-patch-test-current-carbon to get artifact rebuilt." + exit 1 +fi +echo "Download complete" +ls -al $NETVIRT_ARTIFACT diff --git a/jjb/3rd_party_ci/functest-netvirt.sh b/jjb/3rd_party_ci/functest-netvirt.sh new file mode 100755 index 000000000..adffaf42d --- /dev/null +++ b/jjb/3rd_party_ci/functest-netvirt.sh @@ -0,0 +1,7 @@ +#!/bin/bash +set -e + +# wipe the WORKSPACE +/bin/rm -rf $WORKSPACE/* + +echo "Hello World" diff --git a/jjb/3rd_party_ci/install-netvirt.sh b/jjb/3rd_party_ci/install-netvirt.sh new file mode 100755 index 000000000..96c4b9634 --- /dev/null +++ b/jjb/3rd_party_ci/install-netvirt.sh @@ -0,0 +1,8 @@ +#!/bin/bash +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 +./odl_reinstaller.sh --cloner-info $CLONER_INFO --odl-artifact $NETVIRT_ARTIFACT +popd
\ No newline at end of file diff --git a/jjb/3rd_party_ci/odl-netvirt.yml b/jjb/3rd_party_ci/odl-netvirt.yml new file mode 100644 index 000000000..3dd4c0b44 --- /dev/null +++ b/jjb/3rd_party_ci/odl-netvirt.yml @@ -0,0 +1,212 @@ +- project: + name: 'netvirt' + + project: 'netvirt' + + installer: 'apex' +##################################### +# branch definitions +##################################### + stream: + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false +##################################### +# patch verification phases +##################################### + phase: + - 'create-apex-vms': + slave-label: 'ericsson-virtual5' + - 'install-netvirt': + slave-label: 'odl-netvirt-virtual' + - 'functest': + slave-label: 'odl-netvirt-virtual' + - 'postprocess': + slave-label: 'odl-netvirt-virtual' +##################################### +# jobs +##################################### + jobs: + - 'odl-netvirt-verify-virtual-{stream}' + - 'odl-netvirt-verify-virtual-{phase}-{stream}' +##################################### +# job templates +##################################### +- job-template: + name: 'odl-netvirt-verify-virtual-{stream}' + + project-type: multijob + + disabled: '{obj:disabled}' + + concurrent: true + + properties: + - throttle: + enabled: true + max-total: 5 + max-per-node: 1 + option: 'project' + + parameters: + - project-parameter: + project: '{project}' + - gerrit-parameter: + branch: '{branch}' + - string: + name: NETVIRT_ARTIFACT + default: $WORKSPACE/distribution-karaf.tar.gz + - 'odl-netvirt-virtual-defaults' + + triggers: + - gerrit: + server-name: 'git.opendaylight.org' + trigger-on: + - comment-added-contains-event: + comment-contains-value: 'https://jenkins.opendaylight.org/releng/job/netvirt-patch-test-current-carbon/.*?/ : SUCCESS' + - comment-added-contains-event: + comment-contains-value: 'https://jenkins.opendaylight.org/releng/job/netvirt-patch-test-current-carbon/.*?/ : UNSTABLE' + - comment-added-contains-event: + comment-contains-value: 'opnfv-test' + projects: + - project-compare-type: 'ANT' + project-pattern: '{project}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + readable-message: true + + builders: + - description-setter: + description: "Built on $NODE_NAME" + - multijob: + name: create-apex-vms + condition: SUCCESSFUL + projects: + - name: 'odl-netvirt-verify-virtual-create-apex-vms-{stream}' + current-parameters: false + predefined-parameters: | + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_ID=$GERRIT_CHANGE_ID + GERRIT_PATCHSET_NUMBER=$GERRIT_PATCHSET_NUMBER + GERRIT_PATCHSET_REVISION=$GERRIT_PATCHSET_REVISION + NETVIRT_ARTIFACT=$NETVIRT_ARTIFACT + APEX_ENV_NUMBER=$APEX_ENV_NUMBER + node-parameters: false + kill-phase-on: FAILURE + abort-all-job: true + - multijob: + name: install-netvirt + condition: SUCCESSFUL + projects: + - name: 'odl-netvirt-verify-virtual-install-netvirt-{stream}' + current-parameters: false + predefined-parameters: | + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_ID=$GERRIT_CHANGE_ID + GERRIT_PATCHSET_NUMBER=$GERRIT_PATCHSET_NUMBER + GERRIT_PATCHSET_REVISION=$GERRIT_PATCHSET_REVISION + NETVIRT_ARTIFACT=$NETVIRT_ARTIFACT + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + - multijob: + name: functest + condition: SUCCESSFUL + projects: + - name: 'functest-netvirt-virtual-suite-{stream}' + predefined-parameters: | + FUNCTEST_SUITE_NAME=vping_userdata,bgpvpn + RC_FILE_PATH=/home/jenkins/cloner-info/overcloudrc + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: false + - multijob: + name: postprocess + condition: ALWAYS + projects: + - name: 'odl-netvirt-verify-virtual-postprocess-{stream}' + current-parameters: false + predefined-parameters: | + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_ID=$GERRIT_CHANGE_ID + GERRIT_PATCHSET_NUMBER=$GERRIT_PATCHSET_NUMBER + GERRIT_PATCHSET_REVISION=$GERRIT_PATCHSET_REVISION + NETVIRT_ARTIFACT=$NETVIRT_ARTIFACT + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + +- job-template: + name: 'odl-netvirt-verify-virtual-{phase}-{stream}' + + disabled: '{obj:disabled}' + + concurrent: true + + properties: + - throttle: + enabled: true + max-total: 5 + max-per-node: 1 + option: 'project' + - build-blocker: + use-build-blocker: true + blocking-jobs: + - 'odl-netvirt-verify-virtual-install-.*' + - 'odl-netvirt-verify-virtual-functest-.*' + - 'odl-netvirt-verify-virtual-postprocess-.*' + block-level: 'NODE' + + wrappers: + - ssh-agent-credentials: + users: + - '{ssh-credentials}' + - timeout: + timeout: 360 + fail: true + + parameters: + - project-parameter: + project: '{project}' + - gerrit-parameter: + branch: '{branch}' + - '{slave-label}-defaults' + - '{installer}-defaults' + + builders: + - description-setter: + description: "Built on $NODE_NAME" + - '{project}-verify-{phase}-builder' +##################################### +# builder macros +##################################### +- builder: + name: 'netvirt-verify-create-apex-vms-builder' + builders: + - shell: + !include-raw: ./create-apex-vms.sh +- builder: + name: 'netvirt-verify-install-netvirt-builder' + builders: + - shell: + !include-raw: ./download-netvirt-artifact.sh + - shell: + !include-raw: ./install-netvirt.sh +- builder: + name: 'netvirt-verify-functest-builder' + builders: + - shell: + !include-raw: ./functest-netvirt.sh +- builder: + name: 'netvirt-verify-postprocess-builder' + builders: + - shell: + !include-raw: ./postprocess-netvirt.sh diff --git a/jjb/3rd_party_ci/postprocess-netvirt.sh b/jjb/3rd_party_ci/postprocess-netvirt.sh new file mode 100755 index 000000000..adffaf42d --- /dev/null +++ b/jjb/3rd_party_ci/postprocess-netvirt.sh @@ -0,0 +1,7 @@ +#!/bin/bash +set -e + +# wipe the WORKSPACE +/bin/rm -rf $WORKSPACE/* + +echo "Hello World" |