diff options
-rwxr-xr-x | jjb/3rd_party_ci/download-netvirt-artifact.sh | 13 | ||||
-rwxr-xr-x | jjb/3rd_party_ci/functest-netvirt.sh | 4 | ||||
-rwxr-xr-x | jjb/3rd_party_ci/install-netvirt.sh | 4 | ||||
-rw-r--r-- | jjb/3rd_party_ci/odl-netvirt.yml | 214 | ||||
-rwxr-xr-x | jjb/3rd_party_ci/postprocess-netvirt.sh | 4 | ||||
-rwxr-xr-x | jjb/apex/apex-build.sh | 2 | ||||
-rwxr-xr-x | jjb/apex/apex-upload-artifact.sh | 2 | ||||
-rw-r--r-- | jjb/apex/apex.yml | 2 | ||||
-rw-r--r-- | jjb/armband/armband-ci-jobs.yml | 17 | ||||
-rw-r--r-- | jjb/doctor/doctor.yml | 7 | ||||
-rw-r--r-- | jjb/functest/functest-ci-jobs.yml | 2 | ||||
-rw-r--r-- | jjb/global/slave-params.yml | 10 | ||||
-rw-r--r-- | utils/test/testapi/opnfv_testapi/resources/testcase_models.py | 88 |
13 files changed, 361 insertions, 8 deletions
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..d0b9a05d7 --- /dev/null +++ b/jjb/3rd_party_ci/download-netvirt-artifact.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +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..." +curl -s -o $NETVIRT_ARTIFACT $NETVIRT_ARTIFACT_URL +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..abc7975ce --- /dev/null +++ b/jjb/3rd_party_ci/functest-netvirt.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +echo "Hello World" +ls -al $WORKSPACE diff --git a/jjb/3rd_party_ci/install-netvirt.sh b/jjb/3rd_party_ci/install-netvirt.sh new file mode 100755 index 000000000..c24e89036 --- /dev/null +++ b/jjb/3rd_party_ci/install-netvirt.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +echo "Using the downloaded artifact to install netvirt" +ls -al $NETVIRT_ARTIFACT diff --git a/jjb/3rd_party_ci/odl-netvirt.yml b/jjb/3rd_party_ci/odl-netvirt.yml new file mode 100644 index 000000000..d44fc36f4 --- /dev/null +++ b/jjb/3rd_party_ci/odl-netvirt.yml @@ -0,0 +1,214 @@ +- project: + name: 'netvirt' + + project: 'netvirt' + + installer: 'apex' +##################################### +# branch definitions +##################################### + stream: + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false +##################################### +# patch verification phases +##################################### + phase: + - 'install' + - 'functest' + - 'postprocess' +##################################### +# 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' + + scm: + #- git: + # url: 'https://git.opendaylight.org/gerrit/p/$PROJECT.git' + # refspec: '$GERRIT_REFSPEC' + # branches: + # - 'origin/$GERRIT_BRANCH' + # skip-tag: true + # choosing-strategy: 'gerrit' + # timeout: 10 + # wipe-workspace: true + - gerrit-trigger-scm: + credentials-id: '{ssh-credentials}' + refspec: '$GERRIT_REFSPEC' + choosing-strategy: 'gerrit' + + 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' + 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" + - shell: | + #!/bin/bash + ls -al $WORKSPACE + - multijob: + name: install + condition: SUCCESSFUL + projects: + - name: 'odl-netvirt-verify-virtual-install-{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: 'odl-netvirt-verify-virtual-functest-{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: postprocess + condition: SUCCESSFUL + 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' + + scm: + - gerrit-trigger-scm: + credentials-id: '{ssh-credentials}' + refspec: '$GERRIT_REFSPEC' + choosing-strategy: 'gerrit' + + wrappers: + - ssh-agent-credentials: + users: + - '{ssh-credentials}' + - timeout: + timeout: 360 + fail: true + + parameters: + - project-parameter: + project: '{project}' + - gerrit-parameter: + branch: '{branch}' + - 'odl-netvirt-virtual-defaults' + - '{installer}-defaults' + + builders: + - description-setter: + description: "Built on $NODE_NAME" + - '{project}-verify-{phase}-builder' +##################################### +# builder macros +##################################### +- builder: + name: 'netvirt-verify-install-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..abc7975ce --- /dev/null +++ b/jjb/3rd_party_ci/postprocess-netvirt.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +echo "Hello World" +ls -al $WORKSPACE diff --git a/jjb/apex/apex-build.sh b/jjb/apex/apex-build.sh index e3e3f6194..ee1dfb5d3 100755 --- a/jjb/apex/apex-build.sh +++ b/jjb/apex/apex-build.sh @@ -23,7 +23,7 @@ fi # start the build cd $WORKSPACE/ci ./build.sh $BUILD_ARGS -RPM_VERSION=$(grep Version: $BUILD_DIRECTORY/rpm_specs/opnfv-apex.spec | awk '{ print $2 }')-$(echo $OPNFV_ARTIFACT_VERSION | tr -d '_-') +RPM_VERSION=$(grep Version: $WORKSPACE/build/rpm_specs/opnfv-apex.spec | awk '{ print $2 }')-$(echo $OPNFV_ARTIFACT_VERSION | tr -d '_-') # list the contents of BUILD_OUTPUT directory echo "Build Directory is ${BUILD_DIRECTORY}" echo "Build Directory Contents:" diff --git a/jjb/apex/apex-upload-artifact.sh b/jjb/apex/apex-upload-artifact.sh index f54e4c55a..64f13f4e6 100755 --- a/jjb/apex/apex-upload-artifact.sh +++ b/jjb/apex/apex-upload-artifact.sh @@ -11,6 +11,8 @@ echo # source the opnfv.properties to get ARTIFACT_VERSION source $WORKSPACE/opnfv.properties +BUILD_DIRECTORY=${WORKSPACE}/.build + # clone releng repository echo "Cloning releng repository..." [ -d releng ] && rm -rf releng diff --git a/jjb/apex/apex.yml b/jjb/apex/apex.yml index b3de969f8..d8784c678 100644 --- a/jjb/apex/apex.yml +++ b/jjb/apex/apex.yml @@ -362,7 +362,7 @@ - trigger-builds: - project: 'apex-deploy-virtual-os-nosdn-nofeature-noha-{stream}' predefined-parameters: | - BUILD_DIRECTORY=apex-build-{stream}/build + BUILD_DIRECTORY=apex-build-{stream}/.build OPNFV_CLEAN=yes git-revision: false same-node: true diff --git a/jjb/armband/armband-ci-jobs.yml b/jjb/armband/armband-ci-jobs.yml index b1cd9bf75..77718e181 100644 --- a/jjb/armband/armband-ci-jobs.yml +++ b/jjb/armband/armband-ci-jobs.yml @@ -160,6 +160,23 @@ build-step-failure-threshold: 'never' failure-threshold: 'never' unstable-threshold: 'FAILURE' + # 1.dovetail only master by now, not sync with A/B/C branches + # 2.here the stream means the SUT stream, dovetail stream is defined in its own job + # 3.only debug testsuite here(includes 3 basic testcase, + # i.e. one tempest smoke ipv6, two vping from functest) + # 4.not used for release criteria or compliance, + # only to debug the dovetail tool bugs with arm pods + - trigger-builds: + - project: 'dovetail-{installer}-{pod}-debug-{stream}' + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO={scenario} + block: true + same-node: true + block-thresholds: + build-step-failure-threshold: 'never' + failure-threshold: 'never' + unstable-threshold: 'FAILURE' - job-template: name: '{installer}-deploy-{pod}-daily-{stream}' diff --git a/jjb/doctor/doctor.yml b/jjb/doctor/doctor.yml index 8a0d0155a..f9ee3de79 100644 --- a/jjb/doctor/doctor.yml +++ b/jjb/doctor/doctor.yml @@ -166,7 +166,12 @@ builders: - 'functest-suite-builder' - shell: | - cp $HOME/opnfv/functest/results/{stream}/{project}.log $WORKSPACE/tests/ + functest_log="$HOME/opnfv/functest/results/{stream}/{project}.log" + to_be_archived="$WORKSPACE/tests/functest-{project}.log" + cp $functest_log $to_be_archived + # NOTE: checking the test result, as the previous job could return + # 0 regardless the result of doctor test scenario. + grep -e ' OK$' $functest_log || exit 1 publishers: - archive: diff --git a/jjb/functest/functest-ci-jobs.yml b/jjb/functest/functest-ci-jobs.yml index 915828ca7..cd7017910 100644 --- a/jjb/functest/functest-ci-jobs.yml +++ b/jjb/functest/functest-ci-jobs.yml @@ -226,7 +226,7 @@ description: 'Tag to pull docker image' - string: name: CLEAN_DOCKER_IMAGES - default: 'true' + default: 'false' description: 'Remove downloaded docker images (opnfv/functest:*)' - functest-parameter: gs-pathname: '{gs-pathname}' diff --git a/jjb/global/slave-params.yml b/jjb/global/slave-params.yml index dd0c97996..d1b4b8f5f 100644 --- a/jjb/global/slave-params.yml +++ b/jjb/global/slave-params.yml @@ -670,6 +670,16 @@ name: GIT_BASE default: https://gerrit.opnfv.org/gerrit/$PROJECT description: 'Git URL to use on this Jenkins Slave' +- parameter: + name: 'odl-netvirt-virtual-defaults' + parameters: + - label: + name: SLAVE_LABEL + default: 'odl-netvirt-virtual' + - string: + name: GIT_BASE + default: https://git.opendaylight.org/gerrit/p/$PROJECT.git + description: 'Git URL to use on this Jenkins Slave' ##################################################### # These slaves are just dummy slaves for sandbox jobs ##################################################### diff --git a/utils/test/testapi/opnfv_testapi/resources/testcase_models.py b/utils/test/testapi/opnfv_testapi/resources/testcase_models.py index e1f2fb650..0ed705f0f 100644 --- a/utils/test/testapi/opnfv_testapi/resources/testcase_models.py +++ b/utils/test/testapi/opnfv_testapi/resources/testcase_models.py @@ -11,10 +11,23 @@ from opnfv_testapi.tornado_swagger import swagger @swagger.model() class TestcaseCreateRequest(object): - def __init__(self, name, url=None, description=None): + def __init__(self, name, url=None, description=None, + tier=None, ci_loop=None, criteria=None, + blocking=None, dependencies=None, run=None, + domains=None, tags=None, version=None): self.name = name self.url = url self.description = description + self.tier = tier + self.ci_loop = ci_loop + self.criteria = criteria + self.blocking = blocking + self.dependencies = dependencies + self.run = run + self.domains = domains + self.tags = tags + self.version = version + self.trust = "Silver" def format(self): return { @@ -26,29 +39,66 @@ class TestcaseCreateRequest(object): @swagger.model() class TestcaseUpdateRequest(object): - def __init__(self, name=None, description=None, project_name=None): + def __init__(self, name=None, description=None, project_name=None, + tier=None, ci_loop=None, criteria=None, + blocking=None, dependencies=None, run=None, + domains=None, tags=None, version=None, trust=None): self.name = name self.description = description self.project_name = project_name + self.tier = tier + self.ci_loop = ci_loop + self.criteria = criteria + self.blocking = blocking + self.dependencies = dependencies + self.run = run + self.domains = domains + self.tags = tags + self.version = version + self.trust = trust def format(self): return { "name": self.name, "description": self.description, "project_name": self.project_name, + "tier": self.tier, + "ci_loop": self.ci_loop, + "criteria": self.criteria, + "blocking": self.blocking, + "dependencies": self.dependencies, + "run": self.run, + "domains": self.domains, + "tags": self.tags, + "version": self.version, + "trust": self.trust } @swagger.model() class Testcase(object): def __init__(self, _id=None, name=None, project_name=None, - description=None, url=None, creation_date=None): + description=None, url=None, creation_date=None, + tier=None, ci_loop=None, criteria=None, + blocking=None, dependencies=None, run=None, + domains=None, tags=None, version=None, + trust=None): self._id = None self.name = None self.project_name = None self.description = None self.url = None self.creation_date = None + self.tier=None + self.ci_loop=None + self.criteria=None + self.blocking=None + self.dependencies=None + self.run=None + self.domains=None + self.tags=None + self.version=None + self.trust=None @staticmethod def from_dict(a_dict): @@ -63,6 +113,16 @@ class Testcase(object): t.name = a_dict.get('name') t.description = a_dict.get('description') t.url = a_dict.get('url') + t.tier = a_dict.get('tier') + t.ci_loop = a_dict.get('ci_loop') + t.criteria = a_dict.get('criteria') + t.blocking = a_dict.get('blocking') + t.dependencies = a_dict.get('dependencies') + t.run = a_dict.get('run') + t.domains = a_dict.get('domains') + t.tags = a_dict.get('tags') + t.version = a_dict.get('version') + t.trust = a_dict.get('trust') return t @@ -72,7 +132,17 @@ class Testcase(object): "description": self.description, "project_name": self.project_name, "creation_date": str(self.creation_date), - "url": self.url + "url": self.url, + "tier": self.tier, + "ci_loop": self.ci_loop, + "criteria": self.criteria, + "blocking": self.blocking, + "dependencies": self.dependencies, + "run": self.run, + "domains": self.domains, + "tags": self.tags, + "version": self.version, + "trust": self.trust } def format_http(self): @@ -83,6 +153,16 @@ class Testcase(object): "description": self.description, "creation_date": str(self.creation_date), "url": self.url, + "tier": self.tier, + "ci_loop": self.ci_loop, + "criteria": self.criteria, + "blocking": self.blocking, + "dependencies": self.dependencies, + "run": self.run, + "domains": self.domains, + "tags": self.tags, + "version": self.version, + "trust": self.trust } |