Allow packer-merge job to test WIP patch 75/13575/5
authorThanh Ha <thanh.ha@linuxfoundation.org>
Mon, 19 Nov 2018 04:23:42 +0000 (12:23 +0800)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Mon, 19 Nov 2018 06:37:23 +0000 (14:37 +0800)
Adds the ability for the packer-merge job to be used on Jenkins
Sandbox systems to test work in progress patches from Gerrit or
GitHub.

Issue: RELENG-1495
Change-Id: I5480f17b225f462cc7802981aac9ece3ce611214
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
docs/conf.py
docs/jjb/lf-ci-jobs.rst
jjb/lf-ci-jobs.yaml
releasenotes/notes/packer-merge-test-wip-patches-40b2e87677a84d38.yaml [new file with mode: 0644]

index 5bbe39f..4457e12 100644 (file)
@@ -277,6 +277,7 @@ htmlhelp_basename = 'LinuxFoundationReleaseEngineeringGJJBdoc'
 # Example configuration for intersphinx: refer to the Python standard library.
 intersphinx_mapping = {
     'jjb': ('https://docs.openstack.org/infra/jenkins-job-builder/', None),
+    'lfdocs': ('http://docs.releng.linuxfoundation.org/en/latest/', None),
     'lftools': ('http://lftools.releng.linuxfoundation.org/en/latest/', None),
     'python': ('https://docs.python.org/', None),
 }
index 3a7514b..b270b75 100644 (file)
@@ -652,6 +652,19 @@ Packer Merge job runs `packer build` to build system images in the cloud.
 
     :gerrit_verify_triggers: Override Gerrit Triggers.
 
+Test an in-progress patch
+^^^^^^^^^^^^^^^^^^^^^^^^^
+
+To test an in-progress patch from a GitHub Pull Request. Upload this
+job to the :doc:`Jenkins Sandbox <lfdocs:jenkins-sandbox>`. Then when manually
+building the job replace the GERRIT_REFSPEC parameter with the GitHub Pull
+Request number of the patch you would like to test.
+
+Example GitHub:
+
+.. code-block:: none
+
+   GERRIT_REFSPEC: origin/pr/49/merge
 
 .. _gjjb-packer-verify:
 
index 620783f..450fcfa 100644 (file)
     scm:
       - lf-infra-github-scm:
           url: '{git-clone-url}{github-org}/{project}'
-          refspec: ''
-          branch: 'refs/heads/{branch}'
+          refspec: >
+              +refs/heads/*:refs/remotes/origin/*
+              +refs/pull/*:refs/remotes/origin/pr/*
+          branch: '$GERRIT_REFSPEC'
           submodule-recursive: '{submodule-recursive}'
           submodule-timeout: '{submodule-timeout}'
           choosing-strategy: default
diff --git a/releasenotes/notes/packer-merge-test-wip-patches-40b2e87677a84d38.yaml b/releasenotes/notes/packer-merge-test-wip-patches-40b2e87677a84d38.yaml
new file mode 100644 (file)
index 0000000..0db556b
--- /dev/null
@@ -0,0 +1,6 @@
+---
+features:
+  - |
+    The GERRIT_REFSPEC build parameter can now be used to trigger a test build
+    from the Jenkins Sandbox system against a work in progress packer image
+    patch from a GitHub Pull Request.