summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-09-13 14:34:20 +0000
committerGerrit Code Review <review@openstack.org>2018-09-13 14:34:20 +0000
commit22307f715f42aeb5499e167d5ff9dea9c6d472b1 (patch)
tree42086f10faa1e087527431e72f78433a614061b7
parent1a5a4360117d21c29730d0204f260862e552a8a3 (diff)
parent3c3028f5b88ed6304904cf10d8ed1811f71037f1 (diff)
Merge "docker-build-publish: Improve support for new options"
-rw-r--r--jenkins_jobs/modules/builders.py9
-rw-r--r--tests/builders/fixtures/docker-builder001.xml3
-rw-r--r--tests/builders/fixtures/docker-builder001.yaml3
-rw-r--r--tests/builders/fixtures/docker-builder002.xml3
-rw-r--r--tests/builders/fixtures/docker-builder002.yaml3
5 files changed, 21 insertions, 0 deletions
diff --git a/jenkins_jobs/modules/builders.py b/jenkins_jobs/modules/builders.py
index 9cf9bdf..d256051 100644
--- a/jenkins_jobs/modules/builders.py
+++ b/jenkins_jobs/modules/builders.py
@@ -3950,6 +3950,12 @@ def docker_build_publish(parse, xml_parent, data):
3950 :arg str file-path: Path of the Dockerfile. (default '') 3950 :arg str file-path: Path of the Dockerfile. (default '')
3951 :arg str build-context: Project root path for the build, defaults to the 3951 :arg str build-context: Project root path for the build, defaults to the
3952 workspace if not specified. (default '') 3952 workspace if not specified. (default '')
3953 :arg bool create-fingerprint: If enabled, the plugin will create
3954 fingerprints after the build of each image. (default false)
3955 :arg str build-args: Additional build arguments passed to
3956 docker build (default '')
3957 :arg bool force-tag: Force tag replacement when tag already
3958 exists (default false)
3953 3959
3954 Minimal example: 3960 Minimal example:
3955 3961
@@ -3974,6 +3980,9 @@ def docker_build_publish(parse, xml_parent, data):
3974 ('skip-push', 'skipPush', False), 3980 ('skip-push', 'skipPush', False),
3975 ('file-path', 'dockerfilePath', ''), 3981 ('file-path', 'dockerfilePath', ''),
3976 ('build-context', 'buildContext', ''), 3982 ('build-context', 'buildContext', ''),
3983 ('create-fingerprint', 'createFingerprint', False),
3984 ('build-args', 'buildAdditionalArgs', ''),
3985 ('force-tag', 'forceTag', False),
3977 ] 3986 ]
3978 helpers.convert_mapping_to_xml(db, data, mapping, fail_required=True) 3987 helpers.convert_mapping_to_xml(db, data, mapping, fail_required=True)
3979 3988
diff --git a/tests/builders/fixtures/docker-builder001.xml b/tests/builders/fixtures/docker-builder001.xml
index 5543bd2..57d74d2 100644
--- a/tests/builders/fixtures/docker-builder001.xml
+++ b/tests/builders/fixtures/docker-builder001.xml
@@ -12,6 +12,9 @@
12 <skipPush>false</skipPush> 12 <skipPush>false</skipPush>
13 <dockerfilePath>/tmp/</dockerfilePath> 13 <dockerfilePath>/tmp/</dockerfilePath>
14 <buildContext>/tmp/</buildContext> 14 <buildContext>/tmp/</buildContext>
15 <createFingerprint>true</createFingerprint>
16 <buildAdditionalArgs>--build-arg https_proxy=&quot;http://some.proxy:port&quot;</buildAdditionalArgs>
17 <forceTag>true</forceTag>
15 </com.cloudbees.dockerpublish.DockerBuilder> 18 </com.cloudbees.dockerpublish.DockerBuilder>
16 </builders> 19 </builders>
17</project> 20</project>
diff --git a/tests/builders/fixtures/docker-builder001.yaml b/tests/builders/fixtures/docker-builder001.yaml
index bfecba1..179bec2 100644
--- a/tests/builders/fixtures/docker-builder001.yaml
+++ b/tests/builders/fixtures/docker-builder001.yaml
@@ -10,3 +10,6 @@ builders:
10 skip-tag: false 10 skip-tag: false
11 file-path: '/tmp/' 11 file-path: '/tmp/'
12 build-context: '/tmp/' 12 build-context: '/tmp/'
13 create-fingerprint: true
14 build-args: --build-arg https_proxy="http://some.proxy:port"
15 force-tag: true
diff --git a/tests/builders/fixtures/docker-builder002.xml b/tests/builders/fixtures/docker-builder002.xml
index 3506fa2..960fe75 100644
--- a/tests/builders/fixtures/docker-builder002.xml
+++ b/tests/builders/fixtures/docker-builder002.xml
@@ -12,6 +12,9 @@
12 <skipPush>false</skipPush> 12 <skipPush>false</skipPush>
13 <dockerfilePath>/tmp/</dockerfilePath> 13 <dockerfilePath>/tmp/</dockerfilePath>
14 <buildContext>/tmp/</buildContext> 14 <buildContext>/tmp/</buildContext>
15 <createFingerprint>true</createFingerprint>
16 <buildAdditionalArgs>--build-arg https_proxy=&quot;http://some.proxy:port&quot;</buildAdditionalArgs>
17 <forceTag>true</forceTag>
15 <server plugin="docker-commons"> 18 <server plugin="docker-commons">
16 <credentialsId>docker-server</credentialsId> 19 <credentialsId>docker-server</credentialsId>
17 <uri>unix:///var/run/docker.sock</uri> 20 <uri>unix:///var/run/docker.sock</uri>
diff --git a/tests/builders/fixtures/docker-builder002.yaml b/tests/builders/fixtures/docker-builder002.yaml
index 35ed90a..8200072 100644
--- a/tests/builders/fixtures/docker-builder002.yaml
+++ b/tests/builders/fixtures/docker-builder002.yaml
@@ -10,6 +10,9 @@ builders:
10 skip-tag: false 10 skip-tag: false
11 file-path: '/tmp/' 11 file-path: '/tmp/'
12 build-context: '/tmp/' 12 build-context: '/tmp/'
13 create-fingerprint: true
14 build-args: --build-arg https_proxy="http://some.proxy:port"
15 force-tag: true
13 registry: 16 registry:
14 url: 'https://registry.example.org' 17 url: 'https://registry.example.org'
15 credentials-id: 'registry-docker' 18 credentials-id: 'registry-docker'