Pipeline Parameters and Resources - michaelsauter/ods-pipeline GitHub Wiki
The following parameters are set by the ODS webhook interceptor on every pipeline run:
-
project
: The name of project (Bitbucket project in lowercase). -
repository-url
: The URL of the Git repository. -
repository
: Name of the repository. -
git-ref
: E.g.master
orv1.0
- if a repository defines child repositories, then each of those repositories is required to have the same Git refs. -
git-ref-spec
: E.g.refs/heads/master
orrefs/tags/v1.0
. -
git-ref-prefix
: Empty or the value ofgitRef
before the first slash (/
), e.g.release
forrelease/1.0
-
environment
: If the environments config in.ods.yml
maps thegitRef
to an environment, it is set to the environment (dev
,qa
orprod
). Otherwise,environment
is empty. -
version
: If thegitRef
contains a version (release/X
orvX
), it is set to that version (X
). Otherwise, the version is set toWIP
. -
target
:default
for now. This could be used in the future to be able to distinguish between deployment targets (multi-cluster deploy). However at this stage the concept for that is not finalized. -
trigger-event
: The type of webhook event triggering the pipeline (e.g.repo:refs_changed
). -
comment
: If a comment can be extracted from the webhook event payload, the text of the comment, otherwise empty.
The first task, ods-init
sets the following results:
-
<REPOSITORY>-git-sha
: Commit SHA for each checked out repository
Pipelines can also make use of ConfigMap
and Secret
resources in the *-cd
namespace, either by exposing them as environment variables or mounting them as volumes.
ODS provides the following resources:
- ConfigMap
nexus
with keyurl
- Secret
nexus-auth
with keysusername
andpassword
- ConfigMap
sonarqube
with keyurl
- Secret
sonarqube-auth
with keysusername
andpassword
(an auth token) - ConfigMap
bitbucket
with keysurl
andrepoBase
- Secret
bitbucket-auth
with keysusername
andpassword
(a personal access token) - ConfigMap
registry
with keyurl
(internal OpenShift image registry)