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

variables:
  PORT: "5000"

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

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

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

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