.gitlab-ci.yml 481 Bytes
Newer Older
expectocode's avatar
expectocode committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
image: maven:latest

variables:
  PORT: "5000"

build:
  stage: build
  script:
    - mvn compile

test:
  stage: test
  script:
    - mvn test

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

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