Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- variables:
- RELEASE_BRANCH: master
- RELEASE_VERSION_UI: "1.0.1" # the version that will be released
- NEXT_DEV_VERSION_UI: "1.0.2-SNAPSHOT" # the next dev iteration version
- stages:
- - build
- - test
- - deploy
- # The compile job might be executed anywhere but master/develop
- job_compiling_ui:
- stage: build
- only:
- - branches
- except:
- - master
- script:
- - mvn compile
- # The test job might be executed anywhere but master/develop
- job_testing_ui:
- stage: test
- only:
- - branches
- except:
- - master
- script:
- - mvn test sonar:sonar
- # Only on develop
- job_snapshot_ui:
- stage: deploy
- only:
- - develop
- script:
- - mvn deploy -P uat -DskipTests
- # This job will be executed when triggered
- job_release_ui:
- stage: deploy
- only:
- - /^trigger-release.*$/
- script:
- - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- - eval $(ssh-agent -s)
- - ssh-add ~/.ssh/id_rsa
- - mkdir -p ~/.ssh
- - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- - git config --global user.email "gitlab@pegase.ovh"
- - git config --global user.name "GitLab-CI"
- - git remote set-url origin git@gitlab.pegase.ovh:NoOsea/Pegase-UI.git
- - git checkout -B $RELEASE_BRANCH --track origin/$RELEASE_BRANCH
- - mvn -P prod -DskipTests release:prepare release:perform -DreleaseVersion=$RELEASE_VERSION_UI -DdevelopmentVersion=$NEXT_DEV_VERSION_UI
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement