Skip to content
Snippets Groups Projects
Commit f74d9ef2 authored by Cédric OLIVIER's avatar Cédric OLIVIER
Browse files

feat: Change boolean variable behaviour


BREAKING CHANGE: boolean variable now triggered on explicit 'true' value

Signed-off-by: default avatarCédric OLIVIER <cedric3.olivier@orange.com>
parent 7eca4bdd
Branches
Tags
No related merge requests found
...@@ -241,7 +241,7 @@ It is bound to the `package-test` stage, and uses the following variables: ...@@ -241,7 +241,7 @@ It is bound to the `package-test` stage, and uses the following variables:
| Name | description | default value | | Name | description | default value |
| -------------------------------------- | -------------------------------------------------------------------- | ----------------- | | -------------------------------------- | -------------------------------------------------------------------- | ----------------- |
| `DOCKER_HEALTHCHECK_DISABLED` | Set to disable health check | _(none: enabled by default)_ | | `DOCKER_HEALTHCHECK_DISABLED` | Set to `true` to disable health check | _(none: enabled by default)_ |
| `DOCKER_HEALTHCHECK_TIMEOUT` | When testing a Docker Health (test stage), how long (in seconds) wait for the [HealthCheck status](https://docs.docker.com/engine/reference/builder/#healthcheck) | `60` | | `DOCKER_HEALTHCHECK_TIMEOUT` | When testing a Docker Health (test stage), how long (in seconds) wait for the [HealthCheck status](https://docs.docker.com/engine/reference/builder/#healthcheck) | `60` |
| `DOCKER_HEALTHCHECK_OPTIONS` | Docker options for health check such as port mapping, environment... | _(none)_ | | `DOCKER_HEALTHCHECK_OPTIONS` | Docker options for health check such as port mapping, environment... | _(none)_ |
| `DOCKER_HEALTHCHECK_CONTAINER_ARGS` | Set arguments sent to the running container for health check | _(none)_ | | `DOCKER_HEALTHCHECK_CONTAINER_ARGS` | Set arguments sent to the running container for health check | _(none)_ |
...@@ -271,7 +271,7 @@ It is bound to the `package-test` stage, and uses the following variables: ...@@ -271,7 +271,7 @@ It is bound to the `package-test` stage, and uses the following variables:
| `DOCKER_TRIVY_IMAGE` | The docker image used to scan images with Trivy | `aquasec/trivy:latest` | | `DOCKER_TRIVY_IMAGE` | The docker image used to scan images with Trivy | `aquasec/trivy:latest` |
| `DOCKER_TRIVY_ADDR` | The Trivy server address | _(none: disabled by default)_ | | `DOCKER_TRIVY_ADDR` | The Trivy server address | _(none: disabled by default)_ |
| `DOCKER_TRIVY_SECURITY_LEVEL_THRESHOLD`| Severities of vulnerabilities to be displayed (comma separated values: `UNKNOWN`, `LOW`, `MEDIUM`, `HIGH`, `CRITICAL`) | `UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL` | | `DOCKER_TRIVY_SECURITY_LEVEL_THRESHOLD`| Severities of vulnerabilities to be displayed (comma separated values: `UNKNOWN`, `LOW`, `MEDIUM`, `HIGH`, `CRITICAL`) | `UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL` |
| `DOCKER_TRIVY_DISABLED`| Set to disable Trivy analysis | _(none)_ | | `DOCKER_TRIVY_DISABLED`| Set to `true` to disable Trivy analysis | _(none)_ |
### `docker-publish` job ### `docker-publish` job
......
...@@ -367,7 +367,7 @@ stages: ...@@ -367,7 +367,7 @@ stages:
fi fi
} }
if [[ -z "$TEMPLATE_CHECK_UPDATE_DISABLED" ]]; then check_for_update docker "1.2.3"; fi if [[ "$TEMPLATE_CHECK_UPDATE_DISABLED" != "true" ]]; then check_for_update docker "1.2.3"; fi
init_workspace init_workspace
# ENDSCRIPT # ENDSCRIPT
...@@ -435,9 +435,9 @@ docker-lint: ...@@ -435,9 +435,9 @@ docker-lint:
when: never when: never
# execute if DOCKER_LINT_ENABLED set # execute if DOCKER_LINT_ENABLED set
# on production or integration branches: # on production or integration branches:
- if: '$DOCKER_LINT_ENABLED && ($CI_COMMIT_REF_NAME =~ $PROD_REF || $CI_COMMIT_REF_NAME =~ $INTEG_REF)' - if: '$DOCKER_LINT_ENABLED == "true" && ($CI_COMMIT_REF_NAME =~ $PROD_REF || $CI_COMMIT_REF_NAME =~ $INTEG_REF)'
# else (development branches): allow failure # else (development branches): allow failure
- if: '$DOCKER_LINT_ENABLED' - if: '$DOCKER_LINT_ENABLED == "true"'
allow_failure: true allow_failure: true
docker-hadolint: docker-hadolint:
...@@ -470,7 +470,7 @@ docker-hadolint: ...@@ -470,7 +470,7 @@ docker-hadolint:
- if: $CI_MERGE_REQUEST_ID - if: $CI_MERGE_REQUEST_ID
when: never when: never
# exclude if DOCKER_HADOLINT_DISABLED set # exclude if DOCKER_HADOLINT_DISABLED set
- if: $DOCKER_HADOLINT_DISABLED - if: '$DOCKER_HADOLINT_DISABLED == "true"'
when: never when: never
# on production or integration branches: auto # on production or integration branches: auto
- if: '$CI_COMMIT_REF_NAME =~ $PROD_REF || $CI_COMMIT_REF_NAME =~ $INTEG_REF' - if: '$CI_COMMIT_REF_NAME =~ $PROD_REF || $CI_COMMIT_REF_NAME =~ $INTEG_REF'
...@@ -589,7 +589,7 @@ docker-healthcheck: ...@@ -589,7 +589,7 @@ docker-healthcheck:
# exclude merge requests # exclude merge requests
- if: $CI_MERGE_REQUEST_ID - if: $CI_MERGE_REQUEST_ID
when: never when: never
- if: $DOCKER_HEALTHCHECK_DISABLED - if: '$DOCKER_HEALTHCHECK_DISABLED == "true"'
when: never when: never
- if: $DOCKER_DIND_BUILD - if: $DOCKER_DIND_BUILD
...@@ -624,7 +624,7 @@ docker-trivy: ...@@ -624,7 +624,7 @@ docker-trivy:
# exclude merge requests # exclude merge requests
- if: $CI_MERGE_REQUEST_ID - if: $CI_MERGE_REQUEST_ID
when: never when: never
- if: $DOCKER_TRIVY_DISABLED - if: '$DOCKER_TRIVY_DISABLED == "true"'
when: never when: never
- if: '$DOCKER_TRIVY_ADDR && ($CI_COMMIT_REF_NAME =~ $PROD_REF || $CI_COMMIT_REF_NAME =~ $INTEG_REF)' - if: '$DOCKER_TRIVY_ADDR && ($CI_COMMIT_REF_NAME =~ $PROD_REF || $CI_COMMIT_REF_NAME =~ $INTEG_REF)'
# allow failure on development branches: # allow failure on development branches:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment