From 320b088ecdab427bb468305be34be9bdaa0b9326 Mon Sep 17 00:00:00 2001 From: Vratko Polak Date: Tue, 18 Oct 2016 16:50:23 +0200 Subject: [PATCH] Bug 6926: Unify verify triggers and improve trigger words All patch-triggered jobs now ignore drafts and commit-message-only edits. This is to prevent situations when only a subset of verify jobs is triggered, as that could lead to false Verified+1. Also, only 'recheck' now triggers all verify-type jobs. Other words such as reverify, revalidate, redistcheck, retox, renode and redocs only trigger one job, to save time when other job results are reliable. Docs: Trigger words updated and distribution-check added. Change-Id: I5769d7e4d148e01428de8b13747b1f04148e7581 Signed-off-by: Vratko Polak --- docs/jenkins.rst | 92 +++++++++++++++---- jjb/autorelease/autorelease-macros.yaml | 4 +- jjb/docs/docs-rtd.yaml | 5 +- .../integration-distribution-jobs.yaml | 2 +- jjb/netvirt/netvirt-openstack.yaml | 4 +- jjb/releng-jobs.yaml | 8 +- jjb/releng-macros.yaml | 23 +---- jjb/releng-templates-java.yaml | 8 +- jjb/releng-templates.yaml | 4 +- jjb/sfc/sfc-python.yaml | 4 +- 10 files changed, 96 insertions(+), 58 deletions(-) diff --git a/docs/jenkins.rst b/docs/jenkins.rst index 4a594ca65..a74cd82d5 100644 --- a/docs/jenkins.rst +++ b/docs/jenkins.rst @@ -612,7 +612,7 @@ overrided via the opendaylight-infra-wrappers' build-timeout property. - This job builds a distrbution against your patch, passes distribution sanity test + This job builds a distrbution against your patch, tiggers distribution sanity CSIT jobs and reports back the results to Gerrit. Leave a comment with trigger keyword above to activate it for a particular patch. @@ -624,13 +624,34 @@ overrided via the opendaylight-infra-wrappers' build-timeout property.

Running the "test-distribution" trigger will cause Jenkins to remove it's existing vote if it's already -1 or +1'd a comment. - You will need to re-run your verify job (recheck) after running + You will need to re-run your verify jobs (recheck) after running this to get Jenkins to put back the correct vote.

+ + Job Template
{project}-distribution-check-{stream} + Gerrit Trigger
recheck | redistcheck + + + + This job runs the PROJECT-distribution-check-BRANCH job which is + building also integration/distribution project in order to run SingleFeatureTest. + + The redistcheck trigger is useful in cases where a project's + other jobs passed, however this job failed due to infra problems or + intermittent issues. It will retrigger just this job to save time. + + BEWARE: If there were other failed jobs, redistcheck could lead + to false Verified+1 vote, risking a merge which breaks other projetcs. + Redistcheck is only for committers who are familiar with the risks involved. + If in doubt, use the safe trigger word: recheck. + Recheck triggers every job involved in verifying latest patch set in the Change. + + + Job Template
{project}-integration-{stream} @@ -653,13 +674,17 @@ overrided via the opendaylight-infra-wrappers' build-timeout property. - The Merge job template is similar to the Verify Job Template except - it will trigger once a Gerrit patch is merged into the repo. It - also automatically runs the Maven goals source:jar and - javadoc:jar. - - This job will upload artifacts to OpenDaylight's + This job will trigger once a Gerrit patch is merged into the repo. + It will build HEAD of the current project branch and also run the Maven goals + source:jar and javadoc:jar. + Artifacts are uploaded to OpenDaylight's Nexus on completion. + + Running the "remerge" trigger is possible before a Change is merged, + in which case it will cause Jenkins to remove it's existing vote + if it's already -1 or +1'd a comment. + You will need to re-run your verify jobs (recheck) after running + this to get Jenkins to put back the correct vote. @@ -691,7 +716,7 @@ overrided via the opendaylight-infra-wrappers' build-timeout property. Job Template
{project}-validate-autorelease-{stream} - Gerrit Trigger
recheck | reverify + Gerrit Trigger
recheck | revalidate @@ -700,9 +725,13 @@ overrided via the opendaylight-infra-wrappers' build-timeout property. features that do not exist in the current release. The revalidate trigger is useful in cases where a project's - verify job passed however validate failed due to infra problems or - intermittent issues. It will retrigger just the validate-autorelease - job. + other job passed, however this job failed due to infra problems or + intermittent issues. It will retrigger just this job to save time. + + BEWARE: If there were other failed jobs, revalidate could lead + to false Verified+1 vote, risking a merge which breaks other projetcs. + Revalidate is only for committers who are familiar with the risks involved. + If in doubt, use the safe trigger word: recheck. @@ -712,14 +741,25 @@ overrided via the opendaylight-infra-wrappers' build-timeout property. - The Verify job template creates a Gerrit Trigger job that will - trigger when a new patch is submitted to Gerrit. + The Verify job template creates a Gerrit Trigger job that will + trigger when a new patch is submitted to Gerrit. + The job only builds the project code (including unit and integration tests). + + The reverify trigger is useful in cases where a project's + other jobs passed however this job failed due to infra problems or + intermittent issues. It will retrigger just this job to save time. + + BEWARE: If there were other failed jobs, reverify could lead + to false Verified+1 vote, risking a merge which breaks other projetcs. + Reverify is only for committers who are familiar with the risks involved. + If in doubt, use the safe trigger word: recheck. + Recheck triggers every job involved in verifying latest patch set in the Change. Job Template
{project}-verify-node-{stream} - Gerrit Trigger
recheck | reverify + Gerrit Trigger
recheck | renode @@ -731,12 +771,22 @@ overrided via the opendaylight-infra-wrappers' build-timeout property. {nodever} containing the directory relative to the project root containing the nodejs package.json and version of node you wish to run tests with. + + The renode trigger is useful in cases where a project's + other jobs passed, however this job failed due to infra problems or + intermittent issues. It will retrigger just this job to save time. + + BEWARE: If there were other failed jobs, renode could lead + to false Verified+1 vote, risking a merge which breaks other projetcs. + Renode is only for committers who are familiar with the risks involved. + If in doubt, use the safe trigger word: recheck. + Recheck triggers every job involved in verifying latest patch set in the Change. Job Template
{project}-verify-python-{stream} | {project}-verify-tox-{stream} - Gerrit Trigger
recheck | reverify + Gerrit Trigger
recheck | retox @@ -749,6 +799,16 @@ overrided via the opendaylight-infra-wrappers' build-timeout property. The 2 template names verify-python & verify-tox are identical and are aliases to each other. This allows the project to use the naming that is most reasonable for them. + + The retox trigger is useful in cases where a project's + other verify jobs passed, however this job failed due to infra problems or + intermittent issues. It will retrigger just this job to save time. + + BEWARE: If there were other failed jobs, retox could lead + to false Verified+1 vote, risking a merge which breaks other projetcs. + Retox is only for committers who are familiar with the risks involved. + If in doubt, use the safe trigger word: recheck. + Recheck triggers every job involved in verifying latest patch set in the Change. diff --git a/jjb/autorelease/autorelease-macros.yaml b/jjb/autorelease/autorelease-macros.yaml index 9bc8417c6..fb2fa065a 100644 --- a/jjb/autorelease/autorelease-macros.yaml +++ b/jjb/autorelease/autorelease-macros.yaml @@ -51,9 +51,9 @@ server-name: 'OpenDaylight' trigger-on: - patchset-created-event: - exclude-drafts: 'false' + exclude-drafts: 'true' exclude-trivial-rebase: 'false' - exclude-no-code-change: 'false' + exclude-no-code-change: 'true' - draft-published-event - comment-added-contains-event: comment-contains-value: 'recheck' diff --git a/jjb/docs/docs-rtd.yaml b/jjb/docs/docs-rtd.yaml index fd24db2e4..2c196b272 100644 --- a/jjb/docs/docs-rtd.yaml +++ b/jjb/docs/docs-rtd.yaml @@ -93,11 +93,14 @@ trigger-on: - patchset-created-event: exclude-drafts: 'true' - exclude-trivial-rebase: 'true' + exclude-trivial-rebase: 'false' exclude-no-code-change: 'true' - draft-published-event - comment-added-contains-event: comment-contains-value: 'recheck' + - comment-added-contains-event: + comment-contains-value: 'redocs' + # FIXME: Describe this job in docs/jenkins.rst including the BEWARE section. projects: - project-compare-type: 'ANT' project-pattern: '**' diff --git a/jjb/integration/integration-distribution-jobs.yaml b/jjb/integration/integration-distribution-jobs.yaml index f5b0d4e86..33110dc19 100644 --- a/jjb/integration/integration-distribution-jobs.yaml +++ b/jjb/integration/integration-distribution-jobs.yaml @@ -56,7 +56,7 @@ build-timeout: '{build-timeout}' triggers: - - gerrit-trigger-relevant-patch-submitted: + - gerrit-trigger-patch-submitted: name: 'integration/distribution' branch: '{branch}' diff --git a/jjb/netvirt/netvirt-openstack.yaml b/jjb/netvirt/netvirt-openstack.yaml index 984e8d844..acac17bd1 100644 --- a/jjb/netvirt/netvirt-openstack.yaml +++ b/jjb/netvirt/netvirt-openstack.yaml @@ -35,9 +35,9 @@ - gerrit: trigger-on: - patchset-created-event: - exclude-drafts: 'false' + exclude-drafts: 'true' exclude-trivial-rebase: 'false' - exclude-no-code-change: 'false' + exclude-no-code-change: 'true' - comment-added-contains-event: comment-contains-value: 'recheck-opendaylight' projects: diff --git a/jjb/releng-jobs.yaml b/jjb/releng-jobs.yaml index 8bd83398a..c26dc2bd1 100644 --- a/jjb/releng-jobs.yaml +++ b/jjb/releng-jobs.yaml @@ -74,9 +74,9 @@ server-name: 'OpenDaylight' trigger-on: - patchset-created-event: - exclude-drafts: 'false' + exclude-drafts: 'true' exclude-trivial-rebase: 'false' - exclude-no-code-change: 'false' + exclude-no-code-change: 'true' - draft-published-event - comment-added-contains-event: comment-contains-value: 'recheck' @@ -136,9 +136,9 @@ server-name: 'OpenDaylight' trigger-on: - patchset-created-event: - exclude-drafts: 'false' + exclude-drafts: 'true' exclude-trivial-rebase: 'false' - exclude-no-code-change: 'false' + exclude-no-code-change: 'true' - draft-published-event - comment-added-contains-event: comment-contains-value: 'recheck' diff --git a/jjb/releng-macros.yaml b/jjb/releng-macros.yaml index 8ded79d1c..05c9eaab1 100644 --- a/jjb/releng-macros.yaml +++ b/jjb/releng-macros.yaml @@ -126,30 +126,9 @@ timeout: 360 fail: true +# Used only by opflex-verify-{stream} and {project-name}-verify-{stream}-{maven}-{jdks} - trigger: name: gerrit-trigger-patch-submitted - triggers: - - gerrit: - server-name: 'OpenDaylight' - 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: '{name}' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/{branch}' - -- trigger: - name: gerrit-trigger-relevant-patch-submitted triggers: - gerrit: server-name: 'OpenDaylight' diff --git a/jjb/releng-templates-java.yaml b/jjb/releng-templates-java.yaml index 7b7b7aef1..4e105f822 100644 --- a/jjb/releng-templates-java.yaml +++ b/jjb/releng-templates-java.yaml @@ -173,12 +173,10 @@ - patchset-created-event: exclude-drafts: 'true' exclude-trivial-rebase: 'false' - exclude-no-code-change: 'false' + exclude-no-code-change: 'true' - draft-published-event - comment-added-contains-event: - comment-contains-value: 'test-distribution' - - comment-added-contains-event: - comment-contains-value: 'reverify' + comment-contains-value: 'redistcheck' - comment-added-contains-event: comment-contains-value: 'recheck' projects: @@ -597,8 +595,6 @@ - draft-published-event - comment-added-contains-event: comment-contains-value: 'recheck' - - comment-added-contains-event: - comment-contains-value: 'reverify' - comment-added-contains-event: comment-contains-value: 'revalidate' projects: diff --git a/jjb/releng-templates.yaml b/jjb/releng-templates.yaml index e41dc8611..a29d8df70 100644 --- a/jjb/releng-templates.yaml +++ b/jjb/releng-templates.yaml @@ -160,7 +160,7 @@ - comment-added-contains-event: comment-contains-value: 'recheck' - comment-added-contains-event: - comment-contains-value: 'reverify' + comment-contains-value: 'retox' projects: - project-compare-type: 'ANT' project-pattern: '{project}' @@ -316,7 +316,7 @@ - comment-added-contains-event: comment-contains-value: 'recheck' - comment-added-contains-event: - comment-contains-value: 'reverify' + comment-contains-value: 'renode' projects: - project-compare-type: 'ANT' project-pattern: '{project}' diff --git a/jjb/sfc/sfc-python.yaml b/jjb/sfc/sfc-python.yaml index acf5a079a..8b5b7cc12 100644 --- a/jjb/sfc/sfc-python.yaml +++ b/jjb/sfc/sfc-python.yaml @@ -57,9 +57,9 @@ server-name: 'OpenDaylight' trigger-on: - patchset-created-event: - exclude-drafts: 'false' + exclude-drafts: 'true' exclude-trivial-rebase: 'false' - exclude-no-code-change: 'false' + exclude-no-code-change: 'true' - draft-published-event - comment-added-contains-event: comment-contains-value: 'recheck' -- 2.36.6