A
A
Anton2019-05-16 08:50:14
Continuous Delivery
Anton, 2019-05-16 08:50:14

How to run a build from a specific old tag in gitlab ci?

I can build an artifact from a specific old tag in teamcity.
Screenshot:
5cdcf99630cbc418761023.png
How to run a build from a specific old tag in gitlab ci?
I try this gitlab-ci.yaml

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: manual

I don't see the build-tag in the pipeline
5cdcf9ebad203692671243.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton, 2019-05-25
Patsev @chemtech

  • 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

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question