Sign inSign up

cenk1cenk2/pipe-select-env

By cenk1cenk2

•Updated 1 day ago

Selects an environment given on the conditions.

Image
0

7.9K

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 / EnvironmentDescriptionTypeDefault
$LOG_LEVELDefine the log level for the application.string
enum("panic", "fatal", "warn", "info", "debug", "trace")
"info"
$ENV_FILEEnvironment files to inject.string[]

Environment

Flag / EnvironmentDescriptionTypeDefault
$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
format(json([]struct{ match: RegExp, environment: string }))
"[\n { \"match\": \"^tags/v?\\\\d+.\\\\d+.\\\\d+$\", \"environment\": \"production\" },\n { \"match\": \"^tags/v?\\\\d+.\\\\d+.\\\\d+-.*\\\\.\\\\d+$\", \"environment\": \"stage\" },\n { \"match\" :\"^heads/main$\", \"environment\": \"develop\" },\n { \"match\": \"^heads/master$\", \"environment\": \"develop\" }\n]"
$ENVIRONMENT_FAIL_ON_NO_REFERENCEFail on missing environment references.booltrue
$ENVIRONMENT_STRICTFail when no environment is selected.booltrue
$ENVIRONMENT_FILE*File for writing the environment variables of the selected environment.string"env.environment"

* required

GIT

Flag / EnvironmentDescriptionTypeDefault
$CI_COMMIT_REF_NAME
$BITBUCKET_BRANCH
Source control branch.string
$CI_COMMIT_TAG
$BITBUCKET_TAG
Source control tag.string

Tag summary

Content type

Image

Digest

sha256:b3b6e8271…

Size

7 MB

Last updated

1 day ago

docker pull cenk1cenk2/pipe-select-env