Skip to content

Commit

Permalink
Add build and release instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
toddkazakov committed Nov 12, 2020
1 parent 6935c3c commit ffe8693
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 5 deletions.
36 changes: 34 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,34 @@
# keycloak-extensions
Extensions for Keycloak
# Extensions for Keycloak

This project contains multiple custom extensions that we use in our Keycloak deployment.

### Packaging artifacts

Artifacts are packaged using maven. If an extensions depends on a library that's not provided by keycloak it should be deployed as an ear.
To build all artifacts use the following command:
```
./mvnw clean compile package
```

### Releasing to github

Create a maven settings file in `~/.m2/settings.xml` with the following contents and fill in your username and api token:
```
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository>${user.home}/.m2/repository</localRepository>
<servers>
<server>
<id>github</id>
<username>GITHUB_USERNAME</username>
<privateKey>GITHUB_API_TOKEN</privateKey>
</server>
</servers>
</settings>
```

To create a github release and upload the generated artifacts on github use the following command:
```
./mvnw -pl . de.jutzig:github-release-plugin:1.1.1:release
```
1 change: 0 additions & 1 deletion admin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>admin</artifactId>
<version>${extensions-version}</version>
<packaging>jar</packaging>
<name>Keycloak Extensions - Admin API</name>
<description>Administrative endpoints</description>
Expand Down
1 change: 0 additions & 1 deletion jmx-metrics/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>jmx-metrics</artifactId>
<version>${extensions-version}</version>
<packaging>jar</packaging>
<name>Keycloak Extensions - Jmx Metrics (jar)</name>

Expand Down
35 changes: 34 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,52 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<scm>
<url>https://github.com/tidepool-org/keycloak-extensions</url>
<connection>scm:git:https://github.com/tidepool-org/keycloak-extensions.git</connection>
<developerConnection>scm:git:[email protected]:tidepool-org/keycloak-extensions.git</developerConnection>
</scm>

<groupId>org.tidepool.keycloak</groupId>
<artifactId>keycloak-extensions</artifactId>
<version>${extensions-version}</version>
<packaging>pom</packaging>
<name>Keycloak Extensions</name>

<properties>
<extensions-version>0.0.3-SNAPSHOT</extensions-version>
<extensions-version>0.0.5-SNAPHOT</extensions-version>
</properties>

<modules>
<module>admin</module>
<module>jmx-metrics</module>
<module>jmx-metrics-ear</module>
</modules>

<build>
<plugins>
<plugin>
<groupId>de.jutzig</groupId>
<artifactId>github-release-plugin</artifactId>
<version>1.1.1</version>
<inherited>false</inherited>

<configuration>
<repositoryId>tidepool-org/keycloak-extensions</repositoryId>
<releaseName>${project.version}</releaseName>
<tag>${project.version}</tag>

<fileSets>
<fileSet>
<directory>${project.basedir}</directory>
<includes>
<include>admin/target/*-${extensions-version}.jar</include>
<include>jmx-metrics-ear/target/*-${extensions-version}.ear</include>
</includes>
</fileSet>
</fileSets>
</configuration>
</plugin>
</plugins>
</build>
</project>

0 comments on commit ffe8693

Please sign in to comment.