How do you click the git tag in Jenkins promotion?

I have a build promotion process modeled after this discussion (using the advanced builds plugin.) In general, it works great. However, for a few "tastes" of the promotion process (not for everyone), I would like to click the git tag. I implemented this using the “execute shell” step as one of the advertising actions. This works well, and then today failed with the error below. I suspect that I landed on a workstation where the workspace has not yet been initialized for git - and that I was lucky in the past (using Cloudbees - where slaves are built dynamically).

I tried the "git publisher", but it looks like you are expecting to be in the setup where the git plugin has already done its job. Has anyone been able to reliably click a tag from the build promotion phase?

+ git checkout develop
fatal: Not a git repository (or any of the parent directories): .git
+4
source share
2 answers

Disclaimer: I don't know anything about Git.

${WORKSPACE}. , , , ( , ). , . , , , .

SCM , :

  • ( Jenkins)
  • SCM ( Jenkins).

, SCM ( ). "/" SVN, , Git. , "", Git . " ", Git . EnvInject, , Git .

- "/ " , , , , Git.

0

:

git tag MYTAG ${PROMOTED_GIT_COMMIT}
git push --tags

, , , , , .

+1

Source: https://habr.com/ru/post/1535424/


All Articles