mirror of
https://github.com/gsi-upm/senpy
synced 2024-12-22 04:58:12 +00:00
Updated makefiles from gsictl
This commit is contained in:
parent
963211caf2
commit
53db670715
1
base.mk
1
base.mk
@ -24,5 +24,6 @@ ci: ## Run a task using gitlab-runner. Only use to debug problems in the CI pip
|
||||
gitlab-runner exec shell --builds-dir '.builds' --env CI_PROJECT_NAME=$(NAME) ${action}
|
||||
|
||||
include $(MK_DIR)/makefiles.mk
|
||||
include $(MK_DIR)/docker.mk
|
||||
|
||||
.PHONY:: config help ci version .FORCE
|
||||
|
10
docker.mk
10
docker.mk
@ -1,6 +1,6 @@
|
||||
IMAGEWTAG ?= $(IMAGENAME):$(VERSION)
|
||||
|
||||
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).
|
||||
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
|
||||
@ -12,10 +12,14 @@ else
|
||||
@docker login -u $(HUB_USER) -p $(HUB_PASSWORD)
|
||||
endif
|
||||
|
||||
clean:: ## Remove docker credentials
|
||||
login:: docker-login
|
||||
|
||||
clean:: docker-clean ## Remove docker credentials
|
||||
|
||||
docker-clean:
|
||||
ifeq ($(HUB_USER),)
|
||||
else
|
||||
@docker logout
|
||||
endif
|
||||
|
||||
.PHONY:: login clean
|
||||
.PHONY:: docker-login docker-clean login clean
|
||||
|
11
git.mk
11
git.mk
@ -1,12 +1,15 @@
|
||||
git_commit:
|
||||
commit:
|
||||
git commit -a
|
||||
|
||||
git_tag:
|
||||
tag:
|
||||
git tag ${VERSION}
|
||||
|
||||
git_push:
|
||||
push::
|
||||
git push --tags origin master
|
||||
|
||||
pull::
|
||||
git pull --all
|
||||
|
||||
push-github: ## Push the code to github. You need to set up HUB_USER and HUB_PASSWORD
|
||||
$(eval KEY_FILE := $(shell mktemp))
|
||||
@echo "$$GITHUB_DEPLOY_KEY" > $(KEY_FILE)
|
||||
@ -16,4 +19,4 @@ push-github: ## Push the code to github. You need to set up HUB_USER and HUB_PAS
|
||||
@GIT_SSH_COMMAND="ssh -i $(KEY_FILE)" git push github-deploy $(CI_COMMIT_REF_NAME)
|
||||
rm $(KEY_FILE)
|
||||
|
||||
.PHONY:: git_commit git_tag git_push push-github
|
||||
.PHONY:: commit tag push push-github
|
||||
|
@ -1,5 +1,5 @@
|
||||
makefiles-remote:
|
||||
git remote add makefiles ssh://git@lab.cluster.gsi.dit.upm.es:2200/docs/templates/makefiles.git || true
|
||||
@git remote add makefiles ssh://git@lab.cluster.gsi.dit.upm.es:2200/docs/templates/makefiles.git 2>/dev/null || true
|
||||
|
||||
makefiles-commit: makefiles-remote
|
||||
git add -f .makefiles
|
||||
@ -11,4 +11,6 @@ makefiles-push:
|
||||
makefiles-pull: makefiles-remote
|
||||
git subtree pull --prefix=.makefiles/ makefiles master --squash
|
||||
|
||||
update:: makefiles-pull
|
||||
|
||||
.PHONY:: makefiles-remote makefiles-commit makefiles-push makefiles-pull
|
||||
|
Loading…
Reference in New Issue
Block a user