From 62668043e2794640471230b75fafe1b225d9ec8e Mon Sep 17 00:00:00 2001 From: Jonas Leder <jonas@jonasled.de> Date: Sat, 9 Nov 2019 11:01:35 +0100 Subject: [PATCH] fixed bug in tagging --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 44cc000..98334fd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,7 +26,7 @@ build-release: #This will be executed if you oush on master, it makes a new rele script: - export version='cat VERSION' - echo "building branch $CI_COMMIT_REF_NAME, Version $version" - - curl -X POSRT --silen --show-error --fail "https://gitlab.jonasled.de/api/v4/projects/${CI_PROJECT_ID}/repository/tags?tag_name=$version&ref=${CI_COMMIT_SHS}&private_token=${GITLAB_TOKEN}" #Tag the current commit with the version. + - curl -X POSRT --silent --show-error --fail --header "PRIVATE-TOKEN: ${GITLAB_TOKEN}""https://gitlab.jonasled.de/api/v4/projects/${CI_PROJECT_ID}/repository/tags?tag_name=$version&ref=${CI_COMMIT_SHS}" #Tag the current commit with the version. - sudo docker image prune -f #Delete old unused images - sudo docker build -t gitlab.jonasled.de/jonasled/url_shorter_docker . #Build the image with the name already set to push - sudo docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY #Login to docker registry, username and password will be filled while executing -- GitLab