.gitlab-ci.yml 637 Bytes
Newer Older
expectocode's avatar
expectocode committed
1 2 3 4 5 6 7 8
image: maven:latest

variables:
  PORT: "5000"

build:
  stage: build
  script:
 Viraj  Shah's avatar
Viraj Shah committed
9
    - apt-get install -qq -y pandoc texlive
expectocode's avatar
expectocode committed
10 11 12 13 14
    - mvn compile

test:
  stage: test
  script:
 Viraj  Shah's avatar
Viraj Shah committed
15
    - apt-get install -qq -y pandoc texlive
expectocode's avatar
expectocode committed
16 17
    - mvn test

Viraj Shah's avatar
Viraj Shah committed
18 19 20 21
gitlab-deploy:
  stage: deploy
  script:
    - mvn package
expectocode's avatar
expectocode committed
22
    - systemctl --user stop simple-webapp.service
23
    - cp -r target/ /home/gitlab-runner/simple-webapp-deploy/target
Viraj Shah's avatar
Viraj Shah committed
24
    - systemctl --user start simple-webapp.service
expectocode's avatar
expectocode committed
25 26 27
  artifacts:
    paths:
    - target/
Viraj Shah's avatar
Viraj Shah committed
28 29

heroku-deploy:
expectocode's avatar
expectocode committed
30 31
  stage: deploy
  script:
 Viraj  Shah's avatar
Viraj Shah committed
32
    - dpl --provider=heroku --app=vs3318-simplewebapp --api-key=$API_TOKEN
expectocode's avatar
expectocode committed
33 34
  only:
    - master