Skip to content

Commit

Permalink
Updated variable names (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
dandruszak committed Jul 7, 2020
1 parent 937a56a commit 6227079
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 33 deletions.
12 changes: 6 additions & 6 deletions source/pages/pipelines/building_failure_handlers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Below is an example of running a failure handler after a failed :attr:`step<Step
failureHandlers:
- name: failure-handler-1
image: busybox
script: 'echo "step $ICE_FAILED_STEP_NAME has failed"'
script: 'echo "step $ICECI_FAILED_STEP_NAME has failed"'
Global failure handlers
Expand All @@ -68,15 +68,15 @@ Below is an example of running a :attr:`failure handlers<FailureHandler>` from b
failureHandlers:
- name: failure-handler-1
image: busybox
script: 'echo "failure handler $ICE_STEP_NAME"'
script: 'echo "failure handler $ICECI_STEP_NAME"'
- name: failure-handler-2
image: busybox
script: 'echo "failure handler $ICE_STEP_NAME"'
script: 'echo "failure handler $ICECI_STEP_NAME"'
- name: failure-handler-3
image: busybox
script: 'echo "failure handler $ICE_STEP_NAME"'
script: 'echo "failure handler $ICECI_STEP_NAME"'
.. note::
Notice that ``failure-handler-1`` will run twice because it's declared in both the global section and in the step. Currently IceCI does not implement any deduplication mechanism for failure handlers.
Expand All @@ -101,10 +101,10 @@ Here's an example of defining environment variables and files on :attr:`failure
- name: failure-handler-1
image: busybox
script: |
echo $ICE_FH
echo $ICECI_FH
cat /mnt/file
environment:
- name: ICE_FH
- name: ICECI_FH
value: failure-handler-env
files:
- path: /mnt/file
Expand Down
26 changes: 13 additions & 13 deletions source/pages/pipelines/building_template.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Here are examples of using interpolation to create a Docker tag containing the n
user: iceci
imageName: my-app
tags:
- "build-{{ ICE_BUILD_NUMBER }}"
- "build-{{ ICECI_BUILD_NUMBER }}"
- latest
- name: pipeline-service
serviceRun:
Expand All @@ -49,67 +49,67 @@ Available variables

Although this list is similar to the list of :doc:`environment variables <environment>`, these are actually two independent sets of variables - they just happen to share some values.

.. envvar:: ICE_BUILD_NUMBER
.. envvar:: ICECI_BUILD_NUMBER

Subsequent number of a build in a repository. This value is unique only in the context of a given repository.

Example value: ``12``

.. envvar:: ICE_GIT_EVENT_TYPE
.. envvar:: ICECI_GIT_EVENT_TYPE

Git event type. Currently only ``commit`` is supported.

Example value: ``commit``

.. envvar:: ICE_GIT_BRANCH_NAME
.. envvar:: ICECI_GIT_BRANCH_NAME

Name of the branch on which the event happened.

Example value: ``master``

.. envvar:: ICE_GIT_TAG
.. envvar:: ICECI_GIT_TAG

Git tag name. This environment value is set only if ``ICE_GIT_EVENT_TYPE`` is set to ``tag``.
Git tag name. This environment value is set only if ``ICECI_GIT_EVENT_TYPE`` is set to ``tag``.

Example value: ``0.1.0``

.. envvar:: ICE_GIT_COMMIT_SHA
.. envvar:: ICECI_GIT_COMMIT_SHA

SHA of Git commit.

Example value: ``93126518fa6eec3447d1d57c503aeebfd84f23ec``

.. envvar:: ICE_GIT_AUTHOR_NAME
.. envvar:: ICECI_GIT_AUTHOR_NAME

Name of the event author.

Example value: ``iceci``

.. envvar:: ICE_GIT_AUTHOR_EMAIL
.. envvar:: ICECI_GIT_AUTHOR_EMAIL

Email of the event author.

Example value: ``iceci@iceci.io``

.. envvar:: ICE_GIT_AUTHOR_DATE
.. envvar:: ICECI_GIT_AUTHOR_DATE

Date of the event.

Example value: ``Wed, 5 Feb 2020 01:24:15 +0100``

.. envvar:: ICE_GIT_LOG_HEADER
.. envvar:: ICECI_GIT_LOG_HEADER

Git log header encoded in *base64*.

Example value: ``VXBkYXRlICdSRUFETUUubWQnCg==``

.. envvar:: ICE_GIT_LOG_MESSAGE
.. envvar:: ICECI_GIT_LOG_MESSAGE

Git log body (without the header) encoded in *base64*.

Example value: ``VXBkYXRlICdSRUFETUUubWQnCg==``

.. envvar:: ICE_GIT_TAG_OR_BRANCH
.. envvar:: ICECI_GIT_TAG_OR_BRANCH

The name of the current git branch or tag - the value depends on which type of event triggered the build.

Expand Down
28 changes: 14 additions & 14 deletions source/pages/pipelines/environment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,84 +14,84 @@ Steps
Environment variables specified here are injected into every :attr:`step<Step>` and :attr:`failure handler<FailureHandler>` in the pipeline.


.. envvar:: ICE_BUILD_NUMBER
.. envvar:: ICECI_BUILD_NUMBER

Subsequent number of a build in a repository. This value is unique only in the context of a given repository.

Example value: ``12``


.. envvar:: ICE_STEP_NAME
.. envvar:: ICECI_STEP_NAME

Name of the step that's currently executing

Example value: ``run-tests``


.. envvar:: ICE_SERVICE_XXX
.. envvar:: ICECI_SERVICE_XXX

IP address of the **XXX** service. This variable is created for every service defined in the pipeline spec.

Example value: ``10.0.0.1``


.. envvar:: ICE_GIT_EVENT_TYPE
.. envvar:: ICECI_GIT_EVENT_TYPE

Git event type. Currently only ``commit`` is supported.

Example value: ``commit``


.. envvar:: ICE_GIT_COMMIT_SHA
.. envvar:: ICECI_GIT_COMMIT_SHA

SHA of Git commit.

Example value: ``93126518fa6eec3447d1d57c503aeebfd84f23ec``


.. envvar:: ICE_GIT_BRANCH_NAME
.. envvar:: ICECI_GIT_BRANCH_NAME

Name of the branch on which the event happened.

Example value: ``master``


.. envvar:: ICE_GIT_TAG
.. envvar:: ICECI_GIT_TAG

Git tag name. This environment value is set only if ``ICE_GIT_EVENT_TYPE`` is set to ``tag``.
Git tag name. This environment value is set only if ``ICECI_GIT_EVENT_TYPE`` is set to ``tag``.

Example value: ``0.1.0``


.. envvar:: ICE_GIT_LOG_HEADER
.. envvar:: ICECI_GIT_LOG_HEADER

Git log header encoded in *base64*.

Example value: ``VXBkYXRlICdSRUFETUUubWQnCg==``


.. envvar:: ICE_GIT_LOG_MESSAGE
.. envvar:: ICECI_GIT_LOG_MESSAGE

Git log body (without the header) encoded in *base64*.

Example value: ``VXBkYXRlICdSRUFETUUubWQnCg==``


.. envvar:: ICE_GIT_AUTHOR_NAME
.. envvar:: ICECI_GIT_AUTHOR_NAME

Name of the event author.

Example value: ``iceci``


.. envvar:: ICE_GIT_AUTHOR_EMAIL
.. envvar:: ICECI_GIT_AUTHOR_EMAIL

Email of the event author.

Example value: ``iceci@iceci.io``


.. envvar:: ICE_GIT_AUTHOR_DATE
.. envvar:: ICECI_GIT_AUTHOR_DATE

Date of the event.

Expand All @@ -104,7 +104,7 @@ Failure handler

Environment variables specified here are injected into every :attr:`failure handler<FailureHandler>` in the pipeline.

.. envvar:: ICE_FAILED_STEP_NAME
.. envvar:: ICECI_FAILED_STEP_NAME

Name of the failed step.

Expand Down

0 comments on commit 6227079

Please sign in to comment.