Skip to content

Commit

Permalink
Merge pull request #3 from intensiongmbh/sendinblueEmailProvider
Browse files Browse the repository at this point in the history
Sendinblue email provider
  • Loading branch information
a-team-intension authored Mar 25, 2021
2 parents e735157 + f95d830 commit 0ed8da5
Show file tree
Hide file tree
Showing 20 changed files with 473 additions and 134 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Docker

on:
release:
types:
- created

jobs:
push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 11

- name: Set up Docker
uses: docker/setup-buildx-action@v1

- name: Package maven jar
run: mvn clean package -DskipTests -DartifactName=sendinblue

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
context: .
tags: intension/sendinblue-email-provider:latest
2 changes: 1 addition & 1 deletion .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
gpg-private-key: ${{ secrets.GPG_SECRET }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: Publish package
run: mvn --batch-mode deploy -DskipTests -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} -Dkeycloak.version=${GITHUB_REF##*/} -Dchangelist=
run: mvn --batch-mode deploy -DskipTests -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} -DprojectVersion=${GITHUB_REF##*/} -Dchangelist=
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/target/
target/
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM busybox
COPY sendinblue-bundle/target/sendinblue.ear /sendinblue/
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[![Release](https://github.com/intensiongmbh/keycloak-sendinblue/actions/workflows/maven-publish.yml/badge.svg)](https://github.com/intensiongmbh/keycloak-sendinblue/actions/workflows/maven-publish.yml)
[![Docker](https://github.com/intensiongmbh/keycloak-sendinblue/actions/workflows/docker-publish.yml/badge.svg)](https://github.com/intensiongmbh/keycloak-sendinblue/actions/workflows/docker-publish.yml)

# Keycloak Sendinblue

:e-mail: Keycloak addon to use the Sendinblue API for sending mails
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ version: '3.7'
services:
keycloak:
container_name: keycloak-sendinblue
image: jboss/keycloak:{{ KEYCLOAK_VERSION }}
image: "jboss/keycloak:${KEYCLOAK_VERSION}"
ports:
- 18080:8080
environment:
KEYCLOAK_USER: admin
KEYCLOAK_PASSWORD: keycloak
volumes:
- /etc/localtime:/etc/localtime:ro
- ./target/keycloak-sendinblue-{{ KEYCLOAK_VERSION }}.jar:/opt/jboss/keycloak/standalone/deployments/keycloak-sendinblue.jar
- "./sendinblue-bundle/target/keycloak-sendinblue-bundle-KC-${KEYCLOAK_VERSION}-docker.ear:/opt/jboss/keycloak/standalone/deployments/keycloak-sendinblue.ear"
185 changes: 83 additions & 102 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@

<groupId>de.intension</groupId>
<artifactId>keycloak-sendinblue</artifactId>
<version>${keycloak.version}${changelist}</version>
<packaging>jar</packaging>
<version>KC-${keycloak.version}-${projectVersion}${changelist}</version>
<packaging>pom</packaging>

<name>Keycloak Sendinblue</name>
<description>Keycloak addon to use the Sendinblue API for sending mails</description>

<url>https://github.com/intensiongmbh/keycloak-sendinblue</url>

<licenses>
Expand All @@ -21,6 +22,18 @@
</licenses>

<developers>
<developer>
<name>Romain Grosjean</name>
<email>[email protected]</email>
<organization>intension GmbH</organization>
<organizationUrl>https://www.intension.de/</organizationUrl>
</developer>
<developer>
<name>Lokeshkumar Prakashkumar</name>
<email>[email protected]</email>
<organization>intension GmbH</organization>
<organizationUrl>https://www.intension.de/</organizationUrl>
</developer>
<developer>
<name>Ingo Kuba</name>
<email>[email protected]</email>
Expand All @@ -45,7 +58,8 @@
</distributionManagement>

<properties>
<keycloak.version>12.0.2</keycloak.version>
<keycloak.version>12.0.4</keycloak.version>
<projectVersion>1.0.0</projectVersion>
<changelist>-SNAPSHOT</changelist>
<java.version>11</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
Expand All @@ -57,85 +71,72 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-core</artifactId>
<version>${keycloak.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-server-spi</artifactId>
<version>${keycloak.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-server-spi-private</artifactId>
<version>${keycloak.version}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-services</artifactId>
<version>${keycloak.version}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.12.2</version>
<scope>test</scope>
</dependency>
</dependencies>
<modules>
<module>sendinblue-extension</module>
<module>sendinblue-bundle</module>
</modules>


<dependencyManagement>

<dependencies>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-core</artifactId>
<version>${keycloak.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-server-spi</artifactId>
<version>${keycloak.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-server-spi-private</artifactId>
<version>${keycloak.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-services</artifactId>
<version>${keycloak.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>

<build>
<plugins>
Expand Down Expand Up @@ -223,25 +224,5 @@
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
<manifestEntries>
<Dependencies>org.keycloak.keycloak-core, org.keycloak.keycloak-server-spi, org.keycloak.keycloak-server-spi-private, org.keycloak.keycloak-services,
org.jboss.logging</Dependencies>
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
40 changes: 40 additions & 0 deletions sendinblue-bundle/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>de.intension</groupId>
<artifactId>keycloak-sendinblue</artifactId>
<version>KC-${keycloak.version}-${projectVersion}${changelist}</version>
</parent>
<artifactId>keycloak-sendinblue-bundle</artifactId>
<packaging>ear</packaging>

<name>Keycloak Sendinblue Bundle</name>
<description>Bundle to deploy the Sendinblue extension and its dependencies in Keycloak</description>

<properties>
<artifactName>${artifactId}-${project.version}</artifactName>
</properties>

<dependencies>
<dependency>
<groupId>de.intension</groupId>
<artifactId>keycloak-sendinblue-extension</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>

<build>
<!-- Override this with -Djar.name when building the jar -->
<finalName>${artifactName}</finalName>
<plugins>
<plugin>
<artifactId>maven-ear-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<includeLibInApplicationXml>true</includeLibInApplicationXml>
</configuration>
</plugin>
</plugins>
</build>
</project>
Loading

0 comments on commit 0ed8da5

Please sign in to comment.