summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-08-29 21:47:56 (GMT)
committerGerrit Code Review <review@openstack.org>2016-08-29 21:47:56 (GMT)
commit19b237c3af38080ce97880e0208471c859601cc0 (patch)
tree8c56abb17ae582fb97431bbce9cdef395755416c
parentad3677050fd918f6f750302e3a0cfcfd2438a672 (diff)
parente5de8e455841eaa87740eaaccbfd1ecbec44d212 (diff)
downloadjenkins-job-builder-19b237c3af38080ce97880e0208471c859601cc0.tar.gz
jenkins-job-builder-19b237c3af38080ce97880e0208471c859601cc0.tar.xz
Merge "docker-build-publish: Add support for buildContext"
-rw-r--r--jenkins_jobs/modules/builders.py5
-rw-r--r--tests/builders/fixtures/docker-builder001.xml1
-rw-r--r--tests/builders/fixtures/docker-builder001.yaml1
3 files changed, 6 insertions, 1 deletions
diff --git a/jenkins_jobs/modules/builders.py b/jenkins_jobs/modules/builders.py
index 8724b36..87b7139 100644
--- a/jenkins_jobs/modules/builders.py
+++ b/jenkins_jobs/modules/builders.py
@@ -3555,7 +3555,9 @@ def docker_build_publish(parse, xml_parent, data):
:arg bool skip-decorate: Do not decorate the build name. (default false)
:arg bool skip-tag-latest: Do not tag this build as latest. (default false)
:arg bool skip-push: Do not push. (default false)
- :arg str file-path: Project root of Dockerfile. (default '')
+ :arg str file-path: Path of the Dockerfile. (default '')
+ :arg str build-context: Project root path for the build, defaults to the
+ workspace if not specified. (default '')
Example:
@@ -3575,6 +3577,7 @@ def docker_build_publish(parse, xml_parent, data):
('skip-tag-latest', 'skipTagLatest', False),
('skip-push', 'skipPush', False),
('file-path', 'dockerfilePath', ''),
+ ('build-context', 'buildContext', ''),
]
convert_mapping_to_xml(db, data, mapping, fail_required=True)
diff --git a/tests/builders/fixtures/docker-builder001.xml b/tests/builders/fixtures/docker-builder001.xml
index bf08040..5543bd2 100644
--- a/tests/builders/fixtures/docker-builder001.xml
+++ b/tests/builders/fixtures/docker-builder001.xml
@@ -11,6 +11,7 @@
<skipTagLatest>false</skipTagLatest>
<skipPush>false</skipPush>
<dockerfilePath>/tmp/</dockerfilePath>
+ <buildContext>/tmp/</buildContext>
</com.cloudbees.dockerpublish.DockerBuilder>
</builders>
</project>
diff --git a/tests/builders/fixtures/docker-builder001.yaml b/tests/builders/fixtures/docker-builder001.yaml
index 14bbd58..0b6ea9e 100644
--- a/tests/builders/fixtures/docker-builder001.yaml
+++ b/tests/builders/fixtures/docker-builder001.yaml
@@ -9,4 +9,5 @@ builders:
skip-latest: false
skip-tag: false
file-path: '/tmp/'
+ build-context: '/tmp/'