Skip to content

Commit ded4ee3

Browse files
authored
Merge pull request #222 from ONSdigital/EAR-2546-cloud-script-updates
EAR 2546 Update cloudbuild script
2 parents f5d496a + 85e7bfc commit ded4ee3

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

cloudbuild.yaml

+12-12
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,48 @@ steps:
22
- name: docker
33
id: build_and_push
44
entrypoint: sh
5-
args:
6-
- '-c'
5+
args:
6+
- "-c"
77
- |
88
if [ $_ENV = "staging" ]; then
9-
docker build -t "eu.gcr.io/ons-eqbs-images/eq-publisher:$SHORT_SHA" .
10-
docker push "eu.gcr.io/ons-eqbs-images/eq-publisher:$SHORT_SHA"
9+
docker build -t "$_EQ_PUBLISHER_IMAGE_REPO:$SHORT_SHA" .
10+
docker push "$_EQ_PUBLISHER_IMAGE_REPO:$SHORT_SHA"
1111
else
1212
echo "*************************************************************"
1313
echo "* Build not required *"
1414
echo "*************************************************************"
1515
fi
1616
17-
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:alpine'
17+
- name: "gcr.io/google.com/cloudsdktool/cloud-sdk:alpine"
1818
id: tag release
1919
entrypoint: /bin/bash
2020
args:
21-
- '-c'
21+
- "-c"
2222
- |
2323
if [ $_ENV = "preprod" ]; then
2424
gcloud container images add-tag \
25-
eu.gcr.io/ons-eqbs-images/eq-publisher:$SHORT_SHA \
26-
eu.gcr.io/ons-eqbs-images/eq-publisher:$TAG_NAME
25+
$_EQ_PUBLISHER_IMAGE_REPO:$SHORT_SHA \
26+
$_EQ_PUBLISHER_IMAGE_REPO:$TAG_NAME
2727
else
2828
echo "*************************************************************"
2929
echo "* Tagging not required *"
3030
echo "*************************************************************"
3131
fi
3232
33-
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:alpine'
33+
- name: "gcr.io/google.com/cloudsdktool/cloud-sdk:alpine"
3434
id: deploy
3535
entrypoint: sh
3636
args:
37-
- '-c'
37+
- "-c"
3838
- |
3939
if [ $_ENV = "staging" ]; then
4040
gcloud run deploy eq-publisher \
41-
--image "eu.gcr.io/ons-eqbs-images/eq-publisher:$SHORT_SHA" \
41+
--image "$_EQ_PUBLISHER_IMAGE_REPO:$SHORT_SHA" \
4242
--region europe-west2 \
4343
--platform managed
4444
else
4545
gcloud run deploy eq-publisher \
46-
--image "eu.gcr.io/ons-eqbs-images/eq-publisher:$TAG_NAME" \
46+
--image "$_EQ_PUBLISHER_IMAGE_REPO:$TAG_NAME" \
4747
--region europe-west2 \
4848
--platform managed
4949
fi

0 commit comments

Comments
 (0)