Skip to content

Commit 475bd7a

Browse files
committed
[skip ci] CI automation
1 parent 1a87a3f commit 475bd7a

File tree

5 files changed

+88
-98
lines changed

5 files changed

+88
-98
lines changed

.github/generate_gpg_key.sh

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/automation_tests.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ jobs:
1919
- name: Build authenticator jar file
2020
run: mvn -B -ntp package --file pom.xml -Dmaven.test.skip=true
2121
- name: Build test Docker container
22-
run: sh ./build-test-container.sh
22+
run: |
23+
docker build \
24+
-f src/main/docker/dev.Dockerfile \
25+
-t kilmajster/keycloak-with-authenticator:test \
26+
.
2327
- name: Run Selenide tests
2428
run: mvn -B -ntp test -P automation-tests

.github/workflows/publish.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,27 @@ jobs:
2121
run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
2222
- name: Set version from git tag
2323
run: mvn -B -ntp versions:set -DgenerateBackupPoms=false -DnewVersion="$TAG"
24-
# - name: Generate GPG key
25-
# run: sh ./.github/generate_gpg_key.sh
26-
# env:
27-
# GPG_PASS_PHRASE: ${{ secrets.GPG_PASS_PHRASE }}
24+
- name: Install gpg secret key
25+
run: |
26+
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
27+
gpg --list-secret-keys --keyid-format LONG
2828
- name: Publish package
29-
run: mvn --batch-mode deploy
29+
run: |
30+
mvn \
31+
--no-transfer-progress \
32+
--batch-mode \
33+
-Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} \
34+
clean deploy
3035
env:
3136
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
3237
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
3338
- name: Build docker init container
34-
run: sh ./build-init-container.sh $TAG
39+
run: |
40+
docker build \
41+
-f src/main/docker/initContainer.Dockerfile \
42+
-t kilmajster/keycloak-username-password-attribute-authenticator:"$TAG" \
43+
-t kilmajster/keycloak-username-password-attribute-authenticator:latest \
44+
.
3545
- name: Log in to Docker Hub
3646
uses: docker/login-action@v1
3747
with:

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: '3'
22

33
services:
44
keycloak:
5-
image: keycloak-with-authenticator
5+
image: kilmajster/keycloak-with-authenticator:test
66
container_name: keycloak-dev
77
build:
88
context: .

pom.xml

Lines changed: 66 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -190,71 +190,71 @@
190190
</plugins>
191191
</build>
192192
</profile>
193-
<!-- <profile>-->
194-
<!-- <id>ossrh</id>-->
195-
<!-- <build>-->
196-
<!-- <plugins>-->
197-
<!-- <plugin>-->
198-
<!-- <groupId>org.apache.maven.plugins</groupId>-->
199-
<!-- <artifactId>maven-compiler-plugin</artifactId>-->
200-
<!-- <version>${maven-compiler-plugin.version}</version>-->
201-
<!-- <configuration>-->
202-
<!-- <source>${maven.compiler.source}</source>-->
203-
<!-- <target>${maven.compiler.target}</target>-->
204-
<!-- </configuration>-->
205-
<!-- </plugin>-->
206-
<!-- <plugin>-->
207-
<!-- <groupId>org.apache.maven.plugins</groupId>-->
208-
<!-- <artifactId>maven-javadoc-plugin</artifactId>-->
209-
<!-- <version>${maven-javadoc-plugin.version}</version>-->
210-
<!-- <configuration>-->
211-
<!-- <sourcepath>src/main/java</sourcepath>-->
212-
<!-- </configuration>-->
213-
<!-- <executions>-->
214-
<!-- <execution>-->
215-
<!-- <id>attach-javadocs</id>-->
216-
<!-- <goals>-->
217-
<!-- <goal>jar</goal>-->
218-
<!-- </goals>-->
219-
<!-- </execution>-->
220-
<!-- </executions>-->
221-
<!-- </plugin>-->
222-
<!-- <plugin>-->
223-
<!-- <groupId>org.apache.maven.plugins</groupId>-->
224-
<!-- <artifactId>maven-source-plugin</artifactId>-->
225-
<!-- <version>${maven-source-plugin.version}</version>-->
226-
<!-- <executions>-->
227-
<!-- <execution>-->
228-
<!-- <id>attach-sources</id>-->
229-
<!-- <goals>-->
230-
<!-- <goal>jar-no-fork</goal>-->
231-
<!-- </goals>-->
232-
<!-- </execution>-->
233-
<!-- </executions>-->
234-
<!-- </plugin>-->
235-
<!-- <plugin>-->
236-
<!-- <groupId>org.apache.maven.plugins</groupId>-->
237-
<!-- <artifactId>maven-gpg-plugin</artifactId>-->
238-
<!-- <version>${maven-gpg-plugin.version}</version>-->
239-
<!-- <configuration>-->
240-
<!-- &lt;!&ndash; Prevent gpg from using pinentry programs &ndash;&gt;-->
241-
<!-- <gpgArguments>-->
242-
<!-- <arg>&#45;&#45;pinentry-mode</arg>-->
243-
<!-- <arg>loopback</arg>-->
244-
<!-- </gpgArguments>-->
245-
<!-- </configuration>-->
246-
<!-- <executions>-->
247-
<!-- <execution>-->
248-
<!-- <id>sign-artifacts</id>-->
249-
<!-- <phase>verify</phase>-->
250-
<!-- <goals>-->
251-
<!-- <goal>sign</goal>-->
252-
<!-- </goals>-->
253-
<!-- </execution>-->
254-
<!-- </executions>-->
255-
<!-- </plugin>-->
256-
<!-- </plugins>-->
257-
<!-- </build>-->
258-
<!-- </profile>-->
193+
<profile>
194+
<id>ossrh</id>
195+
<build>
196+
<plugins>
197+
<plugin>
198+
<groupId>org.apache.maven.plugins</groupId>
199+
<artifactId>maven-compiler-plugin</artifactId>
200+
<version>${maven-compiler-plugin.version}</version>
201+
<configuration>
202+
<source>${maven.compiler.source}</source>
203+
<target>${maven.compiler.target}</target>
204+
</configuration>
205+
</plugin>
206+
<plugin>
207+
<groupId>org.apache.maven.plugins</groupId>
208+
<artifactId>maven-javadoc-plugin</artifactId>
209+
<version>${maven-javadoc-plugin.version}</version>
210+
<configuration>
211+
<sourcepath>src/main/java</sourcepath>
212+
</configuration>
213+
<executions>
214+
<execution>
215+
<id>attach-javadocs</id>
216+
<goals>
217+
<goal>jar</goal>
218+
</goals>
219+
</execution>
220+
</executions>
221+
</plugin>
222+
<plugin>
223+
<groupId>org.apache.maven.plugins</groupId>
224+
<artifactId>maven-source-plugin</artifactId>
225+
<version>${maven-source-plugin.version}</version>
226+
<executions>
227+
<execution>
228+
<id>attach-sources</id>
229+
<goals>
230+
<goal>jar-no-fork</goal>
231+
</goals>
232+
</execution>
233+
</executions>
234+
</plugin>
235+
<plugin>
236+
<groupId>org.apache.maven.plugins</groupId>
237+
<artifactId>maven-gpg-plugin</artifactId>
238+
<version>${maven-gpg-plugin.version}</version>
239+
<configuration>
240+
<!-- Prevent gpg from using pinentry programs -->
241+
<gpgArguments>
242+
<arg>--pinentry-mode</arg>
243+
<arg>loopback</arg>
244+
</gpgArguments>
245+
</configuration>
246+
<executions>
247+
<execution>
248+
<id>sign-artifacts</id>
249+
<phase>verify</phase>
250+
<goals>
251+
<goal>sign</goal>
252+
</goals>
253+
</execution>
254+
</executions>
255+
</plugin>
256+
</plugins>
257+
</build>
258+
</profile>
259259
</profiles>
260260
</project>

0 commit comments

Comments
 (0)