forked from e-gov/DHX-adapter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
58 lines (57 loc) · 2.49 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
dist: xenial
language: java
addons:
apt:
packages:
- xmlstarlet
sonarcloud:
organization: e-gov
services:
- docker
matrix:
include:
# 8
- jdk: openjdk8
# 11
- jdk: openjdk11
script:
- mvn clean install -q -P jdk11,production
- docker-compose -f dhx-adapter-e2e-tests/docker-compose-test.yml down -v
- docker-compose -f dhx-adapter-e2e-tests/docker-compose-test.yml build
- docker-compose -f dhx-adapter-e2e-tests/docker-compose-test.yml up --exit-code-from setup-wiremock setup-wiremock
- TOMCAT_VERSION=8.5-jdk11-openjdk USER_ID=${UID} COMPOSE_HTTP_TIMEOUT=300 docker-compose -f dhx-adapter-e2e-tests/docker-compose-test.yml up --abort-on-container-exit --exit-code-from test test
branches:
only:
- master
before_install:
- export TZ=Europe/Helsinki
- xmlstarlet ed -N x="http://maven.apache.org/POM/4.0.0" -d "//x:dependency[x:groupId[contains(text(),'com.oracle')]]" dhx-adapter-server/pom.xml > dhx-adapter-server/pom_without_oracle.xml
- mv dhx-adapter-server/pom_without_oracle.xml dhx-adapter-server/pom.xml
install: true
script:
- mvn clean install -q sonar:sonar -Pproduction -Dsonar.projectKey=e-gov_DHX-adapter
- docker-compose -f dhx-adapter-e2e-tests/docker-compose-test.yml down -v
- docker-compose -f dhx-adapter-e2e-tests/docker-compose-test.yml build
- docker-compose -f dhx-adapter-e2e-tests/docker-compose-test.yml up --exit-code-from setup-wiremock setup-wiremock
- USER_ID=${UID} COMPOSE_HTTP_TIMEOUT=300 docker-compose -f dhx-adapter-e2e-tests/docker-compose-test.yml up --abort-on-container-exit --exit-code-from test test
after_script:
- USER_ID=${UID} docker-compose -f dhx-adapter-e2e-tests/docker-compose-test.yml up --abort-on-container-exit --exit-code-from report report
- docker-compose -f dhx-adapter-e2e-tests/docker-compose-test.yml down -v
- pip install --user --upgrade awscli && aws s3 cp dhx-adapter-e2e-tests/target/site/allure-maven-plugin/ s3://$AWS_REPORTS_BUCKET/$TRAVIS_BUILD_NUMBER/$TRAVIS_JOB_NUMBER --recursive --acl public-read
- echo "Report available at https://$AWS_REPORTS_BUCKET.s3.$AWS_DEFAULT_REGION.amazonaws.com/$TRAVIS_BUILD_NUMBER/$TRAVIS_JOB_NUMBER/index.html"
deploy:
provider: releases
api_key: "$GITHUB_OAUTH_TOKEN"
file_glob: true
file:
- "/home/travis/.m2/repository/ee/ria/dhx/dhx-adapter-server/*/dhx-adapter-server-*.war"
skip_cleanup: true
draft: true
on:
branch: master
notifications:
email:
recipients:
on_success: change
on_failure: always