Sign inSign up

cenk1cenk2/pipe-select-env

By cenk1cenk2

Updated about 8 hours ago

Selects an environment given on the conditions.

Image
0

7.4K

cenk1cenk2/pipe-select-env repository overview

select-env

Selects an set of environment variable prefix depending on the condition.

select-env [FLAGS]

Flags

CLI

Flag / EnvironmentDescriptionTypeRequiredDefault
$LOG_LEVELDefine the log level for the application.string
enum("panic", "fatal", "warn", "info", "debug", "trace")
falseinfo
$ENV_FILEEnvironment files to inject.string[]false[]

Environment

Flag / EnvironmentDescriptionTypeRequiredDefault
$ENVIRONMENT_CONDITIONSRegex pattern to select an environment.
Use either "heads/" for narrowing the search to branches or "tags/" for narrowing the search to tags.
string
json([]struct{ match: RegExp, environment: string })
false[
{ "match": "^tags/v?\d+.\d+.\d+$", "environment": "production" },
{ "match": "^tags/v?\d+.\d+.\d+-.*\.\d+$", "environment": "stage" },
{ "match" :"^heads/main$", "environment": "develop" },
{ "match": "^heads/master$", "environment": "develop" }
]
$ENVIRONMENT_FAIL_ON_NO_REFERENCEFail on missing environment references.boolfalsetrue
$ENVIRONMENT_STRICTFail on no environment selected.boolfalsetrue
$ENVIRONMENT_FILEFile for writing the environment variables for selected environment.stringtrueenv.environment

GIT

Flag / EnvironmentDescriptionTypeRequiredDefault
$CI_COMMIT_REF_NAME
$BITBUCKET_BRANCH
Source control branch.stringfalse
$CI_COMMIT_TAG
$BITBUCKET_TAG
Source control tag.stringfalse

Tag summary

Content type

Image

Digest

sha256:9ab090cf6

Size

7.1 MB

Last updated

about 8 hours ago

docker pull cenk1cenk2/pipe-select-env