1
0
mirror of https://github.com/gsi-upm/senpy synced 2024-09-20 22:01:41 +00:00
senpy/docker.mk
J. Fernando Sánchez 89f3a0eca9 Squashed '.makefiles/' changes from b20982c..a75ba69
a75ba69 Merge branch 'meaningcloud' into 'master'
919c4a0 Update base.mk
42224e3 Updated makefiles from meaningcloud
f0c211c PYVERSION changed
24d85b1 Merge branch 'meaningcloud' into 'master'
d150321 Updated makefiles from meaningcloud
4f88009 Merge branch 'senpy' into 'master'
1f0703d Fixed typo in .gitlab-ci
c23f798 Trying to fix push to github

git-subtree-dir: .makefiles
git-subtree-split: a75ba6994d
2017-12-13 15:24:28 +01:00

30 lines
726 B
Makefile

IMAGENAME?=$(NAME)
IMAGEWTAG?=$(IMAGENAME):$(VERSION)
docker-login: ## Log in to the registry. It will only be used in the server, or when running a CI task locally (if CI_BUILD_TOKEN is set).
ifeq ($(CI_BUILD_TOKEN),)
@echo "Not logging in to the docker registry" "$(CI_REGISTRY)"
else
@docker login -u gitlab-ci-token -p $(CI_BUILD_TOKEN) $(CI_REGISTRY)
endif
ifeq ($(HUB_USER),)
@echo "Not logging in to global the docker registry"
else
@docker login -u $(HUB_USER) -p $(HUB_PASSWORD)
endif
docker-clean: ## Remove docker credentials
ifeq ($(HUB_USER),)
else
@docker logout
endif
login:: docker-login
clean:: docker-clean
docker-info:
@echo IMAGEWTAG=${IMAGEWTAG}
.PHONY:: docker-login docker-clean login clean