mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
ci for quarkus branch
This commit is contained in:
1
.dockerignore
Normal file
1
.dockerignore
Normal file
@@ -0,0 +1 @@
|
|||||||
|
commafeed-client
|
||||||
66
.github/workflows/ci.yml
vendored
66
.github/workflows/ci.yml
vendored
@@ -4,6 +4,7 @@ on: [ push ]
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
JAVA_VERSION: 21
|
JAVA_VERSION: 21
|
||||||
|
DOCKER_BUILD_SUMMARY: false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-linux:
|
build-linux:
|
||||||
@@ -53,7 +54,7 @@ jobs:
|
|||||||
# Docker
|
# Docker
|
||||||
- name: Login to Container Registry
|
- name: Login to Container Registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
if: ${{ github.ref_type == 'tag' || github.ref_name == 'master' }}
|
if: ${{ github.ref_type == 'tag' || github.ref_name == 'master' || github.ref_name == 'quarkus' }}
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
@@ -63,62 +64,67 @@ jobs:
|
|||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
if: ${{ github.ref_type == 'tag' }}
|
if: ${{ github.ref_type == 'tag' }}
|
||||||
with:
|
with:
|
||||||
context: commafeed-server
|
context: .
|
||||||
file: src/main/docker/Dockerfile.native
|
file: commafeed-server/src/main/docker/Dockerfile.native
|
||||||
push: true
|
push: true
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
tags: |
|
tags: |
|
||||||
athou/commafeed:latest-native
|
athou/commafeed:latest-${{ matrix.database }}
|
||||||
athou/commafeed:${{ github.ref_name }}-native
|
athou/commafeed:${{ github.ref_name }}-${{ matrix.database }}
|
||||||
|
|
||||||
- name: Docker build and push tag - jvm
|
- name: Docker build and push tag - jvm
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
if: ${{ github.ref_type == 'tag' }}
|
if: ${{ github.ref_type == 'tag' }}
|
||||||
with:
|
with:
|
||||||
context: commafeed-server
|
context: .
|
||||||
file: src/main/docker/Dockerfile.jvm
|
file: commafeed-server/src/main/docker/Dockerfile.jvm
|
||||||
push: true
|
push: true
|
||||||
platforms: linux/arm64/v8
|
platforms: linux/amd64,linux/arm64/v8
|
||||||
tags: |
|
tags: |
|
||||||
athou/commafeed:latest-jvm
|
athou/commafeed:latest-${{ matrix.database }}-jvm
|
||||||
athou/commafeed:${{ github.ref_name }}-jvm
|
athou/commafeed:${{ github.ref_name }}-${{ matrix.database }}-jvm
|
||||||
|
|
||||||
- name: Docker merge tag manifests
|
|
||||||
uses: Noelware/docker-manifest-action@0.4.2
|
|
||||||
if: ${{ github.ref_type == 'tag' }}
|
|
||||||
with:
|
|
||||||
inputs: athou/commafeed:latest
|
|
||||||
images: athou/commafeed:latest-native,athou/commafeed:latest-jvm
|
|
||||||
push: true
|
|
||||||
|
|
||||||
## master
|
## master
|
||||||
- name: Docker build and push master - native
|
- name: Docker build and push master - native
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
if: ${{ github.ref_name == 'master' }}
|
if: ${{ github.ref_name == 'master' }}
|
||||||
with:
|
with:
|
||||||
context: commafeed-server
|
context: .
|
||||||
file: src/main/docker/Dockerfile.native
|
file: commafeed-server/src/main/docker/Dockerfile.native
|
||||||
push: true
|
push: true
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
tags: athou/commafeed:master-native
|
tags: athou/commafeed:master-${{ matrix.database }}
|
||||||
|
|
||||||
- name: Docker build and push master - jvm
|
- name: Docker build and push master - jvm
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
if: ${{ github.ref_name == 'master' }}
|
if: ${{ github.ref_name == 'master' }}
|
||||||
with:
|
with:
|
||||||
context: commafeed-server
|
context: .
|
||||||
file: src/main/docker/Dockerfile.jvm
|
file: commafeed-server/src/main/docker/Dockerfile.jvm
|
||||||
push: true
|
push: true
|
||||||
platforms: linux/arm64/v8
|
platforms: linux/amd64,linux/arm64/v8
|
||||||
tags: athou/commafeed:master-jvm
|
tags: athou/commafeed:master-${{ matrix.database }}-jvm
|
||||||
|
|
||||||
- name: Docker merge master manifests
|
## quarkus branch - remove when merged into master, also remove the condition in the login step
|
||||||
uses: Noelware/docker-manifest-action@0.4.2
|
- name: Docker build and push quarkus - native
|
||||||
if: ${{ github.ref_name == 'master' }}
|
uses: docker/build-push-action@v6
|
||||||
|
if: ${{ github.ref_name == 'quarkus' }}
|
||||||
with:
|
with:
|
||||||
inputs: athou/commafeed:master
|
context: .
|
||||||
images: athou/commafeed:master-native,athou/commafeed:master-jvm
|
file: commafeed-server/src/main/docker/Dockerfile.native
|
||||||
push: true
|
push: true
|
||||||
|
platforms: linux/amd64
|
||||||
|
tags: athou/commafeed:quarkus-${{ matrix.database }}
|
||||||
|
|
||||||
|
- name: Docker build and push quarkus - jvm
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
if: ${{ github.ref_name == 'quarkus' }}
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: commafeed-server/src/main/docker/Dockerfile.jvm
|
||||||
|
push: true
|
||||||
|
platforms: linux/amd64,linux/arm64/v8
|
||||||
|
tags: athou/commafeed:quarkus-${{ matrix.database }}-jvm
|
||||||
|
|
||||||
build-windows:
|
build-windows:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.commafeed</groupId>
|
<groupId>com.commafeed</groupId>
|
||||||
<artifactId>commafeed</artifactId>
|
<artifactId>commafeed</artifactId>
|
||||||
<version>4.6.0</version>
|
<version>5.0.0-beta</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>commafeed-client</artifactId>
|
<artifactId>commafeed-client</artifactId>
|
||||||
<name>CommaFeed Client</name>
|
<name>CommaFeed Client</name>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.commafeed</groupId>
|
<groupId>com.commafeed</groupId>
|
||||||
<artifactId>commafeed</artifactId>
|
<artifactId>commafeed</artifactId>
|
||||||
<version>4.6.0</version>
|
<version>5.0.0-beta</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>commafeed-server</artifactId>
|
<artifactId>commafeed-server</artifactId>
|
||||||
<name>CommaFeed Server</name>
|
<name>CommaFeed Server</name>
|
||||||
@@ -229,7 +229,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.commafeed</groupId>
|
<groupId>com.commafeed</groupId>
|
||||||
<artifactId>commafeed-client</artifactId>
|
<artifactId>commafeed-client</artifactId>
|
||||||
<version>4.6.0</version>
|
<version>5.0.0-beta</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@@ -2,26 +2,20 @@ package com.commafeed.security.mechanism;
|
|||||||
|
|
||||||
import java.security.SecureRandom;
|
import java.security.SecureRandom;
|
||||||
import java.util.Base64;
|
import java.util.Base64;
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import io.quarkus.security.identity.IdentityProviderManager;
|
|
||||||
import io.quarkus.security.identity.SecurityIdentity;
|
|
||||||
import io.quarkus.security.identity.request.AuthenticationRequest;
|
|
||||||
import io.quarkus.vertx.http.runtime.FormAuthConfig;
|
import io.quarkus.vertx.http.runtime.FormAuthConfig;
|
||||||
import io.quarkus.vertx.http.runtime.FormAuthRuntimeConfig;
|
import io.quarkus.vertx.http.runtime.FormAuthRuntimeConfig;
|
||||||
import io.quarkus.vertx.http.runtime.HttpBuildTimeConfig;
|
import io.quarkus.vertx.http.runtime.HttpBuildTimeConfig;
|
||||||
import io.quarkus.vertx.http.runtime.HttpConfiguration;
|
import io.quarkus.vertx.http.runtime.HttpConfiguration;
|
||||||
import io.quarkus.vertx.http.runtime.security.ChallengeData;
|
|
||||||
import io.quarkus.vertx.http.runtime.security.FormAuthenticationMechanism;
|
import io.quarkus.vertx.http.runtime.security.FormAuthenticationMechanism;
|
||||||
import io.quarkus.vertx.http.runtime.security.HttpAuthenticationMechanism;
|
import io.quarkus.vertx.http.runtime.security.HttpAuthenticationMechanism;
|
||||||
import io.quarkus.vertx.http.runtime.security.HttpCredentialTransport;
|
|
||||||
import io.quarkus.vertx.http.runtime.security.PersistentLoginManager;
|
import io.quarkus.vertx.http.runtime.security.PersistentLoginManager;
|
||||||
import io.smallrye.mutiny.Uni;
|
|
||||||
import io.vertx.core.http.Cookie;
|
import io.vertx.core.http.Cookie;
|
||||||
import io.vertx.core.http.impl.ServerCookie;
|
import io.vertx.core.http.impl.ServerCookie;
|
||||||
import io.vertx.ext.web.RoutingContext;
|
import io.vertx.ext.web.RoutingContext;
|
||||||
import jakarta.annotation.Priority;
|
import jakarta.annotation.Priority;
|
||||||
import jakarta.inject.Singleton;
|
import jakarta.inject.Singleton;
|
||||||
|
import lombok.experimental.Delegate;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -37,6 +31,7 @@ public class CookieMaxAgeFormAuthenticationMechanism implements HttpAuthenticati
|
|||||||
// the temp encryption key, persistent across dev mode restarts
|
// the temp encryption key, persistent across dev mode restarts
|
||||||
static volatile String encryptionKey;
|
static volatile String encryptionKey;
|
||||||
|
|
||||||
|
@Delegate
|
||||||
private final FormAuthenticationMechanism delegate;
|
private final FormAuthenticationMechanism delegate;
|
||||||
|
|
||||||
public CookieMaxAgeFormAuthenticationMechanism(HttpConfiguration httpConfiguration, HttpBuildTimeConfig buildTimeConfig) {
|
public CookieMaxAgeFormAuthenticationMechanism(HttpConfiguration httpConfiguration, HttpBuildTimeConfig buildTimeConfig) {
|
||||||
@@ -86,26 +81,6 @@ public class CookieMaxAgeFormAuthenticationMechanism implements HttpAuthenticati
|
|||||||
landingPage, redirectAfterLogin, locationCookie, cookieSameSite, cookiePath, loginManager);
|
landingPage, redirectAfterLogin, locationCookie, cookieSameSite, cookiePath, loginManager);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Uni<SecurityIdentity> authenticate(RoutingContext context, IdentityProviderManager identityProviderManager) {
|
|
||||||
return delegate.authenticate(context, identityProviderManager);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Uni<ChallengeData> getChallenge(RoutingContext context) {
|
|
||||||
return delegate.getChallenge(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Set<Class<? extends AuthenticationRequest>> getCredentialTypes() {
|
|
||||||
return delegate.getCredentialTypes();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Uni<HttpCredentialTransport> getCredentialTransport(RoutingContext context) {
|
|
||||||
return delegate.getCredentialTransport(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static String startWithSlash(String page) {
|
private static String startWithSlash(String page) {
|
||||||
if (page == null) {
|
if (page == null) {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
2
pom.xml
2
pom.xml
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
<groupId>com.commafeed</groupId>
|
<groupId>com.commafeed</groupId>
|
||||||
<artifactId>commafeed</artifactId>
|
<artifactId>commafeed</artifactId>
|
||||||
<version>4.6.0</version>
|
<version>5.0.0-beta</version>
|
||||||
<name>CommaFeed</name>
|
<name>CommaFeed</name>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user