.gitlab-ci.yml 569 Bytes
Newer Older
 Viraj  Shah's avatar
Viraj Shah committed
1
image: maven:latest
expectocode's avatar
expectocode committed
2 3 4 5

variables:
  PORT: "5000"

Tanuj Dhir's avatar
Tanuj Dhir committed
6
style:
Tanuj Dhir's avatar
Tanuj Dhir committed
7
  stage: .pre
Tanuj Dhir's avatar
Tanuj Dhir committed
8 9 10
  script:
    - mvn checkstyle:checkstyle

expectocode's avatar
expectocode committed
11 12
build:
  stage: build
13
  script:
expectocode's avatar
expectocode committed
14 15 16 17
    - mvn compile

test:
  stage: test
18
  script:
expectocode's avatar
expectocode committed
19 20
    - mvn test

Viraj Shah's avatar
Viraj Shah committed
21 22 23 24
gitlab-deploy:
  stage: deploy
  script:
    - mvn package
 Viraj  Shah's avatar
Viraj Shah committed
25
    - systemctl --user stop simple-webapp.service
expectocode's avatar
expectocode committed
26
    - cp -r target/ /home/gitlab-runner/simple-webapp-deploy/
 Viraj  Shah's avatar
Viraj Shah committed
27
    - systemctl --user start simple-webapp.service
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
  only:
expectocode's avatar
expectocode committed
34
    - master