-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Niels Thykier <[email protected]>
- Loading branch information
Niels Thykier
committed
Jun 8, 2022
1 parent
4daedd0
commit cb976bc
Showing
59 changed files
with
730 additions
and
1,605 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
**/*-sources.jar |
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,17 @@ | ||
# https://editorconfig.org/ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_style = space | ||
indent_size = 2 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.{bat,cmd}] | ||
end_of_line = crlf | ||
|
||
[pom.xml] | ||
indent_style = tab | ||
indent_size = 2 |
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 |
---|---|---|
@@ -1,36 +1,69 @@ | ||
name: Microservices CI | ||
name: DCSA-UI-Support MASTER CI | ||
|
||
on: [push] | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Fetch backend | ||
uses: actions/checkout@v2 | ||
with: | ||
path: DCSA-UI-Support | ||
submodules: recursive | ||
- name: Set up Java JDK | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
- name: Cache local Maven repository | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven- | ||
- name: maven-settings-xml-action | ||
uses: whelk-io/maven-settings-xml-action@v12 | ||
with: | ||
repositories: '[{ "id": "github", "name": "DCSA Backend repo", "url": "https://maven.pkg.github.com/dcsaorg/DCSA-Core", "releases": { "enabled": "true" }, "snapshots": { "enabled": "true" } }]' | ||
servers: '[{ "id": "github", "username": "${{ secrets.DCSA_USER }}", "password": "${{ secrets.DCSA_PACKAGES_PAT }}" }]' | ||
|
||
- name: Build API | ||
run: cd DCSA-UI-Support && mvn package -DskipTests -X #Need to skip the tests as they depend on a running DB | ||
|
||
- name: Run the UI Support microservice plus database | ||
run: cd DCSA-UI-Support && docker-compose -f docker-compose.yml up -d -V | ||
|
||
- uses: actions/checkout@v2 | ||
with: | ||
path: DCSA-UI-Support | ||
submodules: recursive | ||
|
||
- name: Set up Java JDK | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 17 | ||
cache: 'maven' | ||
|
||
- name: maven-settings-xml-action | ||
uses: whelk-io/maven-settings-xml-action@v12 | ||
with: | ||
repositories: '[{ "id": "github", "name": "DCSA Backend repo", "url": "https://maven.pkg.github.com/dcsaorg/DCSA-Core", "releases": { "enabled": "true" }, "snapshots": { "enabled": "true" } }]' | ||
servers: '[{ "id": "github", "username": "${{ secrets.DCSA_USER }}", "password": "${{ secrets.DCSA_PACKAGES_PAT }}" }]' | ||
|
||
- name: Build UI-Support | ||
run: cd DCSA-UI-Support && mvn clean -U -B package -Ddcsa.artifacttype=-SNAPSHOT | ||
|
||
- name: Build and run the microservices | ||
run: cd DCSA-UI-Support && docker-compose -f docker-compose.yml up -d -V --build | ||
|
||
- name: Fetch Backend Status | ||
run: | | ||
sleep 10 | ||
status=$(curl -s http://localhost:9091/v1/actuator/health | jq -r '.status') | ||
retries=12 | ||
while [[ "$status" != "UP" ]] && [[ $retries -gt 0 ]]; do | ||
echo "Status is '$status' - waiting 5 secs ($retries retries left)" | ||
sleep 5 | ||
retries=$((retries - 1)) | ||
status=$(curl -s http://localhost:9091/v1/actuator/health | jq -r '.status') | ||
done | ||
echo "Final status is '$status'" | ||
if [[ "$status" != "UP" ]]; then | ||
curl -v http://localhost:9091/v1/actuator/health | ||
docker ps | ||
docker logs dcsa-ui-support_dcsa-ui-support_1 | ||
fi | ||
echo "::set-output name=STATUS::$status" | ||
id: healthcheck | ||
|
||
- name: Confirm microservice status | ||
if: ${{ steps.healthcheck.outputs.STATUS == 'UP' }} | ||
run: | | ||
echo "The DCSA-UI-Support service is UP." | ||
- name: Run Integration Tests | ||
run: | | ||
cd DCSA-UI-Support && java -jar ui-support-integration-tests/target/dcsa-ui-support-integration-tests-with-dependencies.jar |
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
Submodule DCSA-Information-Model
updated
40 files
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 |
---|---|---|
@@ -1,15 +1,9 @@ | ||
FROM debian:buster | ||
FROM eclipse-temurin:17-jre-alpine | ||
|
||
RUN apt-get update \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get -y upgrade \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends \ | ||
openjdk-11-jre-headless \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
EXPOSE 9090 | ||
EXPOSE 9091 | ||
ENV db_hostname dcsa_db | ||
COPY run-in-container.sh /run.sh | ||
RUN chmod +x /run.sh | ||
COPY src/main/resources/application.yaml . | ||
COPY target/dcsa_ui_support-*.jar . | ||
COPY ui-support-service/src/main/resources/application.yml . | ||
COPY ui-support-service/target/dcsa-ui-support-service.jar . | ||
CMD ["/run.sh"] |
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,2 @@ | ||
# This is the top of the project | ||
config.stopBubbling = true |
Oops, something went wrong.