Skip to content

Commit

Permalink
[#849] Add a target to build a docker image for analytics-dashboard
Browse files Browse the repository at this point in the history
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
placek committed Apr 24, 2024
1 parent 6a70dec commit 5be4280
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/govtool/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ include backend.mk
include frontend.mk
include status-service.mk
include metadata-validation.mk
include analytics-dashboard.mk
include utils.mk
include info.mk
include config.mk
Expand All @@ -16,7 +17,7 @@ cardano_db_sync_image_tag := sancho-4-2-1
all: deploy-stack notify

.PHONY: deploy-stack
deploy-stack: upload-config push-backend push-frontend push-status-service push-metadata-validation
deploy-stack: upload-config push-backend push-frontend push-status-service push-metadata-validation push-analytics-dashboard
@:$(call check_defined, cardano_network)
@:$(call check_defined, env)
export CARDANO_NETWORK=$(cardano_network); \
Expand Down
20 changes: 20 additions & 0 deletions scripts/govtool/analytics-dashboard.mk
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)

0 comments on commit 5be4280

Please sign in to comment.