From bf87c15e170904147339abe6495d4905fb558d3b Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Mon, 19 Nov 2018 12:23:42 +0800 Subject: [PATCH 1/1] Allow packer-merge job to test WIP patch 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 --- docs/conf.py | 1 + docs/jjb/lf-ci-jobs.rst | 13 +++++++++++++ jjb/lf-ci-jobs.yaml | 6 ++++-- .../packer-merge-test-wip-patches-40b2e87677a84d38.yaml | 6 ++++++ 4 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/packer-merge-test-wip-patches-40b2e87677a84d38.yaml diff --git a/docs/conf.py b/docs/conf.py index 5bbe39f1..4457e120 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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), } diff --git a/docs/jjb/lf-ci-jobs.rst b/docs/jjb/lf-ci-jobs.rst index 3a7514b6..b270b752 100644 --- a/docs/jjb/lf-ci-jobs.rst +++ b/docs/jjb/lf-ci-jobs.rst @@ -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 `. 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: diff --git a/jjb/lf-ci-jobs.yaml b/jjb/lf-ci-jobs.yaml index 620783fc..450fcfa5 100644 --- a/jjb/lf-ci-jobs.yaml +++ b/jjb/lf-ci-jobs.yaml @@ -1482,8 +1482,10 @@ 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 index 00000000..0db556b9 --- /dev/null +++ b/releasenotes/notes/packer-merge-test-wip-patches-40b2e87677a84d38.yaml @@ -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. -- 2.16.6