Skip to content

Commit

Permalink
Regenerate static files
Browse files Browse the repository at this point in the history
  • Loading branch information
GitHub Actions committed Feb 26, 2025
1 parent 3f03f88 commit 51fe3b6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
4 changes: 4 additions & 0 deletions static-commontooling/make/docker.mk
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@
# MS_DOCKER_PUSH_LATEST?=FALSE
# Set to TRUE to automatically run ms_docker-push-latest when make push is run, i.e. push with the "latest" tag
#
# MS_DOCKER_ALLOW_PUSH?=TRUE
# Set to a value not equal to TRUE to prevent pushing Docker images. This value is output in the error message and may be used to provide the reason for the failure.
#
# CLOUDFIT_BASE_NAME?=python
#
# CLOUDFIT_BASE_LABEL?=latest
Expand Down Expand Up @@ -127,6 +130,7 @@ BUILD_ARTEFACT?=$(topbuilddir)/requirements.txt $(topbuilddir)/constraints.txt
EXTRA_DOCKER_RUN_ARGS?=
BASE_MOD_DIR?=
ALLOW_LOCAL_WHEELS?=FALSE
MS_DOCKER_ALLOW_PUSH?=TRUE

ifndef DOCKER_TAGS
export DOCKER_TAGS := $(shell $(PBRVERSION) --docker-tag)
Expand Down
14 changes: 10 additions & 4 deletions static-commontooling/make/include/ms_docker.mk
Original file line number Diff line number Diff line change
Expand Up @@ -97,23 +97,29 @@ ms_docker-run-%: ms_docker-build-%

ms_docker-push: ms_docker-ver-push-$(DOCKERISED_VERSION)

ms_docker-ver-push-%: push-check-changes ms_docker-build
ms_docker-check-allow-push:
@if [ "$(MS_DOCKER_ALLOW_PUSH)" != "TRUE" ]; then \
echo ERROR: Docker image push has been disabled. $(MS_DOCKER_ALLOW_PUSH); \
exit 1; \
fi

ms_docker-ver-push-%: push-check-changes ms_docker-check-allow-push ms_docker-build
docker tag $(MODNAME):$(BUILD_TAG) $(DOCKER_REPO)/$(MODNAME):$*
ifeq (${IS_ECR_REGISTRY},true)
$(call ecr_docker_push,$(DOCKER_REPO)/$(MODNAME):$*)
else
docker push $(DOCKER_REPO)/$(MODNAME):$*
endif

ms_docker-push-%: push-check-changes ms_docker-build-%
ms_docker-push-%: push-check-changes ms_docker-check-allow-push ms_docker-build-%
docker tag $(MODNAME)_$*:$(BUILD_TAG) $(DOCKER_REPO)/$(MODNAME)_$*:$(DOCKERISED_VERSION)
ifeq (${IS_ECR_REGISTRY},true)
$(call ecr_docker_push,$(DOCKER_REPO)/$(MODNAME)_$*:$(DOCKERISED_VERSION))
else
docker push $(DOCKER_REPO)/$(MODNAME)_$*:$(DOCKERISED_VERSION)
endif

ms_docker-push-latest-%: push-check-changes ms_docker-build-%
ms_docker-push-latest-%: push-check-changes ms_docker-check-allow-push ms_docker-build-%
docker tag $(MODNAME)_$*:$(BUILD_TAG) $(DOCKER_REPO)/$(MODNAME)_$*:latest
ifeq (${IS_ECR_REGISTRY},true)
$(call ecr_docker_push,$(DOCKER_REPO)/$(MODNAME)_$*:latest)
Expand All @@ -138,4 +144,4 @@ $(topbuilddir)/externals.json:
${MS_DOCKERFILE}: $(MS_DOCKERFILE_TEMPLATE) $(commontooling_dir)/docker/Dockerfile_multi_macros.j2 $(topbuilddir)/externals.json
$(J2) $< externals.json > $@

.PHONY: check-allow-local-wheels ms_docker-build ms_docker-run ms_docker-clean ms_docker-push pull-cloudfit-base
.PHONY: check-allow-local-wheels ms_docker-build ms_docker-run ms_docker-clean ms_docker-push pull-cloudfit-base ms_docker-check-allow-push

0 comments on commit 51fe3b6

Please sign in to comment.