-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
eace8d3
commit d35cbc9
Showing
79 changed files
with
2,657 additions
and
156 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
#!/bin/bash | ||
|
||
# Define an associative array | ||
declare -A jar_enum | ||
|
||
# Define your JARs (java applications to be started) here or comment out the ones you don't need | ||
jar_enum["gsi-fedmaster"]="./gsi-fedmaster/target/gsi-fedmaster-6.0.0.jar" | ||
jar_enum["gsi-server"]="./gsi-server/target/gsi-server-6.0.0.jar" | ||
#jar_enum["auth-server"]="../gras/gra-server/target/gra-server-4.0.2.jar" | ||
|
||
# should not be edited below this line | ||
|
||
# Flags to check if any required JAR file is missing | ||
missing_gsi=false | ||
missing_other=false | ||
|
||
# check if any JAR file is missing | ||
detect_missing_jars() { | ||
for key in "${!jar_enum[@]}"; do | ||
if [ ! -f ${jar_enum[$key]} ]; then | ||
echo "Required file ${jar_enum[$key]} not found." | ||
if [ "$key" == "gsi-fedmaster" ] || [ "$key" == "gsi-server" ]; then | ||
missing_gsi=true | ||
else | ||
missing_other=true | ||
fi | ||
fi | ||
done | ||
} | ||
|
||
process_missing_jars() { | ||
if [ "$missing_gsi" = true ]; then | ||
echo "Some required GSI JAR files are missing. Start build..." | ||
mvn clean package -Dskip.unittests -DskipIntTests -Dskip.dockerbuild=true | ||
echo "Execute script again to verify all required JAR files exist." | ||
elif [ "$missing_other" = true ]; then | ||
echo "Exiting with status 1." | ||
exit 1 | ||
else | ||
echo "All required JAR files exist." | ||
fi | ||
} | ||
|
||
check_gitrepo_root_dir(){ | ||
# Check if the ".git" directory exists in the current directory | ||
if [ ! -d ".git" ]; then | ||
echo "Error: This script requires to run from the repository root directory." | ||
exit 1 | ||
fi | ||
} | ||
|
||
start_servers(){ | ||
if [[ -n "${jar_enum["gsi-fedmaster"]}" ]]; then | ||
start sh -c "echo -ne '\033]0;Fedmaster\007'; java -jar \"${jar_enum["gsi-fedmaster"]}\" --server.port=8083 | tee gsi-fedmaster.log" | ||
echo "Fedmaster started successfully." | ||
fi | ||
|
||
if [[ -n "${jar_enum["gsi-server"]}" ]]; then | ||
start sh -c "echo -ne '\033]0;GSI\007'; java -jar \"${jar_enum["gsi-server"]}\" --server.port=8085 --spring.profiles.active=github | tee gsi-server.log" | ||
echo "gsi-server started successfully." | ||
fi | ||
|
||
if [[ -n "${jar_enum["auth-server"]}" ]]; then | ||
start sh -c "echo -ne '\033]0;Auth-Server\007'; java -jar \"${jar_enum["auth-server"]}\" --server.port=8084 --spring.profiles.active=github | tee auth-server.log" | ||
echo "auth-server started successfully." | ||
fi | ||
} | ||
|
||
check_gitrepo_root_dir | ||
detect_missing_jars | ||
process_missing_jars | ||
export FEDMASTER_SERVER_URL="http://127.0.0.1:8083" | ||
start_servers |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,198 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>de.gematik.idp</groupId> | ||
<artifactId>gemSekIdp-global</artifactId> | ||
<version>6.0.0</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
|
||
<artifactId>gsi-fedmaster</artifactId> | ||
<version>6.0.0</version> | ||
<packaging>jar</packaging> | ||
|
||
<name>gsi-fedmaster</name> | ||
<description>fedmaster of gematik sektoraler IDP server</description> | ||
|
||
<properties> | ||
<commit_hash>undefined</commit_hash> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.projectlombok</groupId> | ||
<artifactId>lombok</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-configuration-processor</artifactId> | ||
<optional>true</optional> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-actuator</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-jersey</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-validation</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-test</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-web</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>de.gematik.idp</groupId> | ||
<artifactId>idp-commons</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-webmvc</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.konghq</groupId> | ||
<artifactId>unirest-java</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>jakarta.validation</groupId> | ||
<artifactId>jakarta.validation-api</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>jakarta.annotation</groupId> | ||
<artifactId>jakarta.annotation-api</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.logging.log4j</groupId> | ||
<artifactId>log4j-slf4j2-impl</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.logging.log4j</groupId> | ||
<artifactId>log4j-api</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.logging.log4j</groupId> | ||
<artifactId>log4j-core</artifactId> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<!-- Phase clean --> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-clean-plugin</artifactId> | ||
<version>${version.maven-clean-plugin}</version> | ||
<configuration> | ||
<filesets> | ||
<!-- delete logfiles --> | ||
<fileset> | ||
<directory>logs</directory> | ||
<includes> | ||
<include>**/*</include> | ||
</includes> | ||
<followSymlinks>false</followSymlinks> | ||
</fileset> | ||
</filesets> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-maven-plugin</artifactId> | ||
<configuration> | ||
<jvmArguments>${argLine}</jvmArguments> | ||
<jvmArguments>-Dfile.encoding=UTF-8</jvmArguments> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>repackage</id> | ||
<goals> | ||
<goal>repackage</goal> | ||
</goals> | ||
<configuration> | ||
<includeSystemScope>true</includeSystemScope> | ||
<skip>false</skip> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-resources-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>copy-docker-resources</id> | ||
<goals> | ||
<goal>copy-resources</goal> | ||
</goals> | ||
<phase>package</phase> | ||
<configuration> | ||
<!--suppress UnresolvedMavenProperty, MavenModelInspection --> | ||
<skip>${skip.dockerbuild}</skip> | ||
<encoding>UTF-8</encoding> | ||
<outputDirectory>${basedir}/target/tmpdocker</outputDirectory> | ||
<resources> | ||
<resource> | ||
<directory>${basedir}/src/main/docker</directory> | ||
<includes> | ||
<include>**/*</include> | ||
</includes> | ||
</resource> | ||
<resource> | ||
<directory>${basedir}/target</directory> | ||
<includes> | ||
<include>gsi-fedmaster*.jar</include> | ||
</includes> | ||
</resource> | ||
</resources> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>io.fabric8</groupId> | ||
<artifactId>docker-maven-plugin</artifactId> | ||
<version>${version.docker-maven-plugin}</version> | ||
<configuration> | ||
<!--suppress UnresolvedMavenProperty, MavenModelInspection --> | ||
<skip>${skip.dockerbuild}</skip> | ||
<images> | ||
<image> | ||
<build> | ||
<dockerFile>${basedir}/target/tmpdocker/Dockerfile</dockerFile> | ||
<args> | ||
<VERSION>${project.version}</VERSION> | ||
<COMMIT_HASH>${commit_hash}</COMMIT_HASH> | ||
</args> | ||
</build> | ||
<name>${docker.image.name.gsifedmaster}:${project.version}</name> | ||
</image> | ||
</images> | ||
<verbose>true</verbose> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>default</id> | ||
<goals> | ||
<goal>build</goal> | ||
</goals> | ||
<phase>package</phase> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
Oops, something went wrong.