Skip to content

Commit

Permalink
Add ci
Browse files Browse the repository at this point in the history
  • Loading branch information
fpierleoni committed Sep 2, 2021
1 parent f0c3bac commit c049c9a
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
image: docker:stable

variables:
DOCKER_DRIVER: overlay2
MAVEN_OPTS: "-Dmaven.repo.local=.m2 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Djava.awt.headless=true"
MAVEN_CLI_OPTS: "--batch-mode --errors --show-version"
CNR_MAVEN_VERSION: 3.4.0

services:
- docker:dind

stages:
- deploy_snapshot
- release

deploy_nexus_snapshot:
stage: deploy_snapshot
image: docker.si.cnr.it/cnr-maven:$CNR_MAVEN_VERSION
only:
- dev
script:
- mvn deploy

release_artifact:
stage: release
image: docker.si.cnr.it/cnr-maven:$CNR_MAVEN_VERSION
only:
- master
script:
- git checkout -B "$CI_BUILD_REF_NAME"
# mi metto in condizione del push per l'utente con la deploy key
- git remote set-url --push origin [email protected]:$CI_PROJECT_PATH
- mvn $MAVEN_CLI_OPTS -Dresume=false release:prepare release:perform -Pprod -DpushChanges=false -DlocalCheckout=true
- git push --tags
- git commit --amend -m "[ci skip] prepare for next development iteration"
- git push --set-upstream origin master
when: manual
allow_failure: false

0 comments on commit c049c9a

Please sign in to comment.