-
Notifications
You must be signed in to change notification settings - Fork 8
/
.travis.yml
41 lines (41 loc) · 1.21 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
language: java
if: tag IS present OR (branch == master)
jdk:
- openjdk8
cache:
directories:
- "$HOME/.m2"
script:
- |
export ARTIFACT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
if [ "${TRAVIS_TAG}X" != "X" ] && [ "$ARTIFACT_VERSION" != "$TRAVIS_TAG" ]; then
echo "Version mismatch: Tag $TRAVIS_TAG does not match $ARTIFACT_VERSION project.version in pom.xml"
exit 1
fi
mvn clean compile -B -q
mvn test -B
mvn package -B -q
# if [ "$TRAVIS_BRANCH" = "master" ] || [ "${TRAVIS_TAG}X" != "X" ]; then
## Only run these commands when building a release
# mvn sonar:sonar -Dsonar.login=${SONAR_PROJECT_TOKEN} -B
# mvn -q dependency-check:check -B
# fi
before_deploy:
- export PLUGIN_JAR=$(ls target/sonar-auth-openshift-plugin*jar)
- echo "deploying $PLUGIN_JAR to GitHub releases"
deploy:
- provider: releases
api_key: "${GITHUB_OAUTH_TOKEN}"
file_glob: true
file:
- "${PLUGIN_JAR}"
# - "target/site/jacoco/*"
# - "target/dependency-check-report.html"
skip_cleanup: true
on:
tags: true
- provider: script
skip_cleanup: true
script: bash quay_io
on:
tags: true