Commit 863e0c52 authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

Merge branch '1-auto-stop-environments' into 'master'

Resolve "auto-stop environments"

Closes #1

See merge request to-be-continuous/azure!3
parents 71a5cf92 ba405136
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -231,6 +231,7 @@ Here are variables supported to configure review environments:
| `AZURE_REVIEW_SP_CLIENT_ID`| Service Principal client ID for `review` env - _(only define if using Service Principal authentication with credentials and if different from default)_ | _none_ |
| :lock: `AZURE_REVIEW_SP_PASSWORD`| Service Principal password (client secret or certificate (File type)) for `review` env - _(only define if using Service Principal authentication with credentials and if different from default)_ | _none_ |
| `AZURE_REVIEW_SP_TENANT_ID`| Service Principal tenant ID for `review` env - _(only define if using Service Principal authentication with credentials and if different from default)_ | _none_ |
| `AZURE_REVIEW_AUTOSTOP_DURATION`| The amount of time before GitLab will automatically stop `review` environments | `4 hours` |

### Integration environment configuration

+5 −0
Original line number Diff line number Diff line
@@ -55,6 +55,11 @@
          "description": "The application name for review env (only define if different from global)",
          "advanced": true
        },
        {
          "name": "AZURE_REVIEW_AUTOSTOP_DURATION",
          "description": "The amount of time before GitLab will automatically stop `review` environments",
          "default": "4 hours"
        },
        {
          "name": "AZURE_REVIEW_ENVIRONMENT_URL",
          "type": "url",
+2 −2
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ variables:
  AZURE_SCRIPTS_DIR: "."

  AZURE_BASE_APP_NAME: "$CI_PROJECT_NAME"
  AZURE_REVIEW_ENVIRONMENT_SCHEME: "https"
  AZURE_REVIEW_AUTOSTOP_DURATION: "4 hours"

  # default: one-click deploy
  AZURE_PROD_DEPLOY_STRATEGY: manual
@@ -436,7 +436,6 @@ azure-review:
    ENV_TYPE: review
    ENV_APP_NAME: "$AZURE_REVIEW_APP_NAME"
    ENV_URL: "${AZURE_REVIEW_ENVIRONMENT_URL}"
    ENV_URL_LEGACY: "${AZURE_REVIEW_ENVIRONMENT_SCHEME}://${CI_PROJECT_NAME}-${CI_ENVIRONMENT_SLUG}.${AZURE_REVIEW_ENVIRONMENT_DOMAIN}"
    # service principal login (username/password)
    ENV_SP_CLIENT_ID: "$AZURE_REVIEW_SP_CLIENT_ID"
    ENV_SP_PASSWORD: "$AZURE_REVIEW_SP_PASSWORD"
@@ -447,6 +446,7 @@ azure-review:
  environment:
    name: review/$CI_COMMIT_REF_NAME
    on_stop: azure-cleanup-review
    auto_stop_in: "$AZURE_REVIEW_AUTOSTOP_DURATION"
  resource_group: review/$CI_COMMIT_REF_NAME
  rules:
    # exclude tags