Advertisement
Guest User

Untitled

a guest
Oct 12th, 2017
398
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.47 KB | None | 0 0
  1. variables:
  2.   RELEASE_BRANCH: master
  3.   RELEASE_VERSION_UI: "1.0.1" # the version that will be released
  4.   NEXT_DEV_VERSION_UI: "1.0.2-SNAPSHOT" # the next dev iteration version
  5.  
  6. stages:
  7.  - build
  8.   - test
  9.   - deploy
  10.  
  11. # The compile job might be executed anywhere but master/develop
  12. job_compiling_ui:
  13.   stage: build
  14.   only:
  15.    - branches
  16.   except:
  17.    - master
  18.   script:
  19.     - mvn compile
  20.  
  21. # The test job might be executed anywhere but master/develop
  22. job_testing_ui:
  23.   stage: test
  24.   only:
  25.    - branches
  26.   except:
  27.    - master
  28.   script:
  29.    - mvn test sonar:sonar
  30.  
  31. # Only on develop
  32. job_snapshot_ui:
  33.   stage: deploy
  34.   only:
  35.    - develop
  36.   script:
  37.    - mvn deploy -P uat -DskipTests
  38.  
  39. # This job will be executed when triggered
  40. job_release_ui:
  41.   stage: deploy
  42.   only:
  43.    - /^trigger-release.*$/
  44.   script:
  45.    - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
  46.     - eval $(ssh-agent -s)
  47.     - ssh-add ~/.ssh/id_rsa
  48.     - mkdir -p ~/.ssh
  49.     - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
  50.     - git config --global user.email "gitlab@pegase.ovh"
  51.     - git config --global user.name "GitLab-CI"
  52.     - git remote set-url origin git@gitlab.pegase.ovh:NoOsea/Pegase-UI.git
  53.     - git checkout -B $RELEASE_BRANCH --track origin/$RELEASE_BRANCH
  54.     - 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