-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.travis.yml
37 lines (28 loc) · 1.34 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
language: java
os: linux
dist: xenial
jdk: openjdk12
services:
- xvfb
sudo: false
install: true
addons:
sonarcloud:
organization: "document-archiver"
before_script:
- echo $HOME
- pwd
- ls -la
- cp src/daResources/maven/settings.xml $HOME/.m2/settings.xml
script:
- mvn clean jacoco:prepare-agent test jacoco:report sonar:sonar
after_success:
- mvn package -P linux-environment -DskipTests
- mvn package -P mac-environment -DskipTests
- mvn package -P win-environment -DskipTests
- DA_ARTIFACT_ID=$(mvn help:evaluate -Dexpression=project.artifactId -q -DforceStdout)
- DA_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
- DA_ARTIFACT_BASENAME="${DA_ARTIFACT_ID}-${DA_VERSION}"
- DA_DEPLOYMENT_TARGET=$(if [[ $DA_VERSION =~ ^.*SNAPSHOT$ ]]; then echo "snapshots"; else echo "releases"; fi)
- echo "${DA_ARTIFACT_ID}|${DA_VERSION}|${DA_ARTIFACT_BASENAME}|${DA_DEPLOYMENT_TARGET}"
- mvn org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy-file -Durl=https://repository.sophisticatedapps.com/${DA_DEPLOYMENT_TARGET} -DrepositoryId=repository-sophisticatedapps -Dfile=target/${DA_ARTIFACT_BASENAME}.jar -DpomFile=pom.xml -Dfiles=target/${DA_ARTIFACT_BASENAME}-linux.zip,target/${DA_ARTIFACT_BASENAME}-mac.zip,target/${DA_ARTIFACT_BASENAME}-win.zip -Dclassifiers=linux,mac,win -Dtypes=zip,zip,zip