-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sona Mala
committed
Dec 6, 2021
1 parent
b7a8473
commit dfaa965
Showing
8 changed files
with
289 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
167 changes: 167 additions & 0 deletions
167
apps-integration-tests/integration-tests-trusty-audit/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,167 @@ | ||
<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>org.kie.kogito</groupId> | ||
<artifactId>apps-integration-tests</artifactId> | ||
<version>2.0.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>integration-tests-trusty-audit</artifactId> | ||
<name>Kogito Apps :: Integration Tests :: Trusty Audit UI</name> | ||
<packaging>pom</packaging> | ||
|
||
<properties> | ||
<container.image.kogito-service>to-be-changed-in-submodules</container.image.kogito-service> | ||
</properties> | ||
|
||
<dependencies> | ||
<!-- ensure dependent modules were built, but not added in the classpath --> | ||
<dependency> | ||
<groupId>org.kie.kogito</groupId> | ||
<artifactId>explainability-service-messaging</artifactId> | ||
<version>${project.version}</version> | ||
<type>pom</type> | ||
<scope>provided</scope> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>*</groupId> | ||
<artifactId>*</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.kie.kogito</groupId> | ||
<artifactId>integration-tests-trusty-service-quarkus</artifactId> | ||
<version>${project.version}</version> | ||
<type>pom</type> | ||
<scope>provided</scope> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>*</groupId> | ||
<artifactId>*</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.kie.kogito</groupId> | ||
<artifactId>trusty-service-infinispan</artifactId> | ||
<version>${project.version}</version> | ||
<type>pom</type> | ||
<scope>provided</scope> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>*</groupId> | ||
<artifactId>*</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.kie.kogito</groupId> | ||
<artifactId>trusty-ui</artifactId> | ||
<version>${project.version}</version> | ||
<type>pom</type> | ||
<scope>provided</scope> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>*</groupId> | ||
<artifactId>*</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<!-- | ||
mvn resources plugin | ||
It seems that docker-maven-plugin can not read .ENV file | ||
<plugin> | ||
<artifactId>maven-antrun-plugin</artifactId> | ||
<version>3.0.0</version> | ||
<executions> | ||
<execution> | ||
<phase>test</phase> | ||
<configuration> | ||
<target><echo file="src/test/docker-compose/.env">VERSION=${project.version}</echo> </target> | ||
</configuration> | ||
<goals> | ||
<goal>run</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
--> | ||
<!-- frontend related plugins--> | ||
<!-- | ||
Installs node and yarn in the webapp's node and node_modules folders. | ||
Run 'mvn package': | ||
* the first time you have checked out the source. | ||
* whenever the dependencies have been changed in package.json (delete the webapp's node_modules folder first!) | ||
If you want to skip installation of the packages, turn the profile off by setting property `-Dskip.ui.deps`. | ||
--> | ||
<plugin> | ||
<groupId>com.github.eirslett</groupId> | ||
<artifactId>frontend-maven-plugin</artifactId> | ||
<configuration> | ||
<workingDirectory>/home/sjamboro/Documents/Repository/kogito-apps/ui-packages</workingDirectory> | ||
</configuration> | ||
<executions> | ||
<!-- | ||
It works only if docker contains images from previous build. | ||
This was just verification that this way is imposible. | ||
In case that docker images are empty than the build fails. | ||
For example: org.kie.kogito/integration-tests-trusty-service-quarkus:2.0.0-SNAPSHOT is missing | ||
TODO: parametrize base url to localhost:1337 | ||
--> | ||
<execution> | ||
<id>yarn e2e test</id> | ||
<goals> | ||
<goal>yarn</goal> | ||
</goals> | ||
<phase>integration-test</phase> | ||
<configuration> | ||
<skip>${skip.ui.build}</skip> | ||
<npmRegistryURL>${env.NPM_REGISTRY_URL}</npmRegistryURL> | ||
<arguments>run test:e2e</arguments> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>io.fabric8</groupId> | ||
<artifactId>docker-maven-plugin</artifactId> | ||
<configuration> | ||
<images> | ||
<image> | ||
<alias>webapp</alias> | ||
<name>fabric8/compose-demo:latest</name> | ||
|
||
<external> | ||
<type>compose</type> | ||
<basedir>src/test/docker-compose</basedir> | ||
<composeFile>docker-compose.yml</composeFile> | ||
</external> | ||
</image> | ||
</images> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>start</id> | ||
<phase>pre-integration-test</phase> | ||
<goals> | ||
<goal>start</goal> | ||
</goals> | ||
</execution> | ||
<execution> | ||
<id>stop</id> | ||
<phase>post-integration-test</phase> | ||
<goals> | ||
<goal>stop</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
91 changes: 91 additions & 0 deletions
91
...tegration-tests/integration-tests-trusty-audit/src/test/docker-compose/docker-compose.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
version: '2' | ||
|
||
services: | ||
zookeeper: | ||
image: wurstmeister/zookeeper:3.4.6 | ||
ports: | ||
- "2181:2181" | ||
environment: | ||
LOG_DIR: "/tmp/logs" | ||
|
||
kafka: | ||
image: wurstmeister/kafka:2.12-2.2.1 | ||
depends_on: | ||
- zookeeper | ||
ports: | ||
- "9092:9092" | ||
expose: | ||
- "9093" | ||
environment: | ||
KAFKA_ADVERTISED_LISTENERS: INSIDE://kafka:9093,OUTSIDE://localhost:9092 | ||
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT | ||
KAFKA_LISTENERS: INSIDE://0.0.0.0:9093,OUTSIDE://0.0.0.0:9092 | ||
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 | ||
KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE | ||
LOG_DIR: "/tmp/logs" | ||
|
||
kafdrop: | ||
image: obsidiandynamics/kafdrop | ||
depends_on: | ||
- kafka | ||
ports: | ||
- "9000:9000" | ||
environment: | ||
KAFKA_BROKERCONNECT: "kafka:9093" | ||
JVM_OPTS: "-Xms32M -Xmx64M" | ||
SERVER_SERVLET_CONTEXTPATH: "/" | ||
|
||
infinispan: | ||
image: infinispan/server:11.0.4.Final | ||
container_name: infinispan | ||
ports: | ||
- 11222:11222 | ||
command: "/opt/infinispan/bin/server.sh -c infinispan-demo.xml" | ||
volumes: | ||
- ./infinispan/infinispan.xml:/opt/infinispan/server/conf/infinispan-demo.xml:z | ||
|
||
#dependency in integration-tests-trusty-audit | ||
kogito-app: | ||
image: "org.kie.kogito/integration-tests-trusty-service-quarkus:2.0.0-SNAPSHOT" | ||
ports: | ||
- 8080:8080 | ||
environment: | ||
KAFKA_BOOTSTRAP_SERVERS: kafka:9093 | ||
KOGITO_SERVICE_URL: http://kogito-app:8080 | ||
depends_on: | ||
- kafka | ||
|
||
#dependency in integration-tests-trusty-audit | ||
explainability: | ||
image: "org.kie.kogito/explainability-service-messaging:2.0.0-SNAPSHOT" | ||
depends_on: | ||
- kafka | ||
- kogito-app | ||
environment: | ||
KAFKA_BOOTSTRAP_SERVERS: kafka:9093 | ||
ports: | ||
- 1336:8080 | ||
|
||
#dependency in integration-tests-trusty-audit | ||
trusty: | ||
image: "org.kie.kogito/trusty-service-infinispan:2.0.0-SNAPSHOT" | ||
depends_on: | ||
- kafka | ||
- infinispan | ||
environment: | ||
KAFKA_BOOTSTRAP_SERVERS: kafka:9093 | ||
QUARKUS_INFINISPAN_CLIENT_SERVER_LIST: infinispan:11222 | ||
QUARKUS_INFINISPAN_CLIENT_USE_AUTH: "false" | ||
TRUSTY_EXPLAINABILITY_ENABLED: "true" | ||
ports: | ||
- 1337:8080 | ||
|
||
#dependency in integration-tests-trusty-audit | ||
trusty-ui: | ||
image: "org.kie.kogito/trusty-ui:2.0.0-SNAPSHOT" | ||
depends_on: | ||
- kafka | ||
environment: | ||
KOGITO_TRUSTY_HTTP_URL: http://localhost:1337 | ||
ports: | ||
- 1338:8080 |
27 changes: 27 additions & 0 deletions
27
...on-tests/integration-tests-trusty-audit/src/test/docker-compose/infinispan/infinispan.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<infinispan xmlns='urn:infinispan:config:10.0' xsi:schemaLocation='urn:infinispan:config:10.0 http://www.infinispan.org/schemas/infinispan-config-10.0.xsd urn:infinispan:server:10.0 http://www.infinispan.org/schemas/infinispan-server-10.0.xsd' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'> | ||
<cache-container name="default"/> | ||
<server xmlns='urn:infinispan:server:10.0'> | ||
<interfaces> | ||
<interface name='public'> | ||
<inet-address value='${infinispan.bind.address:0.0.0.0}'/> | ||
</interface> | ||
</interfaces> | ||
<socket-bindings default-interface='public' port-offset='0'> | ||
<socket-binding name='default' port='11222'/> | ||
</socket-bindings> | ||
<security> | ||
<security-realms> | ||
<security-realm name='default'> | ||
<properties-realm groups-attribute='Roles'> | ||
<user-properties path='users.properties' relative-to='infinispan.server.config.path'/> | ||
<group-properties path='groups.properties' relative-to='infinispan.server.config.path'/> | ||
</properties-realm> | ||
</security-realm> | ||
</security-realms> | ||
</security> | ||
<endpoints socket-binding='default' security-realm='default'> | ||
<hotrod-connector name="hotrod"/> | ||
<rest-connector name="rest"/> | ||
</endpoints> | ||
</server> | ||
</infinispan> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters