diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 53aefa3c7449944ca6888b1fb78253762dcfeae3..92a32d6e2ff47da7572cc8c2af2f233ec9f59d60 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -139,3 +139,16 @@ gcloud-psc: cd $GCLOUD_ROOT_PSC chmod +x ./setting-psc.sh ./setting-psc.sh + artifacts: + paths: + - ${CI_PROJECT_DIR}/pscConnectionId.env + + +elastic-traffic-filter: + stage: deploy + needs: + - gcloud-psc + tags: + - docker + script: |- + cat ${CI_PROJECT_DIR}/pscConnectionId.env diff --git a/manifests/psc/setting-psc.sh b/manifests/psc/setting-psc.sh index 989db28a413da35932a6385333179c57b274033d..a9eb8dafd8e0082031e10ef47dc41ffbc6f21bf1 100644 --- a/manifests/psc/setting-psc.sh +++ b/manifests/psc/setting-psc.sh @@ -38,3 +38,6 @@ else gcloud dns record-sets transaction add $(gcloud compute addresses describe $GCP_INTERNAL_IP_NAME --region=$GCP_REGION --format="get(address)") --name="*.$ELASTIC_DNS_ZONE." --ttl="30" --type="A" --zone="$GCP_DNS_ZONE_MAGENTO_ELASTIC" gcloud dns record-sets transaction execute --zone="$GCP_DNS_ZONE_MAGENTO_ELASTIC" fi + + +echo "GCP_PSC_CONNECTION_ID=$(gcloud compute forwarding-rules describe $GCP_PSC_NAME --region=$GCP_REGION --format="get(pscConnectionId)")" > pscConnectionId.env \ No newline at end of file