snippetMinor
How to run a build from a specific old tag in gitlab ci?
Viewed 0 times
howtaggitlabspecificfromoldbuildrun
Problem
I can build from a specific old tag in teamity.
Screenshot:
How to run a build from a specific old tag in gitlab ci?
build-tag i dont see in pipeline
How to run a build from a specific old tag in gitlab ci?
Screenshot:
How to run a build from a specific old tag in gitlab ci?
variables:
MAVEN_OPTS: "-Djava.awt.headless=true -Dmaven.repo.local=.m2/repository"
MAVEN_CLI_OPTS: "-s maven_settings.xml --batch-mode --errors --fail-at-end --show-version"
stages:
- build
- release
- build-tag
build:
stage: build
script:
- mvn $MAVEN_CLI_OPTS -Dmaven.test.skip=true clean install -PRPM -U
release:
stage: release
script:
- eval $(ssh-agent)
- ssh-add <(echo "$SSH_PRIVATE_KEY")
- git config user.name "$PUSH_USER_NAME"
- git config user.email "$PUSH_USER_EMAIL"
- git checkout master
- git reset --hard origin/master
- mvn $MAVEN_CLI_OPTS clean release:prepare -Dresume=false -DautoVersionSubmodules=true -DdryRun=false -Dmaven.test.skip=true
when: manual
build-tag:
stage: build-tag
script:
- git checkout master
- git pull
- git reset --hard $(git describe --abbrev=0 --tags)
- mvn $MAVEN_CLI_OPTS -Dmaven.test.skip=true clean install -PRPM -U
when: manualbuild-tag i dont see in pipeline
How to run a build from a specific old tag in gitlab ci?
Solution
Within the project
Now to trigger a manual Job you can use the jobs of the recently created pipeline.
- go to CI / CD -> Pipelines
- press Run Pipeline
- under Create for choose the branch or tag you want to run the pipeline for
- press Create Pipeline
Now to trigger a manual Job you can use the jobs of the recently created pipeline.
Context
StackExchange DevOps Q#8146, answer score: 1
Revisions (0)
No revisions yet.