-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#849] Add a target to build a docker image for analytics-dashboard
Included a target in the Makefile to facilitate the creation of a Docker image for the analytics-dashboard component. This addition enables the generation and pushing of the analytics-dashboard Docker image as part of the deployment process. By introducing this functionality, the build process now encompasses the analytics-dashboard, supporting the user story's aim of configuring the sanchogov.tools sub-domain for the analytics service.
- Loading branch information
Showing
2 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
common_mk := common.mk | ||
ifeq ($(origin $(common_mk)), undefined) | ||
$(eval $(common_mk) := included) | ||
include $(common_mk) | ||
endif | ||
|
||
.DEFAULT_GOAL := push-analytics-dashboard | ||
|
||
# image tags | ||
analytics-dashboard_image_tag := $(shell git log -n 1 --format="%H" -- $(root_dir)/govtool/analytics-dashboard) | ||
|
||
.PHONY: build-analytics-dashboard | ||
build-analytics-dashboard: | ||
$(call check_image_on_ecr,analytics-dashboard,$(analytics-dashboard_image_tag)) || \ | ||
$(docker) build --build-arg BASE_IMAGE_TAG=$(base_analytics-dashboard_image_tag) --tag "$(repo_url)/analytics-dashboard:$(analytics-dashboard_image_tag)" $(root_dir)/govtool/analytics-dashboard | ||
|
||
.PHONY: push-analytics-dashboard | ||
push-analytics-dashboard: build-analytics-dashboard | ||
$(call check_image_on_ecr,analytics-dashboard,$(analytics-dashboard_image_tag)) || \ | ||
$(docker) push $(repo_url)/analytics-dashboard:$(analytics-dashboard_image_tag) |