forked from ITISFoundation/osparc-ops-environments
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into remove/cephScrapePublicDeployment
- Loading branch information
Showing
55 changed files
with
1,474 additions
and
1,373 deletions.
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
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
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 |
---|---|---|
@@ -1,42 +1,47 @@ | ||
.DEFAULT_GOAL := help | ||
# Makefile including function used by every services | ||
include ../../scripts/common.Makefile | ||
include .env | ||
## DOCKER TAGS ------------------------------- | ||
|
||
.PHONY: tag-local tag-version tag-latest build-container | ||
|
||
tag-version: .env ## Tags 'local/${DOCKER_IMAGE_NAME}):dev' images as versioned '${DOCKER_REGISTRY}/${DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_TAG}' | ||
docker tag local/${DOCKER_IMAGE_NAME}:dev ${DOCKER_REGISTRY}/${DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_TAG}; | ||
@set -o allexport; \ | ||
source $(realpath $(CURDIR)/.env); \ | ||
set +o allexport; \ | ||
docker tag local/$$DOCKER_IMAGE_NAME:dev $$DOCKER_REGISTRY/$$DOCKER_IMAGE_NAME:$$DOCKER_IMAGE_TAG; | ||
|
||
tag-latest: .env ## Tags last locally built production images as '${DOCKER_REGISTRY}/{service}:latest' | ||
docker tag local/${DOCKER_IMAGE_NAME}:dev ${DOCKER_REGISTRY}/${DOCKER_IMAGE_NAME}:latest; | ||
@set -o allexport; \ | ||
source $(realpath $(CURDIR)/.env); \ | ||
set +o allexport; \ | ||
docker tag local/$$DOCKER_IMAGE_NAME:dev $$DOCKER_REGISTRY/$$DOCKER_IMAGE_NAME:latest; | ||
|
||
build-container: .env ## Build the common docker container that runs the CI runs | ||
docker build --no-cache -t local/${DOCKER_IMAGE_NAME}:dev .; | ||
|
||
@set -o allexport; \ | ||
source $(realpath $(CURDIR)/.env); \ | ||
set +o allexport; \ | ||
docker build --no-cache -t local/$$DOCKER_IMAGE_NAME:dev .; | ||
|
||
.PHONY: build | ||
build: build-container ## Build the docker container that runs the CI runs | ||
## DOCKER PULL/PUSH ------------------------------- | ||
# | ||
# TODO: do not allow pushing modified/untracked | ||
# TODO: do not allow pushing disceted | ||
|
||
# | ||
|
||
.PHONY: push-version push-latest | ||
|
||
push-latest: tag-latest | ||
push-latest: tag-latest ## Pushes '${DOCKER_REGISTRY}/${DOCKER_IMAGE_NAME}:latest' images to the registry | ||
@set -o allexport; \ | ||
source $(realpath $(CURDIR)/.env); \ | ||
set +o allexport; \ | ||
export DOCKER_IMAGE_TAG=latest; \ | ||
$(MAKE) push-version | ||
./dockerhub_login.bash && \ | ||
docker compose --file docker-compose-deploy.yml push | ||
|
||
# below BUILD_TARGET gets overwritten but is required when merging yaml files | ||
push-version: tag-version | ||
# pushing '${DOCKER_REGISTRY}/${DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_TAG}' | ||
push-version: tag-version ## Pushes '${DOCKER_REGISTRY}/${DOCKER_IMAGE_NAME}:{DOCKER_IMAGE_TAG}' images to the registry | ||
@set -o allexport; \ | ||
source $(realpath $(CURDIR)/.env); \ | ||
set +o allexport; \ | ||
export DOCKER_IMAGE_TAG=latest; \ | ||
echo "Pushing $$DOCKER_REGISTRY/$$DOCKER_IMAGE_NAME:$$DOCKER_IMAGE_TAG"; \ | ||
./dockerhub_login.bash && \ | ||
docker compose --file docker-compose-deploy.yml push |
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
Oops, something went wrong.