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 b47e728b authored by Nicolas's avatar Nicolas
Browse files

add cache

parent 3fe7a8ba
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,18 @@
image: busybox:latest
variables:
TF_ROOT_ELASTIC: ${CI_PROJECT_DIR}/manifests/elastic
TF_ROOT_MAGENTO: ${CI_PROJECT_DIR}/manifests/magento
cache:
- key: elastic
paths:
- ${TF_ROOT_ELASTIC}/.terraform
- key: magento
paths:
- ${TF_ROOT_MAGENTO}/.terraform
check-elastic:
stage: test
tags:
......@@ -10,11 +22,10 @@ check-elastic:
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
cd $TF_ROOT_ELASTIC
gitlab-terraform init
gitlab-terraform validate
gitlab-terraform fmt -check
......@@ -28,13 +39,12 @@ check-magento:
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
cd $TF_ROOT_MAGENTO
echo $GCP_SA_GITLAB > gcp-sa.json
gitlab-terraform init
gitlab-terraform validate
......@@ -51,11 +61,10 @@ apply-elastic:
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
cd $TF_ROOT_ELASTIC
gitlab-terraform init
gitlab-terraform apply -auto-approve
......@@ -69,13 +78,12 @@ apply-magento:
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
cd $TF_ROOT_MAGENTO
echo $GCP_SA_GITLAB > gcp-sa.json
gitlab-terraform init
gitlab-terraform apply -auto-approve
......
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