diff options
author | Fatih Degirmenci <fatih.degirmenci@ericsson.com> | 2016-07-18 10:33:00 +0200 |
---|---|---|
committer | Fatih Degirmenci <fatih.degirmenci@ericsson.com> | 2016-07-18 11:17:39 +0200 |
commit | 9dfee45f708a473a9dddba17f8d3cc8f2b3b220f (patch) | |
tree | bd6fb3f853e520f4ce33226a8c668606b5613b55 /jjb/joid | |
parent | 0713a6f996ab1cf0bfa6b03c8a0aa548ca0123c5 (diff) |
joid: Update verify jobs and introduce Multijob and verify phases
This is the first step towards improved Commit Gating and this
change does not impact the current way of working for Joid. This
means that no additional verification activities will be done for
changes/patches coming to Gerrit for Joid as of yet.
Because of this, the execute shells contain nothing but simple echos.
Functest job hasn't been created/connected either since we don't do
full commit verification.
This change
- switches verify job to Multijob project type since Freestyle does
not support aborting all the downstream jobs when a new patch for
same change comes to Gerrit for existing change. When Gerrit Trigger
aborts the upstream verify job that was triggered for the previous
patch of the same change, Multijob then aborts the downstream
phase jobs, not leaving orphaned phase jobs behind.
- creates phase jobs to do limited verification activities in order
to provide more granular feedback. Earlier phases fail the patch
verification in order to provide feedback for the failed phase
rather than whole basic, deploy, and smoke test.
Change-Id: If6723b06bb937329e104ca85865b0d750c45e91e
Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
Diffstat (limited to 'jjb/joid')
-rw-r--r-- | jjb/joid/joid-project-jobs.yml | 61 | ||||
-rw-r--r-- | jjb/joid/joid-verify-jobs.yml | 220 |
2 files changed, 220 insertions, 61 deletions
diff --git a/jjb/joid/joid-project-jobs.yml b/jjb/joid/joid-project-jobs.yml deleted file mode 100644 index d5a206bf9..000000000 --- a/jjb/joid/joid-project-jobs.yml +++ /dev/null @@ -1,61 +0,0 @@ -################################################### -# All the jobs except verify have been removed! -# They will only be enabled on request by projects! -################################################### -- project: - name: joid-project-jobs - - project: 'joid' - - jobs: - - 'joid-verify-{stream}' - - stream: - - master: - branch: '{stream}' - gs-pathname: '' - - brahmaputra: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - -- job-template: - name: 'joid-verify-{stream}' - - parameters: - - project-parameter: - project: '{project}' - - gerrit-parameter: - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' - - scm: - - gerrit-trigger-scm: - credentials-id: '{ssh-credentials}' - refspec: '$GERRIT_REFSPEC' - choosing-strategy: 'gerrit' - - triggers: - - gerrit: - 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}' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**|.gitignore' - - builders: - - shell: | - echo "Nothing to verify!" diff --git a/jjb/joid/joid-verify-jobs.yml b/jjb/joid/joid-verify-jobs.yml new file mode 100644 index 000000000..aa5fc672d --- /dev/null +++ b/jjb/joid/joid-verify-jobs.yml @@ -0,0 +1,220 @@ +- project: + name: 'joid-verify-jobs' + + project: 'joid' + + installer: 'joid' +##################################### +# branch definitions +##################################### + stream: + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + - colorado: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: true +##################################### +# patch verification phases +##################################### + phase: + - 'basic': + slave-label: 'opnfv-build-ubuntu' + - 'deploy-virtual': + slave-label: 'joid-virtual' + - 'smoke-test': + slave-label: 'joid-virtual' +##################################### +# jobs +##################################### + jobs: + - 'joid-verify-{stream}' + - 'joid-verify-{phase}-{stream}' +##################################### +# job templates +##################################### +- job-template: + name: 'joid-verify-{stream}' + + project-type: multijob + + disabled: '{obj:disabled}' + + concurrent: true + + properties: + - throttle: + enabled: true + max-total: 4 + max-per-node: 1 + option: 'project' + - build-blocker: + use-build-blocker: true + blocking-jobs: + - 'joid-verify-master' + - 'joid-verify-colorado' + 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 + + triggers: + - gerrit: + 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}' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**|.gitignore' + readable-message: true + + parameters: + - project-parameter: + project: '{project}' + - gerrit-parameter: + branch: '{branch}' + - 'joid-virtual-defaults' + + builders: + - description-setter: + description: "Built on $NODE_NAME" + - multijob: + name: basic + condition: SUCCESSFUL + projects: + - name: 'joid-verify-basic-{stream}' + current-parameters: false + predefined-parameters: | + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + kill-phase-on: FAILURE + abort-all-job: true + - multijob: + name: deploy-virtual + condition: SUCCESSFUL + projects: + - name: 'joid-verify-deploy-virtual-{stream}' + current-parameters: false + predefined-parameters: | + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + - multijob: + name: smoke-test + condition: SUCCESSFUL + projects: + - name: 'joid-verify-smoke-test-{stream}' + current-parameters: false + predefined-parameters: | + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + +- job-template: + name: 'joid-verify-{phase}-{stream}' + + disabled: '{obj:disabled}' + + concurrent: true + + properties: + - throttle: + enabled: true + max-total: 4 + max-per-node: 1 + option: 'project' + - build-blocker: + use-build-blocker: true + blocking-jobs: + - 'joid-verify-deploy-.*' + - 'joid-verify-test-.*' + 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}' + - '{installer}-defaults' + - '{slave-label}-defaults' + + builders: + - description-setter: + description: "Built on $NODE_NAME" + - '{project}-verify-{phase}-macro' +##################################### +# builder macros +##################################### +- builder: + name: 'joid-verify-basic-macro' + builders: + - shell: | + #!/bin/bash + + echo "Not activated!" + +- builder: + name: 'joid-verify-deploy-virtual-macro' + builders: + - shell: | + #!/bin/bash + + echo "Not activated!" + +- builder: + name: 'joid-verify-smoke-test-macro' + builders: + - shell: | + #!/bin/bash + + echo "Not activated!" |