Merge "Update default DEPLOY_SCENARIO"
[releng.git] / docs / infra / jenkins / jjb-usage.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. SPDX-License-Identifier: CC-BY-4.0
3 .. (c) Open Platform for NFV Project, Inc. and its contributors
4
5 .. _jjb:
6
7 ===========================================
8 Creating/Configuring/Verifying Jenkins Jobs
9 ===========================================
10
11 Clone and setup the repo::
12
13     git clone --recursive ssh://YOU@gerrit.opnfv.org:29418/releng
14     cd releng
15     git review -s
16
17 Make changes::
18
19     git commit -sv
20     git review
21     remote: Resolving deltas: 100% (3/3)
22     remote: Processing changes: new: 1, refs: 1, done
23     remote:
24     remote: New Changes:
25     remote:   https://gerrit.opnfv.org/gerrit/<CHANGE_ID>
26     remote:
27     To ssh://YOU@gerrit.opnfv.org:29418/releng.git
28      * [new branch]      HEAD -> refs/publish/master
29
30 Test with tox::
31
32     tox -e jjb
33
34 .. note:: You can also test the jobs under a single jjb directory by
35     specifying the directory. For example to test only the releng jobs, you
36     could run:
37
38      tox -e jjb -- jjb/global:jjb/global-jjb:jjb/releng
39
40 Submit the change to gerrit::
41
42     git review -v
43
44 Follow the link given in the stdoutput to gerrit eg:
45 ``https://gerrit.opnfv.org/gerrit/<CHANGE_ID>`` the verify job will
46 have completed and you will see Verified +1 jenkins-ci in the gerrit ui.
47
48 If the changes pass the verify job
49 https://build.opnfv.org/ci/job/releng-verify-jjb/ ,
50 the patch can be submitited by a committer.
51
52 Job Types
53
54 * Verify Job
55
56   * Trigger: **recheck** or **reverify**
57
58 * Merge Job
59
60   * Trigger: **remerge**
61
62 * Experimental Job
63
64   * Trigger: **check-experimental**
65
66 The verify and merge jobs are retriggerable in Gerrit by simply leaving
67 a comment with one of the keywords listed above.
68 This is useful in case you need to re-run one of those jobs in case
69 if build issues or something changed with the environment.
70
71 The experimental jobs are not triggered automatically. You need to leave
72 a comment with the keyword list above to trigger it manually. It is useful
73 for trying out experimental features.
74
75 Note that, experimental jobs `skip vote`_ for verified status, which means
76 it will reset the verified status to 0. If you want to keep the verified
77 status, use **recheck-experimental** in commit message to trigger both
78 verify and experimental jobs.
79
80 You can look in the releng/INFO file for a list of current committers to
81 add as reviewers to your patch in order to get it reviewed and
82 submitted.
83
84 Or Add the group releng-contributors
85
86 Or just email a request for review to helpdesk@opnfv.org
87
88 The Current merge and verify jobs for jenkins job builder can be found
89 in `releng-jobs.yaml`_.
90
91 .. _releng-jobs.yaml:
92     https://gerrit.opnfv.org/gerrit/gitweb?p=releng.git;a=blob;f=jjb/releng-jobs.yaml;
93 .. _skip vote:
94     https://wiki.jenkins-ci.org/display/JENKINS/Gerrit+Trigger#GerritTrigger-SkipVote