From 8c5183ddbc9ed76dd778b389f69f8d4caeb72d4c Mon Sep 17 00:00:00 2001 From: Jacob See Date: Thu, 31 Oct 2019 18:23:46 -0700 Subject: [PATCH] Add initial TravisCI Config (#11) * 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 --- .travis.yml | 32 ++++++++++++++++++++++++++++++++ README.md | 2 ++ pom.xml | 1 + 3 files changed, 35 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..3d4cb91 --- /dev/null +++ b/.travis.yml @@ -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 \ No newline at end of file diff --git a/README.md b/README.md index 2658f6f..8ff9d16 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/pom.xml b/pom.xml index 4f4abd1..eb8b9ee 100644 --- a/pom.xml +++ b/pom.xml @@ -129,6 +129,7 @@ + ${project.artifactId} org.sonarsource.sonar-packaging-maven-plugin