User:JHernandez (WMF)/Jenkins

Steps for modifying jenkins continuous integration jobs, and testing them on actual jenkins. Example of patch with good comments: https://gerrit.wikimedia.org/r/#/c/191009/
 * 1) Edit the repo integration/config.git as needed
 * 2) Generate jobs for your changes (needs labs account, or ask somebody from CI), ex:
 * 3) Read Continuous_integration/Jenkins_job_builder
 * 4) Manually trigger a run of such jobs at https://integration.wikimedia.org/ci/ to check if they work
 * 5) Get the patch merged
 * 1) Get the patch merged

Info of getting a custom job running from the CI web
11:54 hashar: so I have already triggered the job manually once against the master branch 11:54 hashar: the job parameters are shown at https://integration.wikimedia.org/ci/job/mwext-Gather-testextension-hhvm/1/parameters/ 11:54 hashar: ZUUL_URL = https://gerrit.wikimedia.org/r/p 11:54 hashar: is the prefix to git clone / git fetch from 11:54 hashar: 	ZUUL_PROJECT	 = mediawiki/extensions/Gather 11:54 hashar: is the repository 11:54 hashar: and so once 11:54 hashar: ZUUL_REF, ZUUL_COMMIT and ZUUL_BRANCH are used to fetch the patch 11:55 hashar: if you login on https://integration.wikimedia.org/ci/ using your wmflabs account 11:55 hashar: then going to the job main page https://integration.wikimedia.org/ci/job/mwext-Gather-testextension-hhvm/, you should have a link on the left that says:  [ Build with Parameters ] 11:55 hashar: that would show a form asking to fill the ZUUL_* parameters 11:56 hashar: so we can reuse mostly the same parameters 11:56 hashar: but use the info from your Gerrit change, i.e.:  ZUUL_COMMIT= 496a64273ea89a8c8fea63ce191e435a4c76d6ce  and ZUUL_REF=refs/changes/04/191304/1 11:57 hashar: the script will git fetch $ZUUL_URL/$ZUUL_PROJECT $ZUUL_REF 11:57 hashar: and then git checkout $ZUUL_COMMIT

12:07 joakino: hashar: what do i use for the ZUUL_UUID? 12:08 hashar: joakino: I don't think it is used 12:08 hashar: just use 'foobar' :-] 12:08 hashar: UUID can be skipped 12:08 hashar: ZUUL_PIPELINE can probably as well. I use 'manual'

12:09 hashar: you need ZUUL_CHANGE and ZUUL_PATCHSET 12:09 hashar: just enter some random numbers 12:09 hashar: ZUUL_BRANCH should be: master 12:09 hashar: that is the actual git branch 12:13 joakino: or do i use the gerrit patch changeid 12:13 hashar: you can use the gerrit chnage / patch id

12:10 joakino: hashar: i can't edit the build parameters? 12:11 hashar: joakino: ah you have to rebuild last 12:11 hashar: joakino: on the job main page https://integration.wikimedia.org/ci/job/mwext-Gather-testextension-hhvm/ 12:11 hashar: hit [Rebuild Last] 12:12 hashar: it will show the form populated with parameters from previous build 12:12 joakino: hashar: so ZUUL_CHANGE and ZUUL_PATCHSET are not used/