Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit 3fe7a8ba authored by Nicolas's avatar Nicolas
Browse files

Add jobs

parent 1feb9c5f
No related branches found
No related tags found
No related merge requests found
# docs: https://docs.gitlab.com/ee/user/infrastructure/iac/terraform_state.html#get-started-using-gitlab-ci
image: busybox:latest image: busybox:latest
# docs: https://docs.gitlab.com/ee/user/infrastructure/iac/terraform_state.html#get-started-using-gitlab-ci check-elastic:
terraform-elastic: stage: test
stage: deploy
tags: tags:
- docker - docker
image: image:
...@@ -18,10 +19,8 @@ terraform-elastic: ...@@ -18,10 +19,8 @@ terraform-elastic:
gitlab-terraform validate gitlab-terraform validate
gitlab-terraform fmt -check gitlab-terraform fmt -check
gitlab-terraform plan gitlab-terraform plan
# gitlab-terraform apply -auto-approve
# gitlab-terraform destroy -auto-approve
terraform-magento: check-magento:
stage: deploy stage: deploy
tags: tags:
- docker - docker
...@@ -41,14 +40,51 @@ terraform-magento: ...@@ -41,14 +40,51 @@ terraform-magento:
gitlab-terraform validate gitlab-terraform validate
gitlab-terraform fmt -check gitlab-terraform fmt -check
gitlab-terraform plan gitlab-terraform plan
# gitlab-terraform apply -auto-approve
# gitlab-terraform destroy -auto-approve apply-elastic:
stage: deploy
needs:
- check-elastic
tags:
- docker
image:
name: registry.gitlab.com/gitlab-org/terraform-images/stable:latest
entrypoint: [""]
variables:
TF_ROOT: ${CI_PROJECT_DIR}/manifests/elastic
TF_ADDRESS: ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/terraform/state/elastic
TF_VAR_ec_apikey: $EC_API_KEY
script: |-
cd $TF_ROOT
gitlab-terraform init
gitlab-terraform apply -auto-approve
apply-magento:
stage: deploy
needs:
- check-magento
tags:
- docker
image:
name: registry.gitlab.com/gitlab-org/terraform-images/stable:latest
entrypoint: [""]
variables:
TF_ROOT: ${CI_PROJECT_DIR}/manifests/magento
TF_ADDRESS: ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/terraform/state/magento
TF_VAR_ec_apikey: $EC_API_KEY
TF_VAR_project_id: $GCP_PROJECT_ID
GCP_SA_GITLAB: $GCP_SA_GITLAB
script: |-
cd $TF_ROOT
echo $GCP_SA_GITLAB > gcp-sa.json
gitlab-terraform init
gitlab-terraform apply -auto-approve
gcloud-psc: gcloud-psc:
stage: deploy stage: deploy
needs: needs:
- terraform-elastic - apply-elastic
- terraform-magento - apply-magento
tags: tags:
- docker - docker
image: image:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment