forked from HLTech/judge-d
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
40 lines (38 loc) · 1.61 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
language: java
sudo: true
jdk:
- openjdk11
cache:
directories:
- $HOME/.m2
jobs:
include:
- stage: build with maven & generate reports
script:
- mvn clean verify jacoco:report coveralls:report
- stage: build docker images for server and agent
if: NOT branch = master OR type IN (pull_request)
script:
- mvn validate docker:build@build-docker -P docker-app -f ./judge-d-server/pom.xml
- mvn validate docker:build@build-docker -P docker-app -f ./judge-d-agent/pom.xml
- stage: build & publish docker image for server
if: branch = master AND NOT type IN (pull_request)
script:
- mvn validate docker:build@build-docker -P docker-app -f ./judge-d-server/pom.xml
- echo "Pushing to docker registry"
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker push hltech/judge-d
- echo "Pushing to heroku registry"
- docker login -u _ -p "$HEROKU_API_KEY" registry.heroku.com
- docker tag hltech/judge-d registry.heroku.com/judge-d/web
- docker push registry.heroku.com/judge-d/web
- stage: release app in heroku
if: branch = master AND NOT type IN (pull_request)
script:
- heroku container:release web -a judge-d
- stage: build & publish docker image for agent
if: branch = master AND NOT type IN (pull_request)
script:
- mvn validate docker:build@build-docker -P docker-app -f ./judge-d-agent/pom.xml
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker push hltech/judge-d-agent