From 6b437ba728f50804a2888b850b7eca0aa91564e0 Mon Sep 17 00:00:00 2001 From: Ian Duffy Date: Sun, 5 May 2019 23:52:26 +0100 Subject: [PATCH] Add a TravisCi file to build on a push to master and release JARs To make these easier to play around with, it would be nice if the JARs were provided. This commit adds a `.travis.yml` file that will build the project and upload all JARs to the github releases page. You'll need to create a github personal access token with `public_repo` access and submit this as a secret environment variable on the travis job. **note:** I commented out anything relating to keycloak-testsuite as I was unable to find a maven repository serving those dependencies --- .travis.yml | 33 ++++++++++++++++++++++++++++++ keycloak-playground-server/pom.xml | 12 +++++++++++ 2 files changed, 45 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..bf2867b --- /dev/null +++ b/.travis.yml @@ -0,0 +1,33 @@ +language: java +jdk: +- openjdk11 +branches: + only: + - master +cache: + directories: + - "$HOME/.m2" +before_install: +# - export APP_VERSION="`mvn org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -Dexpression=project.version | grep -Ev '(^\[|Download\w+:)'`-$TRAVIS_BUILD_NUMBER" +# - echo $APP_VERSION +script: +# - mvn versions:set -DnewVersion=$APP_VERSION +- git clone git@github.com:keycloak/keycloak.git ../ +- pushd ../keycloak; mvn clean install; pushd +- mvn clean package +before_deploy: +# - git config --global user.email "builds@travis-ci.com" +# - git config --global user.name "Travis CI" +# - git commit -a -m "Set version to $APP_VERSION" +# - git tag $APP_VERSION -a -m "Generated tag from TravisCI for $APP_VERSION" +# - git push -q -f https://$GITHUB_API_KEY@github.com/imduffy15/keycloak-extension-playground --tags +deploy: + skip_cleanup: true + provider: releases + api_key: $GITHUB_API_KEY + file_glob: true + file: "**/target/*.jar" + on: + repo: imduffy15/keycloak-extension-playground + tags: false + branch: master diff --git a/keycloak-playground-server/pom.xml b/keycloak-playground-server/pom.xml index a9be932..36b065e 100644 --- a/keycloak-playground-server/pom.xml +++ b/keycloak-playground-server/pom.xml @@ -187,5 +187,17 @@ ${jackson.version} jar + + + javax.servlet + javax.servlet-api + 4.0.1 + + + + io.undertow + undertow-servlet + 2.1.1.Final + \ No newline at end of file