when I have a project with continuous integration gitlab at the time of making the push automatically tasks that are within the gitlab-ci.yml file are released , what I want is that only in time to make the push of a tag ( git push --follow -tags ) , the tasks of file gitlab-ci.yml - run , is this possible (only git push --follow -tags)?
I refer to this event , but with the build in gitlab ci.
Sharing tags is similar to pushing branches. By default, git push will not push tags. Tags have to be explicitly passed to git push . To push multiple tags simultaneously pass the --tags option to git push command.
gitlab-ci. yml , you can specify some jobs with the tag testing . If a runner with this tag associated is available, it will pickup the job. In Git, within your repository, tags are used to mark a specific commit.
Allowed to push means just that - the user is allowed to git push to the branch. Allowed to merge means that the user is allowed to accept merge requests into that branch.
Sharing Tags This process is just like sharing remote branches — you can run git push origin <tagname> . If you have a lot of tags that you want to push up at once, you can also use the --tags option to the git push command. This will transfer all of your tags to the remote server that are not already there.
Solved:
Add to .gitlab-ci.yml
tags:
myjob:
script: test
only:
- tags
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With