Selects an environment given on the conditions.
7.9K
Selects an set of environment variable prefix depending on the condition.
select-env [FLAGS]
CLI
| Flag / Environment | Description | Type | Default |
|---|---|---|---|
$LOG_LEVEL | Define the log level for the application. | stringenum("panic", "fatal", "warn", "info", "debug", "trace") | "info" |
$ENV_FILE | Environment files to inject. | string[] |
Environment
| Flag / Environment | Description | Type | Default |
|---|---|---|---|
$ENVIRONMENT_CONDITIONS | Regex pattern to select an environment. Use either "heads/" for narrowing the search to branches or "tags/" for narrowing the search to tags. | stringformat(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_REFERENCE | Fail on missing environment references. | bool | true |
$ENVIRONMENT_STRICT | Fail when no environment is selected. | bool | true |
$ENVIRONMENT_FILE* | File for writing the environment variables of the selected environment. | string | "env.environment" |
* required
GIT
| Flag / Environment | Description | Type | Default |
|---|---|---|---|
$CI_COMMIT_REF_NAME$BITBUCKET_BRANCH | Source control branch. | string | |
$CI_COMMIT_TAG$BITBUCKET_TAG | Source control tag. | string |
Content type
Image
Digest
sha256:b3b6e8271…
Size
7 MB
Last updated
1 day ago
docker pull cenk1cenk2/pipe-select-env