Skip to content

Commit

Permalink
Add a TravisCi file to build on a push to master and release JARs
Browse files Browse the repository at this point in the history
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
  • Loading branch information
imduffy15 authored and Ian committed May 22, 2020
1 parent c2ba939 commit 6b437ba
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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 [email protected]:keycloak/keycloak.git ../
- pushd ../keycloak; mvn clean install; pushd
- mvn clean package
before_deploy:
# - git config --global user.email "[email protected]"
# - 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://[email protected]/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
12 changes: 12 additions & 0 deletions keycloak-playground-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -187,5 +187,17 @@
<version>${jackson.version}</version>
<type>jar</type>
</dependency>

<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.1</version>
</dependency>

<dependency>
<groupId>io.undertow</groupId>
<artifactId>undertow-servlet</artifactId>
<version>2.1.1.Final</version>
</dependency>
</dependencies>
</project>

0 comments on commit 6b437ba

Please sign in to comment.