Skip to content

Commit aebce8d

Browse files
committed
Merge branch 'TT-513-Create-CI/CD-pipeline-in-timer-tracker-ui-to-deploy-changes-for-both-environments' of https://github.com/ioet/time-tracker-ui into TT-513-Create-CI/CD-pipeline-in-timer-tracker-ui-to-deploy-changes-for-both-environments
2 parents cb9246a + 16671fe commit aebce8d

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

.github/workflows/time-tracker-ui-cd-stage.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@ jobs:
3030
run: make build
3131
- name: Publish docker image to stage azure container registry
3232
run: |
33-
make login publish acr=timetrackerservicestageregistry image_tag=$RELEASE_VERSION
34-
- name: Setup terraform
35-
uses: hashicorp/setup-terraform@v1
36-
- name: Authenticate with the TF modules repository
37-
uses: webfactory/[email protected]
38-
with:
39-
ssh-private-key: ${{ secrets.INFRA_TERRAFORM_MODULES_SSH_PRIV_KEY }}
40-
- name: Terraform Init
41-
working-directory: ${{ env.WORKING_DIR }}
42-
run: terraform init
43-
- name: Terraform Apply
44-
working-directory: ${{ env.WORKING_DIR }}
45-
run: terraform apply -lock=false -var-file="${{ env.TF_WORKSPACE }}.tfvars" -var "image_tag=$RELEASE_VERSION" -auto-approve
33+
make login publish acr=TT513registry image_tag=$RELEASE_VERSION
34+
# - name: Setup terraform
35+
# uses: hashicorp/setup-terraform@v1
36+
# - name: Authenticate with the TF modules repository
37+
# uses: webfactory/[email protected]
38+
# with:
39+
# ssh-private-key: ${{ secrets.INFRA_TERRAFORM_MODULES_SSH_PRIV_KEY }}
40+
# - name: Terraform Init
41+
# working-directory: ${{ env.WORKING_DIR }}
42+
# run: terraform init
43+
# - name: Terraform Apply
44+
# working-directory: ${{ env.WORKING_DIR }}
45+
# run: terraform apply -lock=false -var-file="${{ env.TF_WORKSPACE }}.tfvars" -var "image_tag=$RELEASE_VERSION" -auto-approve

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ testdev: ## Run all tests on docker container timetracker_ui at the Dev
5050

5151
.PHONY: publish
5252
publish: ## Publish the container image timetracker_ui.
53-
docker tag timetracker_ui:latest $(registry_url)/timetracker_ui:latest
54-
docker push $(registry_url)/timetracker_ui:latest
53+
docker tag timetracker_ui:latest $(acr).azurecr.io/timetracker_ui:latest
54+
docker push $(acr)/timetracker_ui:latest
5555

5656
.PHONY: build_prod
5757
build_prod: ## Create docker image with dependencies needed for production.
@@ -68,9 +68,9 @@ remove_prod: ## Delete container timetracker_ui_pro.
6868

6969
.PHONY: publish_prod
7070
publish_prod: ## Publish the container image timetracker_ui_prod.
71-
docker tag timetracker_ui_prod:latest $(registry_url)/timetracker_ui_prod:latest
72-
docker push $(registry_url)/timetracker_ui_prod:latest
71+
docker tag timetracker_ui_prod:$(image_tag) $(registry_url)/timetracker_ui_prod:$(image_tag)
72+
docker push $(registry_url)/timetracker_ui_prod:$(image_tag)
7373

7474
.PHONY: login
7575
login: ## Login in respository of docker images.
76-
az acr login --name $(container_registry)
76+
az acr login --name $(acr)

0 commit comments

Comments
 (0)