diff --git a/.github/workflows/services-pr-check.yml b/.github/workflows/services-pr-check.yml index 794e1c920..1af5d69df 100644 --- a/.github/workflows/services-pr-check.yml +++ b/.github/workflows/services-pr-check.yml @@ -79,3 +79,9 @@ PRINCIPAL_ID: ${{ secrets.GHA_PRINCIPAL_ID }} run: | make frontend.dry_run + + - name: 'Deploy Backend' + env: + PRINCIPAL_ID: ${{ secrets.GHA_PRINCIPAL_ID }} + run: | + make backend.dry_run diff --git a/Makefile b/Makefile index 23bc5e776..53a6abadf 100644 --- a/Makefile +++ b/Makefile @@ -98,7 +98,7 @@ infra.clean: # separator "/" (used for maestro only). # Services deployed on "svc" aks cluster -services_svc = istio metrics maestro.server maestro.registration cluster-service backend +services_svc = istio metrics maestro.server maestro.registration cluster-service # Services deployed on "mgmt" aks cluster(s) services_mgmt = acm maestro.agent pko hypershiftoperator # List of all services @@ -124,7 +124,7 @@ services_all = $(join services_svc,services_mgmt) # Pipelines section # This sections is used to reference pipeline runs and should replace # the usage of `svc-deploh.sh` script in the future. -services_svc_pipelines = frontend +services_svc_pipelines = backend frontend %.deploy: $(eval export dirname=$(subst .,/,$(basename $@))) ./templatize.sh $(DEPLOY_ENV) -p ./$(dirname)/pipeline.yaml -s deploy -P run -c public diff --git a/backend/Makefile b/backend/Makefile index ce689a792..ba44be9f3 100644 --- a/backend/Makefile +++ b/backend/Makefile @@ -1,4 +1,5 @@ -include ../setup-env.mk +-include ../helm-cmd.mk ifndef COMMIT COMMIT := $(shell git rev-parse --short=7 HEAD) @@ -41,7 +42,7 @@ deploy: DB_URL=$$(az cosmosdb show -n ${DB_NAME} -g ${RESOURCEGROUP} --query documentEndpoint -o tsv) && \ kubectl create namespace aro-hcp --dry-run=client -o json | kubectl apply -f - && \ kubectl label namespace aro-hcp "istio.io/rev=$${ISTO_VERSION}" --overwrite=true && \ - helm upgrade --install aro-hcp-backend-dev \ + ${HELM_CMD} aro-hcp-backend-dev \ deploy/helm/backend/ \ --set configMap.databaseName=${DB_NAME} \ --set configMap.databaseUrl="$${DB_URL}" \ diff --git a/backend/pipeline.yaml b/backend/pipeline.yaml index ae9b4537f..1e2220b98 100644 --- a/backend/pipeline.yaml +++ b/backend/pipeline.yaml @@ -9,6 +9,10 @@ resourceGroups: - name: deploy action: Shell command: make deploy + dryRun: + variables: + - name: DRY_RUN + value: "true" variables: - name: ARO_HCP_IMAGE_ACR configRef: svcAcrName