You want to add a tag to an older commit in the GitLab repo. This needs to be done using the Gitlab pipeline.
–> should know the tag to be added
–> should know the commit_sha hash of the commit
–> should know the access token name for the repo
You can create a GitLab pipeline job as shown below to add a tag to an older commit.
You should replace a value for “access-token-name”, the CICD variable name GIT_TOKEN, and the CI_COMMIT_SHA value.
– Create the access token for the repo as shown in the screenshot and get the token name-
– Create variable in CICD- GIT_TOKEN, and assign the value to it.