Skip to content

Commit

Permalink
Add initial TravisCI Config (#11)
Browse files Browse the repository at this point in the history
* Added configuration for TravisCI

* Removed some extraneous configurations

* Simplify Travis a bit, add finalName to POM.

* Make maven not run as quiet.

* Add Travis badge to README.

* Break Maven steps out into more commands
  • Loading branch information
jacobsee authored and mcanoy committed Nov 1, 2019
1 parent e3d04ff commit 8c5183d
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
language: java
if: tag IS present OR NOT (branch == master)
jdk:
- openjdk8
cache:
directories:
- "$HOME/.m2"
script:
- |
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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![Build Status](https://travis-ci.org/rht-labs/sonar-auth-openshift.svg?branch=master)](https://travis-ci.org/rht-labs/sonar-auth-openshift)

# Openshift Authentication Plugin for SonarQube

## Description
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
</dependencies>

<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
Expand Down

0 comments on commit 8c5183d

Please sign in to comment.