Commit 063e2793 authored by Cédric OLIVIER's avatar Cédric OLIVIER
Browse files

Merge branch 'feat/component' into 'master'

feat: migrate to CI/CD component

See merge request to-be-continuous/terraform!101
parents 6d60913d 93c29a27
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ include:
    file: '/templates/validation.yml'
  - project: 'to-be-continuous/bash'
    ref: '3.3'
    file: 'templates/gitlab-ci-bash.yml'
    file: '/templates/gitlab-ci-bash.yml'
  - project: 'to-be-continuous/semantic-release'
    ref: '3.7'
    file: '/templates/gitlab-ci-semrel.yml'    
+164 −145

File changed.

Preview size limit exceeded, changes collapsed.

+2 −2
Original line number Diff line number Diff line
@@ -27,13 +27,13 @@ if [[ "$curVer" ]]; then
  log_info "Bump version from \\e[33;1m${curVer}\\e[0m to \\e[33;1m${nextVer}\\e[0m (release type: $relType)..."

  # replace in README
  sed -e "s/ref: '$curVer'/ref: '$nextVer'/" README.md > README.md.next
  sed -e "s/ref: *'$curVer'/ref: '$nextVer'/" -e "s/ref: *\"$curVer\”/ref: \”$nextVer\”/" -e "s/component: *\(.*\)@$curVer/component: \1@$nextVer/" README.md > README.md.next
  mv -f README.md.next README.md

  # replace in template and variants
  for tmpl in templates/*.yml
  do
    sed -e "s/\"$curVer\"/\"$nextVer\"/" "$tmpl" > "$tmpl.next"
    sed -e "s/command: *\[\"--service\", \"\(.*\)\", \"$curVer\"\]/command: [\"--service\", \"\1\", \"$nextVer\"]/" "$tmpl" > "$tmpl.next"
    mv -f "$tmpl.next" "$tmpl"
  done
else
+36 −52
Original line number Diff line number Diff line
@@ -3,6 +3,8 @@
  "description": "Manage your infrastructure with [Terraform](https://www.terraform.io)",
  "template_path": "templates/gitlab-ci-terraform.yml",
  "kind": "infrastructure",
  "prefix": "tf",
  "is_component": true,
  "variables": [
    {
      "name": "TF_IMAGE",
@@ -247,20 +249,17 @@
      "variables": [
        {
          "name": "TF_REVIEW_EXTRA_OPTS",
          "description": "Terraform extra options for `review` env (applies to all Terraform commands)",
          "default": "$TF_EXTRA_OPTS",
          "description": "Terraform extra options for `review` env (applies to all Terraform commands) (only define to override default)",
          "advanced": true
        },
        {
          "name": "TF_REVIEW_INIT_OPTS",
          "description": "Terraform extra [init options](https://developer.hashicorp.com/terraform/cli/commands/init) for `review` env",
          "default": "$TF_INIT_OPTS",
          "description": "Terraform extra [init options](https://developer.hashicorp.com/terraform/cli/commands/init) for `review` env (only define to override default)",
          "advanced": true
        },
        {
          "name": "TF_REVIEW_WORKSPACE",
          "description": "Terraform project [workspace](https://developer.hashicorp.com/terraform/language/state/workspaces) for `review` env",
          "default": "$TF_WORKSPACE",
          "description": "Terraform project [workspace](https://developer.hashicorp.com/terraform/language/state/workspaces) for `review` env (only define to override default)",
          "advanced": true
        },
        {
@@ -271,20 +270,17 @@
        },
        {
          "name": "TF_REVIEW_PLAN_OPTS",
          "description": "Terraform extra [plan options](https://developer.hashicorp.com/terraform/cli/commands/plan) for `review` env",
          "default": "$TF_PLAN_OPTS",
          "description": "Terraform extra [plan options](https://developer.hashicorp.com/terraform/cli/commands/plan) for `review` env (only define to override default)",
          "advanced": true
        },
        {
          "name": "TF_REVIEW_APPLY_OPTS",
          "description": "Terraform extra [apply options](https://developer.hashicorp.com/terraform/cli/commands/apply) for `review` env",
          "default": "$TF_APPLY_OPTS",
          "description": "Terraform extra [apply options](https://developer.hashicorp.com/terraform/cli/commands/apply) for `review` env (only define to override default)",
          "advanced": true
        },
        {
          "name": "TF_REVIEW_DESTROY_OPTS",
          "description": "Terraform extra [destroy options](https://developer.hashicorp.com/terraform/cli/commands/destroy) for `review` env",
          "default": "$TF_DESTROY_OPTS",
          "description": "Terraform extra [destroy options](https://developer.hashicorp.com/terraform/cli/commands/destroy) for `review` env (only define to override default)",
          "advanced": true
        },
        {
@@ -302,20 +298,17 @@
      "variables": [
        {
          "name": "TF_INTEG_EXTRA_OPTS",
          "description": "Terraform extra options for `integration` env (applies to all Terraform commands)",
          "default": "$TF_EXTRA_OPTS",
          "description": "Terraform extra options for `integration` env (applies to all Terraform commands) (only define to override default)",
          "advanced": true
        },
        {
          "name": "TF_INTEG_INIT_OPTS",
          "description": "Terraform extra [init options](https://developer.hashicorp.com/terraform/cli/commands/init) for `integration` env",
          "default": "$TF_INIT_OPTS",
          "description": "Terraform extra [init options](https://developer.hashicorp.com/terraform/cli/commands/init) for `integration` env (only define to override default)",
          "advanced": true
        },
        {
          "name": "TF_INTEG_WORKSPACE",
          "description": "Terraform project [workspace](https://developer.hashicorp.com/terraform/language/state/workspaces) for `integration` env",
          "default": "$TF_WORKSPACE",
          "description": "Terraform project [workspace](https://developer.hashicorp.com/terraform/language/state/workspaces) for `integration` env (only define to override default)",
          "advanced": true
        },
        {
@@ -326,20 +319,17 @@
        },
        {
          "name": "TF_INTEG_PLAN_OPTS",
          "description": "Terraform extra [plan options](https://developer.hashicorp.com/terraform/cli/commands/plan) for `integration` env",
          "default": "$TF_PLAN_OPTS",
          "description": "Terraform extra [plan options](https://developer.hashicorp.com/terraform/cli/commands/plan) for `integration` env (only define to override default)",
          "advanced": true
        },
        {
          "name": "TF_INTEG_APPLY_OPTS",
          "description": "Terraform extra [apply options](https://developer.hashicorp.com/terraform/cli/commands/apply) for `integration` env",
          "default": "$TF_APPLY_OPTS",
          "description": "Terraform extra [apply options](https://developer.hashicorp.com/terraform/cli/commands/apply) for `integration` env (only define to override default)",
          "advanced": true
        },
        {
          "name": "TF_INTEG_DESTROY_OPTS",
          "description": "Terraform extra [destroy options](https://developer.hashicorp.com/terraform/cli/commands/destroy) for `integration` env",
          "default": "$TF_DESTROY_OPTS",
          "description": "Terraform extra [destroy options](https://developer.hashicorp.com/terraform/cli/commands/destroy) for `integration` env (only define to override default)",
          "advanced": true
        },
        {
@@ -357,20 +347,17 @@
      "variables": [
        {
          "name": "TF_STAGING_EXTRA_OPTS",
          "description": "Terraform extra options for `staging` env (applies to all Terraform commands)",
          "default": "$TF_EXTRA_OPTS",
          "description": "Terraform extra options for `staging` env (applies to all Terraform commands) (only define to override default)",
          "advanced": true
        },
        {
          "name": "TF_STAGING_INIT_OPTS",
          "description": "Terraform extra [init options](https://developer.hashicorp.com/terraform/cli/commands/init) for `staging` env",
          "default": "$TF_INIT_OPTS",
          "description": "Terraform extra [init options](https://developer.hashicorp.com/terraform/cli/commands/init) for `staging` env (only define to override default)",
          "advanced": true
        },
        {
          "name": "TF_STAGING_WORKSPACE",
          "description": "Terraform project [workspace](https://developer.hashicorp.com/terraform/language/state/workspaces) for `staging` env",
          "default": "$TF_WORKSPACE",
          "description": "Terraform project [workspace](https://developer.hashicorp.com/terraform/language/state/workspaces) for `staging` env (only define to override default)",
          "advanced": true
        },
        {
@@ -381,20 +368,17 @@
        },
        {
          "name": "TF_STAGING_PLAN_OPTS",
          "description": "Terraform extra [plan options](https://developer.hashicorp.com/terraform/cli/commands/plan) for `staging` env",
          "default": "$TF_PLAN_OPTS",
          "description": "Terraform extra [plan options](https://developer.hashicorp.com/terraform/cli/commands/plan) for `staging` env (only define to override default)",
          "advanced": true
        },
        {
          "name": "TF_STAGING_APPLY_OPTS",
          "description": "Terraform extra [apply options](https://developer.hashicorp.com/terraform/cli/commands/apply) for `staging` env",
          "default": "$TF_APPLY_OPTS",
          "description": "Terraform extra [apply options](https://developer.hashicorp.com/terraform/cli/commands/apply) for `staging` env (only define to override default)",
          "advanced": true
        },
        {
          "name": "TF_STAGING_DESTROY_OPTS",
          "description": "Terraform extra [destroy options](https://developer.hashicorp.com/terraform/cli/commands/destroy) for `staging` env",
          "default": "$TF_DESTROY_OPTS",
          "description": "Terraform extra [destroy options](https://developer.hashicorp.com/terraform/cli/commands/destroy) for `staging` env (only define to override default)",
          "advanced": true
        },
        {
@@ -412,20 +396,17 @@
      "variables": [
        {
          "name": "TF_PROD_EXTRA_OPTS",
          "description": "Terraform extra options for `production` env (applies to all Terraform commands)",
          "default": "$TF_EXTRA_OPTS",
          "description": "Terraform extra options for `production` env (applies to all Terraform commands) (only define to override default)",
          "advanced": true
        },
        {
          "name": "TF_PROD_INIT_OPTS",
          "description": "Terraform extra [init options](https://developer.hashicorp.com/terraform/cli/commands/init) for `production` env",
          "default": "$TF_INIT_OPTS",
          "description": "Terraform extra [init options](https://developer.hashicorp.com/terraform/cli/commands/init) for `production` env (only define to override default)",
          "advanced": true
        },
        {
          "name": "TF_PROD_WORKSPACE",
          "description": "Terraform project [workspace](https://developer.hashicorp.com/terraform/language/state/workspaces) for `production` env",
          "default": "$TF_WORKSPACE",
          "description": "Terraform project [workspace](https://developer.hashicorp.com/terraform/language/state/workspaces) for `production` env (only define to override default)",
          "advanced": true
        },
        {
@@ -437,20 +418,17 @@
        },
        {
          "name": "TF_PROD_PLAN_OPTS",
          "description": "Terraform extra [plan options](https://developer.hashicorp.com/terraform/cli/commands/plan) for `production` env",
          "default": "$TF_PLAN_OPTS",
          "description": "Terraform extra [plan options](https://developer.hashicorp.com/terraform/cli/commands/plan) for `production` env (only define to override default)",
          "advanced": true
        },
        {
          "name": "TF_PROD_APPLY_OPTS",
          "description": "Terraform extra [apply options](https://developer.hashicorp.com/terraform/cli/commands/apply) for `production` env",
          "default": "$TF_APPLY_OPTS",
          "description": "Terraform extra [apply options](https://developer.hashicorp.com/terraform/cli/commands/apply) for `production` env (only define to override default)",
          "advanced": true
        },
        {
          "name": "TF_PROD_DESTROY_OPTS",
          "description": "Terraform extra [destroy options](https://developer.hashicorp.com/terraform/cli/commands/destroy) for `production` env",
          "default": "$TF_DESTROY_OPTS",
          "description": "Terraform extra [destroy options](https://developer.hashicorp.com/terraform/cli/commands/destroy) for `production` env (only define to override default)",
          "advanced": true
        }
      ]
@@ -505,6 +483,12 @@
          "default": "registry.gitlab.com/to-be-continuous/tools/vault-secrets-provider:master",
          "advanced": true
        },
        {
          "name": "GCP_OIDC_AUD",
          "description": "The `aud` claim for the JWT token _(only required for [OIDC authentication](https://docs.gitlab.com/ee/ci/cloud_services/aws/))_",
          "default": "$CI_SERVER_URL",
          "advanced": true
        },
        {
          "name": "GCP_OIDC_ACCOUNT",
          "description": "Default Service Account to which impersonate with OpenID Connect authentication"
@@ -573,22 +557,22 @@
        },
        {
          "name": "AWS_REVIEW_OIDC_ROLE_ARN",
          "description": "IAM Role ARN associated with GitLab to [authenticate using OpenID Connect](https://docs.gitlab.com/ee/ci/cloud_services/aws/) on `review` env _(only define if different from global)_",
          "description": "IAM Role ARN associated with GitLab to [authenticate using OpenID Connect](https://docs.gitlab.com/ee/ci/cloud_services/aws/) on `review` env _(only define to override default)_",
          "advanced": true
        },
        {
          "name": "AWS_INTEG_OIDC_ROLE_ARN",
          "description": "IAM Role ARN associated with GitLab to [authenticate using OpenID Connect](https://docs.gitlab.com/ee/ci/cloud_services/aws/) on `integration` env _(only define if different from global)_",
          "description": "IAM Role ARN associated with GitLab to [authenticate using OpenID Connect](https://docs.gitlab.com/ee/ci/cloud_services/aws/) on `integration` env _(only define to override default)_",
          "advanced": true
        },
        {
          "name": "AWS_STAGING_OIDC_ROLE_ARN",
          "description": "IAM Role ARN associated with GitLab to [authenticate using OpenID Connect](https://docs.gitlab.com/ee/ci/cloud_services/aws/) on `staging` env _(only define if different from global)_",
          "description": "IAM Role ARN associated with GitLab to [authenticate using OpenID Connect](https://docs.gitlab.com/ee/ci/cloud_services/aws/) on `staging` env _(only define to override default)_",
          "advanced": true
        },
        {
          "name": "AWS_PROD_OIDC_ROLE_ARN",
          "description": "IAM Role ARN associated with GitLab to [authenticate using OpenID Connect](https://docs.gitlab.com/ee/ci/cloud_services/aws/) on `production` env _(only define if different from global)_",
          "description": "IAM Role ARN associated with GitLab to [authenticate using OpenID Connect](https://docs.gitlab.com/ee/ci/cloud_services/aws/) on `production` env _(only define to override default)_",
          "advanced": true
        }
      ]
−1.02 KiB (10.5 KiB)
Loading image diff...
Loading