Answer the question
In order to leave comments, you need to log in
How to make gitlab ci build 1 release build and 1 snapshot build after maven release?
There is gitlab-ci which has a maven release.
How to make gitlab ci build 1 release build after maven release?
Here is the code:
variables:
MAVEN_OPTS: "-Djava.awt.headless=true -Dmaven.repo.local=.m2/repository"
MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version"
stages:
- build
- release
build:
stage: build
script:
- ln -s /var/cache/maven .m2
- envsubst < maven_settings.xml.tmpl > maven_settings.xml
- 'mvn -s maven_settings.xml $MAVEN_CLI_OPTS -Dmaven.test.skip=true clean install -PRPM -U'
release:
stage: release
script:
- ln -s /var/cache/maven .m2
- eval $(ssh-agent)
- ssh-add <(echo "$SSH_PRIVATE_KEY")
- git config user.name $PUSH_USER_NAME
- git config user.email $PUSH_USER_EMAIL
- envsubst < maven_settings.xml.tmpl > maven_settings.xml
- git checkout int
- git reset --hard origin/int
- mvn -s maven_settings.xml $MAVEN_CLI_OPTS clean release:prepare -Dresume=false -DautoVersionSubmodules=true -DdryRun=false -Dmaven.test.skip=true
when: manual
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question