-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
None
-
None
version: master
page: jenkins-sandbox
The recipe in [0] is missing some essential steps. Please revise the steps as follows:
- Login into the Jenkins Sandbox WebUI
- Click on the job which you want to trigger
- The first time you execute a job, add a gerrit refspec to the configuration:
- Click 'Configure'
- Click 'Source Code Management'
- Click 'Advanced'
- Change the value of 'Refspec' from "$GERRIT_REFSPEC" to the refspec of the gerrit change version to run the job against. (eg. refs/changes/04/27204/1, see [1] for how to determine the latest refspec of a gerrit change)
- 'Click Apply'
- Click "Build with parameters"
- Click Build
- Verify the Build Executor Status bar to check on progress.
[0] https://docs.releng.linuxfoundation.org/en/latest/jenkins-sandbox.html#execute-jobs-in-the-sandbox
[1] https://stackoverflow.com/questions/22264533/obtain-the-latest-refspec-on-a-gerrit-change
For example:
$ ssh -p 29418 gerrit.fd.io gerrit query --current-patch-set --format=JSON change:26767 | tr ',' '\n' | grep refs
"ref":"refs/changes/67/26767/5"
(Note: the last number in the refspec is the gerrit patch version)