Skip to content

Commit

Permalink
chore: update makefile variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Ziinc committed Oct 12, 2023
1 parent 620c523 commit e1622b3
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit e1622b3

Please sign in to comment.