Skip to content

Commit

Permalink
Build args (#16)
Browse files Browse the repository at this point in the history
* Build args docs

* Small fix
  • Loading branch information
dandruszak committed Jul 8, 2020
1 parent 6227079 commit 02633ca
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
6 changes: 5 additions & 1 deletion source/pages/pipelines/building_template.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Currently the fields supporting interpolations are:
- :attr:`ContainerBuild<ContainerBuild>`:

- ``tags``
- ``buildArgs``

- :attr:`ServiceRun<ServiceRun>`:

Expand All @@ -34,10 +35,13 @@ Here are examples of using interpolation to create a Docker tag containing the n
tags:
- "build-{{ ICECI_BUILD_NUMBER }}"
- latest
buildArgs:
- name: BRANCH
value: "{{ ICECI_GIT_BRANCH_NAME }}"
- name: pipeline-service
serviceRun:
name: example-service
image: "myapp:build-{{ ICE_BUILD_NUMBER }}"
image: "myapp:build-{{ ICECI_BUILD_NUMBER }}"
dockerSecret: dockerhub
Expand Down
19 changes: 19 additions & 0 deletions source/pages/pipelines/structure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,11 @@ Definitions of all objects and types used in the pipeline definition.

Name of the Docker secret used for communicating with Docker registry. Used for pulling image from private registries.

.. py:data:: buildArgs
:type: list(BuildArg)

A list of build-time arguments.


.. py:attribute:: ServiceRun
:type: Object
Expand Down Expand Up @@ -390,6 +395,20 @@ Definitions of all objects and types used in the pipeline definition.
Name of a secret from which the value should be retrieved to mount into the container as a file.


.. py:attribute:: BuildArg
:type: Object

The BuildArg object represents a build-time parameter that will be set during the build. Equivalent to ``--build-arg`` parameter in the ``docker build`` command.

.. py:attribute:: name
The name of the build argument

.. py:attribute:: value
The value of the build argument


.. py:attribute:: When
:type: Object

Expand Down

0 comments on commit 02633ca

Please sign in to comment.