From e1622b36c6b14d402c895c6b6c5336df88510d5a Mon Sep 17 00:00:00 2001 From: TzeYiing Date: Thu, 12 Oct 2023 18:33:26 +0800 Subject: [PATCH] chore: update makefile variables --- Makefile | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 613a8f048..9c3d8b065 100644 --- a/Makefile +++ b/Makefile @@ -2,10 +2,11 @@ GCLOUD_LOCATION ?= us-central1 GCLOUD_KEYRING ?= logflare-keyring-us-central1 GCLOUD_KEY ?= logflare-secrets-key GCLOUD_PROJECT ?= logflare-staging - ERL_COOKIE ?= monster ENV ?= dev +SHA_IMAGE_TAG ?= dev-$(shell git rev-parse --short HEAD) +VERSION ?= $(shell cat ./VERSION) help: @cat DEVELOPMENT.md @@ -103,31 +104,29 @@ grpc.protoc: # manual deployment scripts deploy.staging.main: - $(eval IMAGE_TAG := dev-$(git rev-parse --short HEAD)) gcloud builds submit \ projects/logflare-staging/locations/us-central1/connections/github-logflare/repositories/Logflare-logflare \ --revision=main \ --config=cloudbuild/staging/build-image.yaml \ - --substitutions=_IMAGE_TAG=$(IMAGE_TAG) \ + --substitutions=_IMAGE_TAG=$(SHA_IMAGE_TAG) \ --region=us-central1 gcloud builds submit \ --no-source \ --config=./cloudbuild/staging/deploy.yaml \ - --substitutions=_IMAGE_TAG=$(IMAGE_TAG) + --substitutions=_IMAGE_TAG=$(SHA_IMAGE_TAG) deploy.staging.versioned: - $(eval IMAGE_TAG := $(cat ./VERSION)) gcloud builds submit \ projects/logflare-staging/locations/us-central1/connections/github-logflare/repositories/Logflare-logflare \ --revision=main \ --config=cloudbuild/staging/build-image.yaml \ - --substitutions=_IMAGE_TAG=$(IMAGE_TAG) \ + --substitutions=_IMAGE_TAG=$(VERSION) \ --region=us-central1 gcloud builds submit \ --no-source \ --config=./cloudbuild/staging/deploy.yaml \ - --substitutions=_IMAGE_TAG=$(IMAGE_TAG),_INSTANCE_TYPE=c2d-standard-8,_CLUSTER=versioned + --substitutions=_IMAGE_TAG=$(VERSION),_INSTANCE_TYPE=c2d-standard-8,_CLUSTER=versioned .PHONY: deploy.staging.main \ No newline at end of file