Commit ab37f241 authored by Cédric OLIVIER's avatar Cédric OLIVIER Committed by Pierre SMEYERS
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 c574d848
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -108,7 +108,7 @@ Here are variables supported to configure review environments:

| Name                     | description                            | default value     |
| ------------------------ | -------------------------------------- | ----------------- |
| `S3_REVIEW_DISABLED`     | Disables `review` environments         | _none_ (enabled) |
| `S3_REVIEW_DISABLED`     | Set to `true` to disable `review` environments         | _none_ (enabled) |
| `S3_REVIEW_ENDPOINT_HOST`| S3 endpoint hostname (and port) for `review` env  _(only define if different from default)_ | `$S3_ENDPOINT_HOST` |
| :lock: `S3_REVIEW_ACCESS_KEY` | S3 service Access Key for `review` env  _(only define if different from default)_    | `$S3_ACCESS_KEY` |
| :lock: `S3_REVIEW_SECRET_KEY` | S3 service Secret Key for `review` env  _(only define if different from default)_    | `$S3_SECRET_KEY` |
@@ -128,7 +128,7 @@ Here are variables supported to configure the integration environment:

| Name                     | description                            | default value     |
| ------------------------ | -------------------------------------- | ----------------- |
| `S3_INTEG_DISABLED`      | Disables the `integration` environment | _none_ (enabled) |
| `S3_INTEG_DISABLED`      | Set to `true` to disable the `integration` environment | _none_ (enabled) |
| `S3_INTEG_ENDPOINT_HOST` | S3 endpoint hostname (and port) for `integration` env  _(only define if different from default)_    | `$S3_ENDPOINT_HOST` |
| :lock: `S3_INTEG_ACCESS_KEY` | S3 service Access Key for `integration` env  _(only define if different from default)_    | `$S3_ACCESS_KEY` |
| :lock: `S3_INTEG_SECRET_KEY` | S3 service Secret Key for `integration` env  _(only define if different from default)_    | `$S3_SECRET_KEY` |
@@ -146,7 +146,7 @@ Here are variables supported to configure the staging environment:

| Name                     | description                            | default value     |
| ------------------------ | -------------------------------------- | ----------------- |
| `S3_STAGING_DISABLED`    | Disables the `staging` environment     | _none_ (enabled) |
| `S3_STAGING_DISABLED`    | Set to `true` to disable the `staging` environment     | _none_ (enabled) |
| `S3_STAGING_ENDPOINT_HOST`| S3 endpoint hostname (and port) for `staging` env  _(only define if different from default)_   | `$S3_ENDPOINT_HOST` |
| :lock: `S3_STAGING_ACCESS_KEY` | S3 service Access Key for `staging` env  _(only define if different from default)_    | `$S3_ACCESS_KEY` |
| :lock: `S3_STAGING_SECRET_KEY` | S3 service Secret Key for `staging` env  _(only define if different from default)_    | `$S3_SECRET_KEY` |
@@ -163,7 +163,7 @@ Here are variables supported to configure the production environment:

| Name                     | description                            | default value     |
| ------------------------ | -------------------------------------- | ----------------- |
| `S3_PROD_DISABLED`       | Disables the `production` environment  | _none_ (enabled) |
| `S3_PROD_DISABLED`       | Set to `true` to disable the `production` environment  | _none_ (enabled) |
| `S3_PROD_ENDPOINT_HOST`  | S3 endpoint hostname (and port) for `production` env  _(only define if different from default)_| `$S3_ENDPOINT_HOST` |
| :lock: `S3_PROD_ACCESS_KEY` | S3 service Access Key for `production` env  _(only define if different from default)_    | `$S3_ACCESS_KEY` |
| :lock: `S3_PROD_SECRET_KEY` | S3 service Secret Key for `production` env  _(only define if different from default)_    | `$S3_SECRET_KEY` |
@@ -181,7 +181,7 @@ It uses the following variables:
| ---------------------- | --------------------------------------------- | ----------------- |
| `S3_DEPLOY_ARGS`       | [s3cmd](https://s3tools.org/usage) command and options to deploy files to the bucket | `put --acl-public --no-mime-magic --guess-mime-type --recursive` |
| `S3_DEPLOY_FILES`      | Pattern(s) of files to deploy to the S3 bucket| `public/` _(all files from `public` directory)_ |
| `S3_WEBSITE_DISABLED`  | Disables WebSite hosting by your S3 bucket    | _none_ (enabled by default) |
| `S3_WEBSITE_DISABLED`  | Set to `true` to disable WebSite hosting by your S3 bucket    | _none_ (enabled by default) |
| `S3_WEBSITE_ARGS`      | [s3cmd](https://s3tools.org/usage) command and options to enable WebSite hosting on the bucket | `ws-create --ws-index=index.html` |

If need be you could add your own hook script `s3-pre-deploy.sh` that will be triggered right before deploying files to
+8 −8
Original line number Diff line number Diff line
@@ -313,7 +313,7 @@ stages:
    s3cmd ${TRACE+-v} $S3_DEPLOY_ARGS $S3_DEPLOY_FILES "s3://${bucket}"

    # create website
    if [[ -z "$S3_WEBSITE_DISABLED" ]]
    if [[ "$S3_WEBSITE_DISABLED" != "true" ]]
    then
      log_info "... create website"
      # shellcheck disable=SC2086
@@ -390,7 +390,7 @@ stages:
    fi
  }

  if [[ -z "$TEMPLATE_CHECK_UPDATE_DISABLED" ]]; then check_for_update s3 "1.2.1"; fi
  if [[ "$TEMPLATE_CHECK_UPDATE_DISABLED" != "true" ]]; then check_for_update s3 "1.2.1"; fi
  unscope_variables
  eval_all_secrets

@@ -493,7 +493,7 @@ s3-review:
    - if: $CI_COMMIT_TAG
      when: never
    # exclude if $S3_REVIEW_DISABLED set
    - if: $S3_REVIEW_DISABLED
    - if: '$S3_REVIEW_DISABLED == "true"'
      when: never
    # exclude if $CLEANUP_ALL_REVIEW set to 'force'
    - if: '$CLEANUP_ALL_REVIEW == "force"'
@@ -522,7 +522,7 @@ s3-cleanup-review:
    - if: $CI_COMMIT_TAG
      when: never
    # exclude if $S3_REVIEW_DISABLED set
    - if: $S3_REVIEW_DISABLED
    - if: '$S3_REVIEW_DISABLED == "true"'
      when: never
    # exclude if $CLEANUP_ALL_REVIEW set to 'force'
    - if: '$CLEANUP_ALL_REVIEW == "force"'
@@ -559,7 +559,7 @@ s3-cleanup-all-review:
    - if: $CI_COMMIT_TAG
      when: never
    # exclude if $S3_REVIEW_DISABLED set
    - if: $S3_REVIEW_DISABLED
    - if: '$S3_REVIEW_DISABLED == "true"'
      when: never
    # on any branch with $CLEANUP_ALL_REVIEW set to 'force': auto, always (doesn't depend on upstream pipeline succeeds)
    - if: '$CLEANUP_ALL_REVIEW == "force"'
@@ -588,7 +588,7 @@ s3-integration:
    - if: $CI_MERGE_REQUEST_ID
      when: never
    # exclude if $S3_INTEG_DISABLED set
    - if: $S3_INTEG_DISABLED
    - if: '$S3_INTEG_DISABLED == "true"'
      when: never
    # only on integration branch(es)
    - if: '$CI_COMMIT_REF_NAME =~ $INTEG_REF'
@@ -612,7 +612,7 @@ s3-staging:
    - if: $CI_MERGE_REQUEST_ID
      when: never
    # exclude if $S3_STAGING_DISABLED set
    - if: $S3_STAGING_DISABLED
    - if: '$S3_STAGING_DISABLED == "true"'
      when: never
    # only on production branch(es)
    - if: '$CI_COMMIT_REF_NAME =~ $PROD_REF'
@@ -641,7 +641,7 @@ s3-production:
    - if: '$CI_COMMIT_REF_NAME !~ $PROD_REF'
      when: never
    # exclude if $S3_PROD_DISABLED set
    - if: $S3_PROD_DISABLED
    - if: '$S3_PROD_DISABLED == "true"'
      when: never
    # if $AUTODEPLOY_TO_PROD: auto
    - if: $AUTODEPLOY_TO_PROD