Last active
September 28, 2020 11:00
-
-
Save henkin/8a0401db36479ca1b2e7aff27bef8d6b to your computer and use it in GitHub Desktop.
Makefile GitlabCI target gitalb make
This file contains hidden or 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
CURRENT_DIR=$(shell pwd) | |
CI_COMMIT_SHORT_SHA=$(shell git rev-parse --short HEAD) | |
BRANCH='branch' | |
JOB='init-k8snet' | |
gci: | |
# 1) local gitlab-runner only pulls things that have been committed - temporarily commit | |
(git add . && git commit -am "gitlab CI testing - temp commit") || true | |
gitlab-runner exec docker ${JOB} \ | |
# --env PRV_GKE_SA_KEY='/secrets/gcloud-key.json' \ | |
--env CI_COMMIT_SHORT_SHA=${CI_COMMIT_SHORT_SHA} \ | |
--env CI_COMMIT_REF_SLUG=${BRANCH} \ | |
# --env CI_SERVER_HOST=gitlab.humanaedge.com \ | |
# --env CI_PROJECT_NAMESPACE=caps \ | |
# -env DOCKER_IMAGE_TAG="gcr.io/asdf@latest" \ | |
# --env CI_PROJECT_NAME=${CI_PROJECT_NAME} \ | |
# --env SECRETS_feature="sec/_secrets.json" \ | |
--docker-volumes /var/run/docker.sock:/var/run/docker.sock \ | |
--docker-volumes /Users/paulhenkin/src/humana/edge-api-template:/edge-api-template \ | |
# # --docker-volumes ${CURRENT_DIR}/sec:/sec \ | |
|| true # want to still run git reset after. | |
# 2) then reset the changes | |
git reset --soft HEAD~1 # pop last commit (don't nuke changes) | |
default: gci | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment