docker-build-publish: Add support for buildContext

Change-Id: I0b42f49bc1ec0b816ecd3622d20105231aa6c6db
This commit is contained in:
Linus Wallgren 2016-08-11 18:48:31 +02:00
parent 8c9c50b1f6
commit e5de8e4558
3 changed files with 6 additions and 1 deletions

View File

@ -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)

View File

@ -11,6 +11,7 @@
<skipTagLatest>false</skipTagLatest>
<skipPush>false</skipPush>
<dockerfilePath>/tmp/</dockerfilePath>
<buildContext>/tmp/</buildContext>
</com.cloudbees.dockerpublish.DockerBuilder>
</builders>
</project>

View File

@ -9,4 +9,5 @@ builders:
skip-latest: false
skip-tag: false
file-path: '/tmp/'
build-context: '/tmp/'