Run adapters in a separate job on GitHub Actions (#26962)
Closes #25892 Signed-off-by: stianst <stianst@gmail.com>
This commit is contained in:
parent
03d1363dfb
commit
23d5f2188d
25 changed files with 87 additions and 67 deletions
26
.github/actions/build-keycloak/action.yml
vendored
26
.github/actions/build-keycloak/action.yml
vendored
|
@ -32,36 +32,12 @@ runs:
|
|||
name: Frontend Plugin Cache
|
||||
uses: ./.github/actions/frontend-plugin-cache
|
||||
|
||||
# Remove once https://github.com/keycloak/keycloak/issues/19299 is solved
|
||||
########################################################################################################
|
||||
- id: check-adapter-changes
|
||||
if: github.event_name == 'pull_request'
|
||||
name: Check changes for WildFly adapters
|
||||
shell: bash
|
||||
# If there are no changes for WildFly adapters, we use adapters built in the latest nightly build
|
||||
run: |
|
||||
WF_ADAPTERS_REGEX="^adapters/oidc/wildfly|^adapters/saml/wildfly"
|
||||
|
||||
git fetch origin --tags --force
|
||||
|
||||
echo "GIT_WF_ADAPTERS_DIFF=$(git diff origin/main --name-only | egrep -ic -e "$WF_ADAPTERS_REGEX")" >> $GITHUB_ENV
|
||||
echo "NIGHTLY_DIFF=$(git diff nightly --name-only | egrep -ic -e "$WF_ADAPTERS_REGEX")" >> $GITHUB_ENV
|
||||
|
||||
- id: set-maven-profile
|
||||
if: ${{ github.event_name != 'pull_request' || env.GIT_WF_ADAPTERS_DIFF != 0 || env.NIGHTLY_DIFF != 0}}
|
||||
name: Set profile for building distribution
|
||||
shell: bash
|
||||
run: |
|
||||
echo "MVN_PROFILES=-Pdistribution" >> $GITHUB_ENV
|
||||
echo "WildFly adapters will be built in our codebase"
|
||||
########################################################################################################
|
||||
|
||||
- id: build-keycloak
|
||||
name: Build Keycloak
|
||||
shell: bash
|
||||
# By using "dependency:resolve", it will download all dependencies used in later stages for running the tests
|
||||
run: |
|
||||
./mvnw install dependency:resolve -V -e -DskipTests -DskipExamples ${{ env.MVN_PROFILES}}
|
||||
./mvnw install dependency:resolve -V -e -DskipTests -DskipExamples
|
||||
|
||||
- id: compress-keycloak-maven-repository
|
||||
name: Compress Keycloak Maven artifacts
|
||||
|
|
4
.github/actions/upload-heapdumps/action.yml
vendored
4
.github/actions/upload-heapdumps/action.yml
vendored
|
@ -11,5 +11,7 @@ runs:
|
|||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: jvm-heap-dumps
|
||||
path: '**/java_pid*.hprof'
|
||||
path: |
|
||||
'**/java_pid*.hprof'
|
||||
!distribution/**
|
||||
if-no-files-found: ignore
|
||||
|
|
49
.github/workflows/ci.yml
vendored
49
.github/workflows/ci.yml
vendored
|
@ -122,6 +122,47 @@ jobs:
|
|||
with:
|
||||
job-id: base-integration-tests-${{ matrix.group }}
|
||||
|
||||
adapter-integration-tests:
|
||||
name: Adapter IT
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 100
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- id: integration-test-setup
|
||||
name: Integration test setup
|
||||
uses: ./.github/actions/integration-test-setup
|
||||
|
||||
- name: Build adapter distributions
|
||||
run: ./mvnw install -DskipTests -f distribution/pom.xml
|
||||
|
||||
- name: Build app servers
|
||||
run: ./mvnw install -DskipTests -Pbuild-app-servers -f testsuite/integration-arquillian/servers/app-server/pom.xml
|
||||
|
||||
- name: Run adapter tests
|
||||
run: |
|
||||
TESTS="org.keycloak.testsuite.adapter.**"
|
||||
echo "Tests: $TESTS"
|
||||
./mvnw test ${{ env.SUREFIRE_RETRY }} -Pauth-server-quarkus -Papp-server-wildfly "-Dwebdriver.chrome.driver=$CHROMEWEBDRIVER/chromedriver" -Dtest=$TESTS -pl testsuite/integration-arquillian/tests/base 2>&1 | misc/log/trimmer.sh
|
||||
|
||||
- name: Upload JVM Heapdumps
|
||||
if: always()
|
||||
uses: ./.github/actions/upload-heapdumps
|
||||
|
||||
- uses: ./.github/actions/upload-flaky-tests
|
||||
name: Upload flaky tests
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
with:
|
||||
job-name: Base IT
|
||||
|
||||
- name: Surefire reports
|
||||
if: always()
|
||||
uses: ./.github/actions/archive-surefire-reports
|
||||
with:
|
||||
job-id: adapter-integration-tests
|
||||
|
||||
quarkus-unit-tests:
|
||||
name: Quarkus UT
|
||||
needs: build
|
||||
|
@ -416,6 +457,13 @@ jobs:
|
|||
with:
|
||||
jdk-version: 17
|
||||
|
||||
- name: Build adapter distributions
|
||||
run: ./mvnw install -DskipTests -f distribution/pom.xml
|
||||
|
||||
- name: Build app servers
|
||||
run: ./mvnw install -DskipTests -Pbuild-app-servers -f testsuite/integration-arquillian/servers/app-server/pom.xml
|
||||
|
||||
|
||||
- name: Prepare Quarkus distribution with BCFIPS
|
||||
run: ./mvnw install -e -pl testsuite/integration-arquillian/servers/auth-server/quarkus -Pauth-server-quarkus,auth-server-fips140-2
|
||||
|
||||
|
@ -649,6 +697,7 @@ jobs:
|
|||
- build
|
||||
- unit-tests
|
||||
- base-integration-tests
|
||||
- adapter-integration-tests
|
||||
- quarkus-unit-tests
|
||||
- quarkus-integration-tests
|
||||
- jdk-integration-tests
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
<containers.home>${project.build.directory}/containers</containers.home>
|
||||
<auth.server.java.home>${java.home}</auth.server.java.home>
|
||||
<app.server.java.home>${java.home}</app.server.java.home>
|
||||
<app.server>wildfly</app.server>
|
||||
<app.server>disabled</app.server>
|
||||
<cache.server.java.home>${java.home}</cache.server.java.home>
|
||||
|
||||
<!--component versions-->
|
||||
|
@ -639,19 +639,4 @@
|
|||
</profile>
|
||||
</profiles>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>sonatype-snapshots</id>
|
||||
<name>Sonatype Snapshots</name>
|
||||
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
<updatePolicy>daily</updatePolicy>
|
||||
</snapshots>
|
||||
<releases>
|
||||
<enabled>false</enabled>
|
||||
</releases>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -37,11 +37,19 @@
|
|||
|
||||
<modules>
|
||||
<module>app-server-spi</module>
|
||||
</modules>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>build-app-servers</id>
|
||||
<modules>
|
||||
<module>jboss</module>
|
||||
<module>karaf</module>
|
||||
<module>tomcat</module>
|
||||
<module>undertow</module>
|
||||
<module>jetty</module>
|
||||
</modules>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -513,7 +513,6 @@
|
|||
<profile>
|
||||
<id>app-server-wildfly</id>
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
<property>
|
||||
<name>app.server</name>
|
||||
<value>wildfly</value>
|
||||
|
|
|
@ -73,7 +73,7 @@ public class AppServerTestEnricher {
|
|||
|
||||
private static final Logger log = Logger.getLogger(AppServerTestEnricher.class);
|
||||
|
||||
public static final String CURRENT_APP_SERVER = System.getProperty("app.server", "wildfly");
|
||||
public static final String CURRENT_APP_SERVER = System.getProperty("app.server", "disabled");
|
||||
public static final boolean APP_SERVER_SSL_REQUIRED = Boolean.parseBoolean(System.getProperty("app.server.ssl.required", "false"));
|
||||
|
||||
@Inject private Instance<ContainerController> containerConrollerInstance;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.keycloak.testsuite.authz.adapter.example;
|
||||
package org.keycloak.testsuite.adapter.authz.example;
|
||||
|
||||
import org.jboss.arquillian.container.test.api.Deployer;
|
||||
import org.jboss.arquillian.graphene.page.Page;
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.keycloak.testsuite.authz.adapter.example;
|
||||
package org.keycloak.testsuite.adapter.authz.example;
|
||||
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.keycloak.testsuite.authz.adapter.example;
|
||||
package org.keycloak.testsuite.adapter.authz.example;
|
||||
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.keycloak.testsuite.authz.adapter.example;
|
||||
package org.keycloak.testsuite.adapter.authz.example;
|
||||
|
||||
import org.jboss.arquillian.container.test.api.Deployer;
|
||||
import org.jboss.arquillian.container.test.api.Deployment;
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.keycloak.testsuite.authz.adapter.example;
|
||||
package org.keycloak.testsuite.adapter.authz.example;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.keycloak.testsuite.authz.adapter.example;
|
||||
package org.keycloak.testsuite.adapter.authz.example;
|
||||
|
||||
import jakarta.ws.rs.client.Client;
|
||||
import jakarta.ws.rs.client.Entity;
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.keycloak.testsuite.authz.adapter.example;
|
||||
package org.keycloak.testsuite.adapter.authz.example;
|
||||
|
||||
import org.jboss.arquillian.container.test.api.Deployment;
|
||||
import org.jboss.shrinkwrap.api.spec.WebArchive;
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.keycloak.testsuite.authz.adapter.example;
|
||||
package org.keycloak.testsuite.adapter.authz.example;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.keycloak.testsuite.authz.adapter.example;
|
||||
package org.keycloak.testsuite.adapter.authz.example;
|
||||
|
||||
import org.jboss.arquillian.container.test.api.Deployment;
|
||||
import org.jboss.shrinkwrap.api.spec.WebArchive;
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.keycloak.testsuite.authz.adapter.example;
|
||||
package org.keycloak.testsuite.adapter.authz.example;
|
||||
|
||||
import java.io.IOException;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.keycloak.testsuite.authz.adapter.example;
|
||||
package org.keycloak.testsuite.adapter.authz.example;
|
||||
|
||||
import java.io.File;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.keycloak.testsuite.authz.adapter.example;
|
||||
package org.keycloak.testsuite.adapter.authz.example;
|
||||
|
||||
import org.jboss.arquillian.container.test.api.Deployment;
|
||||
import org.jboss.shrinkwrap.api.spec.WebArchive;
|
|
@ -1,4 +1,4 @@
|
|||
package org.keycloak.testsuite.saml;
|
||||
package org.keycloak.testsuite.adapter.servlet;
|
||||
|
||||
import org.apache.http.NameValuePair;
|
||||
import org.apache.http.client.entity.UrlEncodedFormEntity;
|
||||
|
@ -12,6 +12,7 @@ import org.keycloak.saml.common.constants.GeneralConstants;
|
|||
import org.keycloak.saml.processing.web.util.PostBindingUtil;
|
||||
|
||||
import org.keycloak.testsuite.arquillian.annotation.AppServerContainer;
|
||||
import org.keycloak.testsuite.saml.AbstractSamlTest;
|
||||
import org.keycloak.testsuite.utils.arquillian.ContainerConstants;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
|
@ -1,6 +1,6 @@
|
|||
account,4
|
||||
actions,1
|
||||
adapter,2
|
||||
adapter,IGNORED
|
||||
admin,1
|
||||
authz,3
|
||||
broker,2
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<parent>
|
||||
<groupId>org.keycloak.testsuite</groupId>
|
||||
<artifactId>integration-arquillian-tests-adapters-karaf</artifactId>
|
||||
<version>999-SNAPSHOT</version>
|
||||
<version>999.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>integration-arquillian-tests-adapters-fuse61</artifactId>
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<parent>
|
||||
<groupId>org.keycloak.testsuite</groupId>
|
||||
<artifactId>integration-arquillian-tests-adapters-karaf</artifactId>
|
||||
<version>999-SNAPSHOT</version>
|
||||
<version>999.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>integration-arquillian-tests-adapters-fuse62</artifactId>
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<parent>
|
||||
<groupId>org.keycloak.testsuite</groupId>
|
||||
<artifactId>integration-arquillian-tests-adapters-karaf</artifactId>
|
||||
<version>999-SNAPSHOT</version>
|
||||
<version>999.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>integration-arquillian-tests-adapters-karaf3</artifactId>
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<parent>
|
||||
<groupId>org.keycloak.testsuite</groupId>
|
||||
<artifactId>integration-arquillian-tests-adapters</artifactId>
|
||||
<version>999-SNAPSHOT</version>
|
||||
<version>999.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>integration-arquillian-tests-adapters-karaf</artifactId>
|
||||
|
|
Loading…
Reference in a new issue