From 3bcfa6bba2393fcb130ebb84e2c2a0d499fb0bf6 Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Thu, 29 Aug 2024 08:35:54 +0200 Subject: [PATCH 01/57] Changes workflow --- .github/workflows/maven_run_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven_run_test.yml b/.github/workflows/maven_run_test.yml index 3da66b4aa..c3646d365 100644 --- a/.github/workflows/maven_run_test.yml +++ b/.github/workflows/maven_run_test.yml @@ -37,7 +37,7 @@ jobs: - name: Start environment run: docker compose --project-directory ./ci up -d --wait - name: Install BaSyx - run: mvn clean install + run: mvn clean install -DskipTests - name: Stop environment if: always() run: docker compose --project-directory ./ci down From abbaf7f9592720a08efca57fb07b314b74eb1784 Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Thu, 29 Aug 2024 09:02:33 +0200 Subject: [PATCH 02/57] Changes workflow --- .github/workflows/maven_run_test.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/maven_run_test.yml b/.github/workflows/maven_run_test.yml index c3646d365..a9280f9bc 100644 --- a/.github/workflows/maven_run_test.yml +++ b/.github/workflows/maven_run_test.yml @@ -24,7 +24,7 @@ on: jobs: - build: + Build-BaSyx: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -41,6 +41,16 @@ jobs: - name: Stop environment if: always() run: docker compose --project-directory ./ci down + Build-Docker-Images: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + cache: maven - name: Build and remove Docker images run: | mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.submodelservice.example" From 89795da1bbdea950cd80929f8fef31aae5a338b4 Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Thu, 29 Aug 2024 09:08:09 +0200 Subject: [PATCH 03/57] Changes workflow --- .github/workflows/maven_run_test.yml | 42 ++++++++++++++++++---------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/.github/workflows/maven_run_test.yml b/.github/workflows/maven_run_test.yml index a9280f9bc..c6db61cfb 100644 --- a/.github/workflows/maven_run_test.yml +++ b/.github/workflows/maven_run_test.yml @@ -51,33 +51,47 @@ jobs: java-version: '17' distribution: 'adopt' cache: maven - - name: Build and remove Docker images + - name: Build Docker Images run: | mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.submodelservice.example" - docker rmi -f $(docker images -aq) mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.submodelrepository.component" - docker rmi -f $(docker images -aq) mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasrepository.component" - docker rmi -f $(docker images -aq) mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasenvironment.component" - docker rmi -f $(docker images -aq) mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.conceptdescriptionrepository.component" - docker rmi -f $(docker images -aq) mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasdiscoveryservice.component" - docker rmi -f $(docker images -aq) mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasxfileserver.component" mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasregistry-service-release-kafka-mem" - docker rmi -f $(docker images -aq) mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasregistry-service-release-kafka-mongodb" - docker rmi -f $(docker images -aq) mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasregistry-service-release-log-mem" - docker rmi -f $(docker images -aq) mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasregistry-service-release-log-mongodb" - docker rmi -f $(docker images -aq) mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.submodelregistry-service-release-kafka-mem" - docker rmi -f $(docker images -aq) mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.submodelregistry-service-release-kafka-mongodb" - docker rmi -f $(docker images -aq) mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.submodelregistry-service-release-log-mem" - docker rmi -f $(docker images -aq) mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.submodelregistry-service-release-log-mongodb" + + - name: Test Docker Images + run: | + images=("basyx.submodelservice.example" "basyx.submodelrepository.component" "basyx.aasrepository.component" "basyx.aasenvironment.component" "basyx.conceptdescriptionrepository.component" "basyx.aasdiscoveryservice.component" "basyx.aasxfileserver.component" "basyx.aasregistry-service-release-kafka-mem" "basyx.aasregistry-service-release-kafka-mongodb" "basyx.aasregistry-service-release-log-mem" "basyx.aasregistry-service-release-log-mongodb" "basyx.submodelregistry-service-release-kafka-mem" "basyx.submodelregistry-service-release-kafka-mongodb" "basyx.submodelregistry-service-release-log-mem" "basyx.submodelregistry-service-release-log-mongodb") + + for image in "${images[@]}"; do + echo "Testing image $image" + docker run -d --name test_$image test/$image + sleep 30 # Give the container some time to start + + # Check if the container is healthy (assuming the Dockerfile defines a HEALTHCHECK) + if [ "$(docker inspect --format='{{.State.Health.Status}}' test_$image)" == "healthy" ]; then + echo "$image started successfully and is healthy." + else + echo "$image failed to start or is unhealthy." + docker logs test_$image + exit 1 + fi + + # Stop and remove the container after testing + docker stop test_$image + docker rm test_$image + done + + - name: Clean up Docker Images + run: | + docker rmi -f $(docker images -aq) \ No newline at end of file From 4c7e2cb2588c08f92ceebee080acd4ec840cd11b Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Thu, 29 Aug 2024 09:13:53 +0200 Subject: [PATCH 04/57] Changes workflow --- .github/workflows/maven_run_test.yml | 125 ++++++++++++++++++++++++++- 1 file changed, 121 insertions(+), 4 deletions(-) diff --git a/.github/workflows/maven_run_test.yml b/.github/workflows/maven_run_test.yml index c6db61cfb..bcaa2356e 100644 --- a/.github/workflows/maven_run_test.yml +++ b/.github/workflows/maven_run_test.yml @@ -41,7 +41,7 @@ jobs: - name: Stop environment if: always() run: docker compose --project-directory ./ci down - Build-Docker-Images: + Build-AAS-CD-Docker-Images: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -53,17 +53,134 @@ jobs: cache: maven - name: Build Docker Images run: | - mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.submodelservice.example" - mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.submodelrepository.component" mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasrepository.component" mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasenvironment.component" mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.conceptdescriptionrepository.component" mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasdiscoveryservice.component" mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasxfileserver.component" + + - name: Test Docker Images + run: | + images=("basyx.aasrepository.component" "basyx.aasenvironment.component" "basyx.conceptdescriptionrepository.component" "basyx.aasdiscoveryservice.component" "basyx.aasxfileserver.component") + + for image in "${images[@]}"; do + echo "Testing image $image" + docker run -d --name test_$image test/$image + sleep 30 # Give the container some time to start + + # Check if the container is healthy (assuming the Dockerfile defines a HEALTHCHECK) + if [ "$(docker inspect --format='{{.State.Health.Status}}' test_$image)" == "healthy" ]; then + echo "$image started successfully and is healthy." + else + echo "$image failed to start or is unhealthy." + docker logs test_$image + exit 1 + fi + + # Stop and remove the container after testing + docker stop test_$image + docker rm test_$image + done + + - name: Clean up Docker Images + run: | + docker rmi -f $(docker images -aq) + Build-Submodel-Docker-Images: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + cache: maven + - name: Build Docker Images + run: | + mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.submodelservice.example" + mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.submodelrepository.component" + + - name: Test Docker Images + run: | + images=("basyx.submodelservice.example" "basyx.submodelrepository.component") + + for image in "${images[@]}"; do + echo "Testing image $image" + docker run -d --name test_$image test/$image + sleep 30 # Give the container some time to start + + # Check if the container is healthy (assuming the Dockerfile defines a HEALTHCHECK) + if [ "$(docker inspect --format='{{.State.Health.Status}}' test_$image)" == "healthy" ]; then + echo "$image started successfully and is healthy." + else + echo "$image failed to start or is unhealthy." + docker logs test_$image + exit 1 + fi + + # Stop and remove the container after testing + docker stop test_$image + docker rm test_$image + done + + - name: Clean up Docker Images + run: | + docker rmi -f $(docker images -aq) + Build-AAS-Registry-Docker-Images: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + cache: maven + - name: Build Docker Images + run: | mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasregistry-service-release-kafka-mem" mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasregistry-service-release-kafka-mongodb" mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasregistry-service-release-log-mem" mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasregistry-service-release-log-mongodb" + + - name: Test Docker Images + run: | + images=("basyx.aasregistry-service-release-kafka-mem" "basyx.aasregistry-service-release-kafka-mongodb" "basyx.aasregistry-service-release-log-mem" "basyx.aasregistry-service-release-log-mongodb") + + for image in "${images[@]}"; do + echo "Testing image $image" + docker run -d --name test_$image test/$image + sleep 30 # Give the container some time to start + + # Check if the container is healthy (assuming the Dockerfile defines a HEALTHCHECK) + if [ "$(docker inspect --format='{{.State.Health.Status}}' test_$image)" == "healthy" ]; then + echo "$image started successfully and is healthy." + else + echo "$image failed to start or is unhealthy." + docker logs test_$image + exit 1 + fi + + # Stop and remove the container after testing + docker stop test_$image + docker rm test_$image + done + + - name: Clean up Docker Images + run: | + docker rmi -f $(docker images -aq) + Build-Submodel-Registry-Docker-Images: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + cache: maven + - name: Build Docker Images + run: | mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.submodelregistry-service-release-kafka-mem" mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.submodelregistry-service-release-kafka-mongodb" mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.submodelregistry-service-release-log-mem" @@ -71,7 +188,7 @@ jobs: - name: Test Docker Images run: | - images=("basyx.submodelservice.example" "basyx.submodelrepository.component" "basyx.aasrepository.component" "basyx.aasenvironment.component" "basyx.conceptdescriptionrepository.component" "basyx.aasdiscoveryservice.component" "basyx.aasxfileserver.component" "basyx.aasregistry-service-release-kafka-mem" "basyx.aasregistry-service-release-kafka-mongodb" "basyx.aasregistry-service-release-log-mem" "basyx.aasregistry-service-release-log-mongodb" "basyx.submodelregistry-service-release-kafka-mem" "basyx.submodelregistry-service-release-kafka-mongodb" "basyx.submodelregistry-service-release-log-mem" "basyx.submodelregistry-service-release-log-mongodb") + images=("basyx.submodelregistry-service-release-kafka-mem" "basyx.submodelregistry-service-release-kafka-mongodb" "basyx.submodelregistry-service-release-log-mem" "basyx.submodelregistry-service-release-log-mongodb") for image in "${images[@]}"; do echo "Testing image $image" From 9393b6eac89e8d1a5d750f49075454cb41b0b840 Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Thu, 29 Aug 2024 09:21:23 +0200 Subject: [PATCH 05/57] Changes workflow --- .github/workflows/maven_run_test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/maven_run_test.yml b/.github/workflows/maven_run_test.yml index bcaa2356e..4a4db7e13 100644 --- a/.github/workflows/maven_run_test.yml +++ b/.github/workflows/maven_run_test.yml @@ -61,7 +61,7 @@ jobs: - name: Test Docker Images run: | - images=("basyx.aasrepository.component" "basyx.aasenvironment.component" "basyx.conceptdescriptionrepository.component" "basyx.aasdiscoveryservice.component" "basyx.aasxfileserver.component") + images=("test/aas-repository" "test/aas-environment" "test/conceptdescription-repository" "test/aas-discovery" "test/aasxfileserver") for image in "${images[@]}"; do echo "Testing image $image" @@ -102,7 +102,7 @@ jobs: - name: Test Docker Images run: | - images=("basyx.submodelservice.example" "basyx.submodelrepository.component") + images=("test/submodel-repository" "test/submodel-service") for image in "${images[@]}"; do echo "Testing image $image" @@ -145,7 +145,7 @@ jobs: - name: Test Docker Images run: | - images=("basyx.aasregistry-service-release-kafka-mem" "basyx.aasregistry-service-release-kafka-mongodb" "basyx.aasregistry-service-release-log-mem" "basyx.aasregistry-service-release-log-mongodb") + images=("test/aas-registry-kafka-mem" "test/aas-registry-kafka-mongodb" "test/aas-registry-log-mem" "test/aas-registry-log-mongodb") for image in "${images[@]}"; do echo "Testing image $image" @@ -188,7 +188,7 @@ jobs: - name: Test Docker Images run: | - images=("basyx.submodelregistry-service-release-kafka-mem" "basyx.submodelregistry-service-release-kafka-mongodb" "basyx.submodelregistry-service-release-log-mem" "basyx.submodelregistry-service-release-log-mongodb") + images=("test/submodel-registry-kafka-mem" "test/submodel-registry-kafka-mongodb" "test/submodel-registry-log-mem" "test/submodel-registry-log-mongodb") for image in "${images[@]}"; do echo "Testing image $image" From 3eabfa61ae79ed2076999575cba752608ec34b5f Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Thu, 29 Aug 2024 09:31:29 +0200 Subject: [PATCH 06/57] Changes workflow --- .github/workflows/maven_run_test.yml | 542 +++++++++++++++++++++------ 1 file changed, 424 insertions(+), 118 deletions(-) diff --git a/.github/workflows/maven_run_test.yml b/.github/workflows/maven_run_test.yml index 4a4db7e13..67e5e9ea7 100644 --- a/.github/workflows/maven_run_test.yml +++ b/.github/workflows/maven_run_test.yml @@ -24,191 +24,497 @@ on: jobs: - Build-BaSyx: + build-test-aas-repository: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Set up JDK 17 uses: actions/setup-java@v4 with: java-version: '17' distribution: 'adopt' cache: maven - - name: Start environment - run: docker compose --project-directory ./ci up -d --wait - - name: Install BaSyx - run: mvn clean install -DskipTests - - name: Stop environment - if: always() - run: docker compose --project-directory ./ci down - Build-AAS-CD-Docker-Images: + + - name: Build AAS Repository Docker Image + run: | + mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasrepository.component" + + - name: Test AAS Repository Docker Image + run: | + docker run -d --name test_aas_repository test/aas-repository + sleep 30 + if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aas_repository)" == "healthy" ]; then + echo "AAS Repository started successfully and is healthy." + else + echo "AAS Repository failed to start or is unhealthy." + docker logs test_aas_repository + exit 1 + fi + docker stop test_aas_repository + docker rm test_aas_repository + + - name: Clean up Docker Image + run: docker rmi -f $(docker images -aq) + + build-test-aas-environment: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Set up JDK 17 uses: actions/setup-java@v4 with: java-version: '17' distribution: 'adopt' cache: maven - - name: Build Docker Images + + - name: Build AAS Environment Docker Image run: | - mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasrepository.component" mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasenvironment.component" + + - name: Test AAS Environment Docker Image + run: | + docker run -d --name test_aas_environment test/aas-environment + sleep 30 + if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aas_environment)" == "healthy" ]; then + echo "AAS Environment started successfully and is healthy." + else + echo "AAS Environment failed to start or is unhealthy." + docker logs test_aas_environment + exit 1 + fi + docker stop test_aas_environment + docker rm test_aas_environment + + - name: Clean up Docker Image + run: docker rmi -f $(docker images -aq) + + build-test-concept-description-repository: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + cache: maven + + - name: Build Concept Description Repository Docker Image + run: | mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.conceptdescriptionrepository.component" + + - name: Test Concept Description Repository Docker Image + run: | + docker run -d --name test_conceptdescription_repository test/conceptdescription-repository + sleep 30 + if [ "$(docker inspect --format='{{.State.Health.Status}}' test_conceptdescription_repository)" == "healthy" ]; then + echo "Concept Description Repository started successfully and is healthy." + else + echo "Concept Description Repository failed to start or is unhealthy." + docker logs test_conceptdescription_repository + exit 1 + fi + docker stop test_conceptdescription_repository + docker rm test_conceptdescription_repository + + - name: Clean up Docker Image + run: docker rmi -f $(docker images -aq) + + build-test-aas-discovery: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + cache: maven + + - name: Build AAS Discovery Docker Image + run: | mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasdiscoveryservice.component" + + - name: Test AAS Discovery Docker Image + run: | + docker run -d --name test_aas_discovery test/aas-discovery + sleep 30 + if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aas_discovery)" == "healthy" ]; then + echo "AAS Discovery started successfully and is healthy." + else + echo "AAS Discovery failed to start or is unhealthy." + docker logs test_aas_discovery + exit 1 + fi + docker stop test_aas_discovery + docker rm test_aas_discovery + + - name: Clean up Docker Image + run: docker rmi -f $(docker images -aq) + + build-test-aasx-fileserver: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + cache: maven + + - name: Build AASX File Server Docker Image + run: | mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasxfileserver.component" - - name: Test Docker Images - run: | - images=("test/aas-repository" "test/aas-environment" "test/conceptdescription-repository" "test/aas-discovery" "test/aasxfileserver") - - for image in "${images[@]}"; do - echo "Testing image $image" - docker run -d --name test_$image test/$image - sleep 30 # Give the container some time to start - - # Check if the container is healthy (assuming the Dockerfile defines a HEALTHCHECK) - if [ "$(docker inspect --format='{{.State.Health.Status}}' test_$image)" == "healthy" ]; then - echo "$image started successfully and is healthy." - else - echo "$image failed to start or is unhealthy." - docker logs test_$image - exit 1 - fi - - # Stop and remove the container after testing - docker stop test_$image - docker rm test_$image - done - - - name: Clean up Docker Images - run: | - docker rmi -f $(docker images -aq) - Build-Submodel-Docker-Images: + - name: Test AASX File Server Docker Image + run: | + docker run -d --name test_aasxfileserver test/aasxfileserver + sleep 30 + if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aasxfileserver)" == "healthy" ]; then + echo "AASX File Server started successfully and is healthy." + else + echo "AASX File Server failed to start or is unhealthy." + docker logs test_aasxfileserver + exit 1 + fi + docker stop test_aasxfileserver + docker rm test_aasxfileserver + + - name: Clean up Docker Image + run: docker rmi -f $(docker images -aq) + + build-test-submodel-repository: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Set up JDK 17 uses: actions/setup-java@v4 with: java-version: '17' distribution: 'adopt' cache: maven - - name: Build Docker Images + + - name: Build Submodel Repository Docker Image run: | - mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.submodelservice.example" mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.submodelrepository.component" - - name: Test Docker Images - run: | - images=("test/submodel-repository" "test/submodel-service") - - for image in "${images[@]}"; do - echo "Testing image $image" - docker run -d --name test_$image test/$image - sleep 30 # Give the container some time to start - - # Check if the container is healthy (assuming the Dockerfile defines a HEALTHCHECK) - if [ "$(docker inspect --format='{{.State.Health.Status}}' test_$image)" == "healthy" ]; then - echo "$image started successfully and is healthy." - else - echo "$image failed to start or is unhealthy." - docker logs test_$image - exit 1 - fi - - # Stop and remove the container after testing - docker stop test_$image - docker rm test_$image - done - - - name: Clean up Docker Images - run: | - docker rmi -f $(docker images -aq) - Build-AAS-Registry-Docker-Images: + - name: Test Submodel Repository Docker Image + run: | + docker run -d --name test_submodel_repository test/submodel-repository + sleep 30 + if [ "$(docker inspect --format='{{.State.Health.Status}}' test_submodel_repository)" == "healthy" ]; then + echo "Submodel Repository started successfully and is healthy." + else + echo "Submodel Repository failed to start or is unhealthy." + docker logs test_submodel_repository + exit 1 + fi + docker stop test_submodel_repository + docker rm test_submodel_repository + + - name: Clean up Docker Image + run: docker rmi -f $(docker images -aq) + + build-test-submodel-service: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Set up JDK 17 uses: actions/setup-java@v4 with: java-version: '17' distribution: 'adopt' cache: maven - - name: Build Docker Images + + - name: Build Submodel Service Docker Image + run: | + mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.submodelservice.example" + + - name: Test Submodel Service Docker Image + run: | + docker run -d --name test_submodel_service test/submodel-service + sleep 30 + if [ "$(docker inspect --format='{{.State.Health.Status}}' test_submodel_service)" == "healthy" ]; then + echo "Submodel Service started successfully and is healthy." + else + echo "Submodel Service failed to start or is unhealthy." + docker logs test_submodel_service + exit 1 + fi + docker stop test_submodel_service + docker rm test_submodel_service + + - name: Clean up Docker Image + run: docker rmi -f $(docker images -aq) + + build-test-aas-registry-kafka-mem: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + cache: maven + + - name: Build AAS Registry Kafka Mem Docker Image run: | mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasregistry-service-release-kafka-mem" + + - name: Test AAS Registry Kafka Mem Docker Image + run: | + docker run -d --name test_aas_registry_kafka_mem test/aas-registry-kafka-mem + sleep 30 + if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aas_registry_kafka_mem)" == "healthy" ]; then + echo "AAS Registry Kafka Mem started successfully and is healthy." + else + echo "AAS Registry Kafka Mem failed to start or is unhealthy." + docker logs test_aas_registry_kafka_mem + exit 1 + fi + docker stop test_aas_registry_kafka_mem + docker rm test_aas_registry_kafka_mem + + - name: Clean up Docker Image + run: docker rmi -f $(docker images -aq) + + build-test-aas-registry-kafka-mongodb: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + cache: maven + + - name: Build AAS Registry Kafka MongoDB Docker Image + run: | mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasregistry-service-release-kafka-mongodb" + + - name: Test AAS Registry Kafka MongoDB Docker Image + run: | + docker run -d --name test_aas_registry_kafka_mongodb test/aas-registry-kafka-mongodb + sleep 30 + if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aas_registry_kafka_mongodb)" == "healthy" ]; then + echo "AAS Registry Kafka MongoDB started successfully and is healthy." + else + echo "AAS Registry Kafka MongoDB failed to start or is unhealthy." + docker logs test_aas_registry_kafka_mongodb + exit 1 + fi + docker stop test_aas_registry_kafka_mongodb + docker rm test_aas_registry_kafka_mongodb + + - name: Clean up Docker Image + run: docker rmi -f $(docker images -aq) + + build-test-aas-registry-log-mem: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + cache: maven + + - name: Build AAS Registry Log Mem Docker Image + run: | mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasregistry-service-release-log-mem" + + - name: Test AAS Registry Log Mem Docker Image + run: | + docker run -d --name test_aas_registry_log_mem test/aas-registry-log-mem + sleep 30 + if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aas_registry_log_mem)" == "healthy" ]; then + echo "AAS Registry Log Mem started successfully and is healthy." + else + echo "AAS Registry Log Mem failed to start or is unhealthy." + docker logs test_aas_registry_log_mem + exit 1 + fi + docker stop test_aas_registry_log_mem + docker rm test_aas_registry_log_mem + + - name: Clean up Docker Image + run: docker rmi -f $(docker images -aq) + + build-test-aas-registry-log-mongodb: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + cache: maven + + - name: Build AAS Registry Log MongoDB Docker Image + run: | mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasregistry-service-release-log-mongodb" - - name: Test Docker Images - run: | - images=("test/aas-registry-kafka-mem" "test/aas-registry-kafka-mongodb" "test/aas-registry-log-mem" "test/aas-registry-log-mongodb") - - for image in "${images[@]}"; do - echo "Testing image $image" - docker run -d --name test_$image test/$image - sleep 30 # Give the container some time to start - - # Check if the container is healthy (assuming the Dockerfile defines a HEALTHCHECK) - if [ "$(docker inspect --format='{{.State.Health.Status}}' test_$image)" == "healthy" ]; then - echo "$image started successfully and is healthy." - else - echo "$image failed to start or is unhealthy." - docker logs test_$image - exit 1 - fi - - # Stop and remove the container after testing - docker stop test_$image - docker rm test_$image - done - - - name: Clean up Docker Images - run: | - docker rmi -f $(docker images -aq) - Build-Submodel-Registry-Docker-Images: + - name: Test AAS Registry Log MongoDB Docker Image + run: | + docker run -d --name test_aas_registry_log_mongodb test/aas-registry-log-mongodb + sleep 30 + if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aas_registry_log_mongodb)" == "healthy" ]; then + echo "AAS Registry Log MongoDB started successfully and is healthy." + else + echo "AAS Registry Log MongoDB failed to start or is unhealthy." + docker logs test_aas_registry_log_mongodb + exit 1 + fi + docker stop test_aas_registry_log_mongodb + docker rm test_aas_registry_log_mongodb + + - name: Clean up Docker Image + run: docker rmi -f $(docker images -aq) + + build-test-submodel-registry-kafka-mem: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Set up JDK 17 uses: actions/setup-java@v4 with: java-version: '17' distribution: 'adopt' cache: maven - - name: Build Docker Images + + - name: Build Submodel Registry Kafka Mem Docker Image run: | mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.submodelregistry-service-release-kafka-mem" + + - name: Test Submodel Registry Kafka Mem Docker Image + run: | + docker run -d --name test_submodel_registry_kafka_mem test/submodel-registry-kafka-mem + sleep 30 + if [ "$(docker inspect --format='{{.State.Health.Status}}' test_submodel_registry_kafka_mem)" == "healthy" ]; then + echo "Submodel Registry Kafka Mem started successfully and is healthy." + else + echo "Submodel Registry Kafka Mem failed to start or is unhealthy." + docker logs test_submodel_registry_kafka_mem + exit 1 + fi + docker stop test_submodel_registry_kafka_mem + docker rm test_submodel_registry_kafka_mem + + - name: Clean up Docker Image + run: docker rmi -f $(docker images -aq) + + build-test-submodel-registry-kafka-mongodb: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + cache: maven + + - name: Build Submodel Registry Kafka MongoDB Docker Image + run: | mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.submodelregistry-service-release-kafka-mongodb" + + - name: Test Submodel Registry Kafka MongoDB Docker Image + run: | + docker run -d --name test_submodel_registry_kafka_mongodb test/submodel-registry-kafka-mongodb + sleep 30 + if [ "$(docker inspect --format='{{.State.Health.Status}}' test_submodel_registry_kafka_mongodb)" == "healthy" ]; then + echo "Submodel Registry Kafka MongoDB started successfully and is healthy." + else + echo "Submodel Registry Kafka MongoDB failed to start or is unhealthy." + docker logs test_submodel_registry_kafka_mongodb + exit 1 + fi + docker stop test_submodel_registry_kafka_mongodb + docker rm test_submodel_registry_kafka_mongodb + + - name: Clean up Docker Image + run: docker rmi -f $(docker images -aq) + + build-test-submodel-registry-log-mem: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + cache: maven + + - name: Build Submodel Registry Log Mem Docker Image + run: | mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.submodelregistry-service-release-log-mem" - mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.submodelregistry-service-release-log-mongodb" - - name: Test Docker Images + - name: Test Submodel Registry Log Mem Docker Image run: | - images=("test/submodel-registry-kafka-mem" "test/submodel-registry-kafka-mongodb" "test/submodel-registry-log-mem" "test/submodel-registry-log-mongodb") - - for image in "${images[@]}"; do - echo "Testing image $image" - docker run -d --name test_$image test/$image - sleep 30 # Give the container some time to start + docker run -d --name test_submodel_registry_log_mem test/submodel-registry-log-mem + sleep 30 + if [ "$(docker inspect --format='{{.State.Health.Status}}' test_submodel_registry_log_mem)" == "healthy" ]; then + echo "Submodel Registry Log Mem started successfully and is healthy." + else + echo "Submodel Registry Log Mem failed to start or is unhealthy." + docker logs test_submodel_registry_log_mem + exit 1 + fi + docker stop test_submodel_registry_log_mem + docker rm test_submodel_registry_log_mem - # Check if the container is healthy (assuming the Dockerfile defines a HEALTHCHECK) - if [ "$(docker inspect --format='{{.State.Health.Status}}' test_$image)" == "healthy" ]; then - echo "$image started successfully and is healthy." - else - echo "$image failed to start or is unhealthy." - docker logs test_$image - exit 1 - fi + - name: Clean up Docker Image + run: docker rmi -f $(docker images -aq) - # Stop and remove the container after testing - docker stop test_$image - docker rm test_$image - done + build-test-submodel-registry-log-mongodb: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 - - name: Clean up Docker Images + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + cache: maven + + - name: Build Submodel Registry Log MongoDB Docker Image run: | - docker rmi -f $(docker images -aq) \ No newline at end of file + mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.submodelregistry-service-release-log-mongodb" + + - name: Test Submodel Registry Log MongoDB Docker Image + run: | + docker run -d --name test_submodel_registry_log_mongodb test/submodel-registry-log-mongodb + sleep 30 + if [ "$(docker inspect --format='{{.State.Health.Status}}' test_submodel_registry_log_mongodb)" == "healthy" ]; then + echo "Submodel Registry Log MongoDB started successfully and is healthy." + else + echo "Submodel Registry Log MongoDB failed to start or is unhealthy." + docker logs test_submodel_registry_log_mongodb + exit 1 + fi + docker stop test_submodel_registry_log_mongodb + docker rm test_submodel_registry_log_mongodb + + - name: Clean up Docker Image + run: docker rmi -f $(docker images -aq) \ No newline at end of file From 5bca25ac0035efc426a22228f313d30f2d95ce35 Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Thu, 29 Aug 2024 09:35:43 +0200 Subject: [PATCH 07/57] Changes workflow --- .github/workflows/maven_run_test.yml | 32 +++++++++++++++------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/.github/workflows/maven_run_test.yml b/.github/workflows/maven_run_test.yml index 67e5e9ea7..8b596157f 100644 --- a/.github/workflows/maven_run_test.yml +++ b/.github/workflows/maven_run_test.yml @@ -22,6 +22,8 @@ on: - 'LICENSE' - 'NOTICE' +env: + VERSION: 2.0.0-SNAPSHOT jobs: build-test-aas-repository: @@ -42,7 +44,7 @@ jobs: - name: Test AAS Repository Docker Image run: | - docker run -d --name test_aas_repository test/aas-repository + docker run -d --name test_aas_repository test/aas-repository:${VERSION} sleep 30 if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aas_repository)" == "healthy" ]; then echo "AAS Repository started successfully and is healthy." @@ -75,7 +77,7 @@ jobs: - name: Test AAS Environment Docker Image run: | - docker run -d --name test_aas_environment test/aas-environment + docker run -d --name test_aas_environment test/aas-environment:${VERSION} sleep 30 if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aas_environment)" == "healthy" ]; then echo "AAS Environment started successfully and is healthy." @@ -108,7 +110,7 @@ jobs: - name: Test Concept Description Repository Docker Image run: | - docker run -d --name test_conceptdescription_repository test/conceptdescription-repository + docker run -d --name test_conceptdescription_repository test/conceptdescription-repository:${VERSION} sleep 30 if [ "$(docker inspect --format='{{.State.Health.Status}}' test_conceptdescription_repository)" == "healthy" ]; then echo "Concept Description Repository started successfully and is healthy." @@ -141,7 +143,7 @@ jobs: - name: Test AAS Discovery Docker Image run: | - docker run -d --name test_aas_discovery test/aas-discovery + docker run -d --name test_aas_discovery test/aas-discovery:${VERSION} sleep 30 if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aas_discovery)" == "healthy" ]; then echo "AAS Discovery started successfully and is healthy." @@ -174,7 +176,7 @@ jobs: - name: Test AASX File Server Docker Image run: | - docker run -d --name test_aasxfileserver test/aasxfileserver + docker run -d --name test_aasxfileserver test/aasxfileserver:${VERSION} sleep 30 if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aasxfileserver)" == "healthy" ]; then echo "AASX File Server started successfully and is healthy." @@ -207,7 +209,7 @@ jobs: - name: Test Submodel Repository Docker Image run: | - docker run -d --name test_submodel_repository test/submodel-repository + docker run -d --name test_submodel_repository test/submodel-repository:${VERSION} sleep 30 if [ "$(docker inspect --format='{{.State.Health.Status}}' test_submodel_repository)" == "healthy" ]; then echo "Submodel Repository started successfully and is healthy." @@ -240,7 +242,7 @@ jobs: - name: Test Submodel Service Docker Image run: | - docker run -d --name test_submodel_service test/submodel-service + docker run -d --name test_submodel_service test/submodel-service:${VERSION} sleep 30 if [ "$(docker inspect --format='{{.State.Health.Status}}' test_submodel_service)" == "healthy" ]; then echo "Submodel Service started successfully and is healthy." @@ -273,7 +275,7 @@ jobs: - name: Test AAS Registry Kafka Mem Docker Image run: | - docker run -d --name test_aas_registry_kafka_mem test/aas-registry-kafka-mem + docker run -d --name test_aas_registry_kafka_mem test/aas-registry-kafka-mem:${VERSION} sleep 30 if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aas_registry_kafka_mem)" == "healthy" ]; then echo "AAS Registry Kafka Mem started successfully and is healthy." @@ -306,7 +308,7 @@ jobs: - name: Test AAS Registry Kafka MongoDB Docker Image run: | - docker run -d --name test_aas_registry_kafka_mongodb test/aas-registry-kafka-mongodb + docker run -d --name test_aas_registry_kafka_mongodb test/aas-registry-kafka-mongodb:${VERSION} sleep 30 if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aas_registry_kafka_mongodb)" == "healthy" ]; then echo "AAS Registry Kafka MongoDB started successfully and is healthy." @@ -339,7 +341,7 @@ jobs: - name: Test AAS Registry Log Mem Docker Image run: | - docker run -d --name test_aas_registry_log_mem test/aas-registry-log-mem + docker run -d --name test_aas_registry_log_mem test/aas-registry-log-mem:${VERSION} sleep 30 if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aas_registry_log_mem)" == "healthy" ]; then echo "AAS Registry Log Mem started successfully and is healthy." @@ -372,7 +374,7 @@ jobs: - name: Test AAS Registry Log MongoDB Docker Image run: | - docker run -d --name test_aas_registry_log_mongodb test/aas-registry-log-mongodb + docker run -d --name test_aas_registry_log_mongodb test/aas-registry-log-mongodb:${VERSION} sleep 30 if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aas_registry_log_mongodb)" == "healthy" ]; then echo "AAS Registry Log MongoDB started successfully and is healthy." @@ -405,7 +407,7 @@ jobs: - name: Test Submodel Registry Kafka Mem Docker Image run: | - docker run -d --name test_submodel_registry_kafka_mem test/submodel-registry-kafka-mem + docker run -d --name test_submodel_registry_kafka_mem test/submodel-registry-kafka-mem:${VERSION} sleep 30 if [ "$(docker inspect --format='{{.State.Health.Status}}' test_submodel_registry_kafka_mem)" == "healthy" ]; then echo "Submodel Registry Kafka Mem started successfully and is healthy." @@ -438,7 +440,7 @@ jobs: - name: Test Submodel Registry Kafka MongoDB Docker Image run: | - docker run -d --name test_submodel_registry_kafka_mongodb test/submodel-registry-kafka-mongodb + docker run -d --name test_submodel_registry_kafka_mongodb test/submodel-registry-kafka-mongodb:${VERSION} sleep 30 if [ "$(docker inspect --format='{{.State.Health.Status}}' test_submodel_registry_kafka_mongodb)" == "healthy" ]; then echo "Submodel Registry Kafka MongoDB started successfully and is healthy." @@ -471,7 +473,7 @@ jobs: - name: Test Submodel Registry Log Mem Docker Image run: | - docker run -d --name test_submodel_registry_log_mem test/submodel-registry-log-mem + docker run -d --name test_submodel_registry_log_mem test/submodel-registry-log-mem:${VERSION} sleep 30 if [ "$(docker inspect --format='{{.State.Health.Status}}' test_submodel_registry_log_mem)" == "healthy" ]; then echo "Submodel Registry Log Mem started successfully and is healthy." @@ -504,7 +506,7 @@ jobs: - name: Test Submodel Registry Log MongoDB Docker Image run: | - docker run -d --name test_submodel_registry_log_mongodb test/submodel-registry-log-mongodb + docker run -d --name test_submodel_registry_log_mongodb test/submodel-registry-log-mongodb:${VERSION} sleep 30 if [ "$(docker inspect --format='{{.State.Health.Status}}' test_submodel_registry_log_mongodb)" == "healthy" ]; then echo "Submodel Registry Log MongoDB started successfully and is healthy." From ba9bf8ba4cc5e458d66837cb13138df060dc5c5a Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Thu, 29 Aug 2024 09:37:20 +0200 Subject: [PATCH 08/57] Changes workflow --- .github/workflows/maven_run_test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/maven_run_test.yml b/.github/workflows/maven_run_test.yml index 8b596157f..8bc8efe5f 100644 --- a/.github/workflows/maven_run_test.yml +++ b/.github/workflows/maven_run_test.yml @@ -176,6 +176,7 @@ jobs: - name: Test AASX File Server Docker Image run: | + docker images -aq docker run -d --name test_aasxfileserver test/aasxfileserver:${VERSION} sleep 30 if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aasxfileserver)" == "healthy" ]; then From ae44b69e5ed9b747d5bb44e78b57cfa2b09df599 Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Thu, 29 Aug 2024 09:40:22 +0200 Subject: [PATCH 09/57] Changes workflow --- .github/workflows/maven_run_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven_run_test.yml b/.github/workflows/maven_run_test.yml index 8bc8efe5f..bc2f3d01b 100644 --- a/.github/workflows/maven_run_test.yml +++ b/.github/workflows/maven_run_test.yml @@ -176,7 +176,7 @@ jobs: - name: Test AASX File Server Docker Image run: | - docker images -aq + docker images docker run -d --name test_aasxfileserver test/aasxfileserver:${VERSION} sleep 30 if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aasxfileserver)" == "healthy" ]; then From 506c8a201385182acb22b87a5d8cea3c2a2a8f13 Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Thu, 29 Aug 2024 11:26:24 +0200 Subject: [PATCH 10/57] Changes workflow --- .github/workflows/maven_run_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven_run_test.yml b/.github/workflows/maven_run_test.yml index bc2f3d01b..3e7f2e885 100644 --- a/.github/workflows/maven_run_test.yml +++ b/.github/workflows/maven_run_test.yml @@ -210,7 +210,7 @@ jobs: - name: Test Submodel Repository Docker Image run: | - docker run -d --name test_submodel_repository test/submodel-repository:${VERSION} + docker run -p 8081:8081 -d --name test_submodel_repository test/submodel-repository:${VERSION} sleep 30 if [ "$(docker inspect --format='{{.State.Health.Status}}' test_submodel_repository)" == "healthy" ]; then echo "Submodel Repository started successfully and is healthy." From 4e84b281694fe53fc9b0808a0f9c99b79d3bceda Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Thu, 29 Aug 2024 11:30:24 +0200 Subject: [PATCH 11/57] Changes workflow --- .github/workflows/maven_run_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven_run_test.yml b/.github/workflows/maven_run_test.yml index 3e7f2e885..7268ace04 100644 --- a/.github/workflows/maven_run_test.yml +++ b/.github/workflows/maven_run_test.yml @@ -211,7 +211,7 @@ jobs: - name: Test Submodel Repository Docker Image run: | docker run -p 8081:8081 -d --name test_submodel_repository test/submodel-repository:${VERSION} - sleep 30 + sleep 300 if [ "$(docker inspect --format='{{.State.Health.Status}}' test_submodel_repository)" == "healthy" ]; then echo "Submodel Repository started successfully and is healthy." else From a010b662873fbc9b6782f8e86b2acb27da54a4c7 Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Thu, 29 Aug 2024 11:35:14 +0200 Subject: [PATCH 12/57] Changes workflow --- .github/workflows/maven_run_test.yml | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/.github/workflows/maven_run_test.yml b/.github/workflows/maven_run_test.yml index 7268ace04..4f58db07f 100644 --- a/.github/workflows/maven_run_test.yml +++ b/.github/workflows/maven_run_test.yml @@ -211,14 +211,32 @@ jobs: - name: Test Submodel Repository Docker Image run: | docker run -p 8081:8081 -d --name test_submodel_repository test/submodel-repository:${VERSION} - sleep 300 - if [ "$(docker inspect --format='{{.State.Health.Status}}' test_submodel_repository)" == "healthy" ]; then - echo "Submodel Repository started successfully and is healthy." - else - echo "Submodel Repository failed to start or is unhealthy." + + # Initialize variables + max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) + sleep_interval=5 # Interval in seconds between checks + check_count=0 + + # Loop to check health status + while [ $check_count -lt $max_checks ]; do + if [ "$(docker inspect --format='{{.State.Health.Status}}' test_submodel_repository)" == "healthy" ]; then + echo "Submodel Repository started successfully and is healthy." + break + else + echo "Waiting for Submodel Repository to become healthy..." + check_count=$((check_count + 1)) + sleep $sleep_interval + fi + done + + # If the container is still not healthy after the loop + if [ $check_count -eq $max_checks ]; then + echo "Submodel Repository failed to start or is unhealthy after 2 minutes." docker logs test_submodel_repository exit 1 fi + + # Stop and remove the container after testing docker stop test_submodel_repository docker rm test_submodel_repository From ae3da74e2e0fd97c9617f31783e45aba2c511e83 Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Thu, 29 Aug 2024 11:43:36 +0200 Subject: [PATCH 13/57] Changes workflow --- .github/workflows/maven_run_test.yml | 405 ++++++++++++++++++++++----- 1 file changed, 328 insertions(+), 77 deletions(-) diff --git a/.github/workflows/maven_run_test.yml b/.github/workflows/maven_run_test.yml index 4f58db07f..78a39fa96 100644 --- a/.github/workflows/maven_run_test.yml +++ b/.github/workflows/maven_run_test.yml @@ -45,14 +45,32 @@ jobs: - name: Test AAS Repository Docker Image run: | docker run -d --name test_aas_repository test/aas-repository:${VERSION} - sleep 30 - if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aas_repository)" == "healthy" ]; then - echo "AAS Repository started successfully and is healthy." - else - echo "AAS Repository failed to start or is unhealthy." + + # Initialize variables + max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) + sleep_interval=5 # Interval in seconds between checks + check_count=0 + + # Loop to check health status + while [ $check_count -lt $max_checks ]; do + if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aas_repository)" == "healthy" ]; then + echo "AAS Repository started successfully and is healthy." + break + else + echo "Waiting for AAS Repository to become healthy..." + check_count=$((check_count + 1)) + sleep $sleep_interval + fi + done + + # If the container is still not healthy after the loop + if [ $check_count -eq $max_checks ]; then + echo "AAS Repository failed to start or is unhealthy after 2 minutes." docker logs test_aas_repository exit 1 fi + + # Stop and remove the container after testing docker stop test_aas_repository docker rm test_aas_repository @@ -78,14 +96,32 @@ jobs: - name: Test AAS Environment Docker Image run: | docker run -d --name test_aas_environment test/aas-environment:${VERSION} - sleep 30 - if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aas_environment)" == "healthy" ]; then - echo "AAS Environment started successfully and is healthy." - else - echo "AAS Environment failed to start or is unhealthy." + + # Initialize variables + max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) + sleep_interval=5 # Interval in seconds between checks + check_count=0 + + # Loop to check health status + while [ $check_count -lt $max_checks ]; do + if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aas_environment)" == "healthy" ]; then + echo "AAS Environment started successfully and is healthy." + break + else + echo "Waiting for AAS Environment to become healthy..." + check_count=$((check_count + 1)) + sleep $sleep_interval + fi + done + + # If the container is still not healthy after the loop + if [ $check_count -eq $max_checks ]; then + echo "AAS Environment failed to start or is unhealthy after 2 minutes." docker logs test_aas_environment exit 1 fi + + # Stop and remove the container after testing docker stop test_aas_environment docker rm test_aas_environment @@ -111,14 +147,32 @@ jobs: - name: Test Concept Description Repository Docker Image run: | docker run -d --name test_conceptdescription_repository test/conceptdescription-repository:${VERSION} - sleep 30 - if [ "$(docker inspect --format='{{.State.Health.Status}}' test_conceptdescription_repository)" == "healthy" ]; then - echo "Concept Description Repository started successfully and is healthy." - else - echo "Concept Description Repository failed to start or is unhealthy." + + # Initialize variables + max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) + sleep_interval=5 # Interval in seconds between checks + check_count=0 + + # Loop to check health status + while [ $check_count -lt $max_checks ]; do + if [ "$(docker inspect --format='{{.State.Health.Status}}' test_conceptdescription_repository)" == "healthy" ]; then + echo "Concept Description Repository started successfully and is healthy." + break + else + echo "Waiting for Concept Description Repository to become healthy..." + check_count=$((check_count + 1)) + sleep $sleep_interval + fi + done + + # If the container is still not healthy after the loop + if [ $check_count -eq $max_checks ]; then + echo "Concept Description Repository failed to start or is unhealthy after 2 minutes." docker logs test_conceptdescription_repository exit 1 fi + + # Stop and remove the container after testing docker stop test_conceptdescription_repository docker rm test_conceptdescription_repository @@ -144,14 +198,32 @@ jobs: - name: Test AAS Discovery Docker Image run: | docker run -d --name test_aas_discovery test/aas-discovery:${VERSION} - sleep 30 - if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aas_discovery)" == "healthy" ]; then - echo "AAS Discovery started successfully and is healthy." - else - echo "AAS Discovery failed to start or is unhealthy." + + # Initialize variables + max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) + sleep_interval=5 # Interval in seconds between checks + check_count=0 + + # Loop to check health status + while [ $check_count -lt $max_checks ]; do + if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aas_discovery)" == "healthy" ]; then + echo "AAS Discovery started successfully and is healthy." + break + else + echo "Waiting for AAS Discovery to become healthy..." + check_count=$((check_count + 1)) + sleep $sleep_interval + fi + done + + # If the container is still not healthy after the loop + if [ $check_count -eq $max_checks ]; then + echo "AAS Discovery failed to start or is unhealthy after 2 minutes." docker logs test_aas_discovery exit 1 fi + + # Stop and remove the container after testing docker stop test_aas_discovery docker rm test_aas_discovery @@ -176,16 +248,33 @@ jobs: - name: Test AASX File Server Docker Image run: | - docker images docker run -d --name test_aasxfileserver test/aasxfileserver:${VERSION} - sleep 30 - if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aasxfileserver)" == "healthy" ]; then - echo "AASX File Server started successfully and is healthy." - else - echo "AASX File Server failed to start or is unhealthy." + + # Initialize variables + max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) + sleep_interval=5 # Interval in seconds between checks + check_count=0 + + # Loop to check health status + while [ $check_count -lt $max_checks ]; do + if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aasxfileserver)" == "healthy" ]; then + echo "AASX File Server started successfully and is healthy." + break + else + echo "Waiting for AASX File Server to become healthy..." + check_count=$((check_count + 1)) + sleep $sleep_interval + fi + done + + # If the container is still not healthy after the loop + if [ $check_count -eq $max_checks ]; then + echo "AASX File Server failed to start or is unhealthy after 2 minutes." docker logs test_aasxfileserver exit 1 fi + + # Stop and remove the container after testing docker stop test_aasxfileserver docker rm test_aasxfileserver @@ -211,31 +300,31 @@ jobs: - name: Test Submodel Repository Docker Image run: | docker run -p 8081:8081 -d --name test_submodel_repository test/submodel-repository:${VERSION} - + # Initialize variables max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) sleep_interval=5 # Interval in seconds between checks check_count=0 - + # Loop to check health status while [ $check_count -lt $max_checks ]; do if [ "$(docker inspect --format='{{.State.Health.Status}}' test_submodel_repository)" == "healthy" ]; then echo "Submodel Repository started successfully and is healthy." break - else + else echo "Waiting for Submodel Repository to become healthy..." check_count=$((check_count + 1)) sleep $sleep_interval fi done - + # If the container is still not healthy after the loop if [ $check_count -eq $max_checks ]; then echo "Submodel Repository failed to start or is unhealthy after 2 minutes." docker logs test_submodel_repository exit 1 fi - + # Stop and remove the container after testing docker stop test_submodel_repository docker rm test_submodel_repository @@ -262,14 +351,32 @@ jobs: - name: Test Submodel Service Docker Image run: | docker run -d --name test_submodel_service test/submodel-service:${VERSION} - sleep 30 - if [ "$(docker inspect --format='{{.State.Health.Status}}' test_submodel_service)" == "healthy" ]; then - echo "Submodel Service started successfully and is healthy." - else - echo "Submodel Service failed to start or is unhealthy." + + # Initialize variables + max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) + sleep_interval=5 # Interval in seconds between checks + check_count=0 + + # Loop to check health status + while [ $check_count -lt $max_checks]; do + if [ "$(docker inspect --format='{{.State.Health.Status}}' test_submodel_service)" == "healthy" ]; then + echo "Submodel Service started successfully and is healthy." + break + else + echo "Waiting for Submodel Service to become healthy..." + check_count=$((check_count + 1)) + sleep $sleep_interval + fi + done + + # If the container is still not healthy after the loop + if [ $check_count -eq $max_checks ]; then + echo "Submodel Service failed to start or is unhealthy after 2 minutes." docker logs test_submodel_service exit 1 fi + + # Stop and remove the container after testing docker stop test_submodel_service docker rm test_submodel_service @@ -295,14 +402,32 @@ jobs: - name: Test AAS Registry Kafka Mem Docker Image run: | docker run -d --name test_aas_registry_kafka_mem test/aas-registry-kafka-mem:${VERSION} - sleep 30 - if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aas_registry_kafka_mem)" == "healthy" ]; then - echo "AAS Registry Kafka Mem started successfully and is healthy." - else - echo "AAS Registry Kafka Mem failed to start or is unhealthy." + + # Initialize variables + max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) + sleep_interval=5 # Interval in seconds between checks + check_count=0 + + # Loop to check health status + while [ $check_count -lt $max_checks ]; do + if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aas_registry_kafka_mem)" == "healthy" ]; then + echo "AAS Registry Kafka Mem started successfully and is healthy." + break + else + echo "Waiting for AAS Registry Kafka Mem to become healthy..." + check_count=$((check_count + 1)) + sleep $sleep_interval + fi + done + + # If the container is still not healthy after the loop + if [ $check_count -eq $max_checks ]; then + echo "AAS Registry Kafka Mem failed to start or is unhealthy after 2 minutes." docker logs test_aas_registry_kafka_mem exit 1 fi + + # Stop and remove the container after testing docker stop test_aas_registry_kafka_mem docker rm test_aas_registry_kafka_mem @@ -328,14 +453,32 @@ jobs: - name: Test AAS Registry Kafka MongoDB Docker Image run: | docker run -d --name test_aas_registry_kafka_mongodb test/aas-registry-kafka-mongodb:${VERSION} - sleep 30 - if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aas_registry_kafka_mongodb)" == "healthy" ]; then - echo "AAS Registry Kafka MongoDB started successfully and is healthy." - else - echo "AAS Registry Kafka MongoDB failed to start or is unhealthy." + + # Initialize variables + max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) + sleep_interval=5 # Interval in seconds between checks + check_count=0 + + # Loop to check health status + while [ $check_count -lt $max_checks ]; do + if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aas_registry_kafka_mongodb)" == "healthy" ]; then + echo "AAS Registry Kafka MongoDB started successfully and is healthy." + break + else + echo "Waiting for AAS Registry Kafka MongoDB to become healthy..." + check_count=$((check_count + 1)) + sleep $sleep_interval + fi + done + + # If the container is still not healthy after the loop + if [ $check_count -eq $max_checks ]; then + echo "AAS Registry Kafka MongoDB failed to start or is unhealthy after 2 minutes." docker logs test_aas_registry_kafka_mongodb exit 1 fi + + # Stop and remove the container after testing docker stop test_aas_registry_kafka_mongodb docker rm test_aas_registry_kafka_mongodb @@ -361,14 +504,32 @@ jobs: - name: Test AAS Registry Log Mem Docker Image run: | docker run -d --name test_aas_registry_log_mem test/aas-registry-log-mem:${VERSION} - sleep 30 - if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aas_registry_log_mem)" == "healthy" ]; then - echo "AAS Registry Log Mem started successfully and is healthy." - else - echo "AAS Registry Log Mem failed to start or is unhealthy." + + # Initialize variables + max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) + sleep_interval=5 # Interval in seconds between checks + check_count=0 + + # Loop to check health status + while [ $check_count -lt $max_checks ]; do + if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aas_registry_log_mem)" == "healthy" ]; then + echo "AAS Registry Log Mem started successfully and is healthy." + break + else + echo "Waiting for AAS Registry Log Mem to become healthy..." + check_count=$((check_count + 1)) + sleep $sleep_interval + fi + done + + # If the container is still not healthy after the loop + if [ $check_count -eq $max_checks ]; then + echo "AAS Registry Log Mem failed to start or is unhealthy after 2 minutes." docker logs test_aas_registry_log_mem exit 1 fi + + # Stop and remove the container after testing docker stop test_aas_registry_log_mem docker rm test_aas_registry_log_mem @@ -394,14 +555,32 @@ jobs: - name: Test AAS Registry Log MongoDB Docker Image run: | docker run -d --name test_aas_registry_log_mongodb test/aas-registry-log-mongodb:${VERSION} - sleep 30 - if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aas_registry_log_mongodb)" == "healthy" ]; then - echo "AAS Registry Log MongoDB started successfully and is healthy." - else - echo "AAS Registry Log MongoDB failed to start or is unhealthy." + + # Initialize variables + max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) + sleep_interval=5 # Interval in seconds between checks + check_count=0 + + # Loop to check health status + while [ $check_count -lt $max_checks ]; do + if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aas_registry_log_mongodb)" == "healthy" ]; then + echo "AAS Registry Log MongoDB started successfully and is healthy." + break + else + echo "Waiting for AAS Registry Log MongoDB to become healthy..." + check_count=$((check_count + 1)) + sleep $sleep_interval + fi + done + + # If the container is still not healthy after the loop + if [ $check_count -eq $max_checks ]; then + echo "AAS Registry Log MongoDB failed to start or is unhealthy after 2 minutes." docker logs test_aas_registry_log_mongodb exit 1 fi + + # Stop and remove the container after testing docker stop test_aas_registry_log_mongodb docker rm test_aas_registry_log_mongodb @@ -427,14 +606,32 @@ jobs: - name: Test Submodel Registry Kafka Mem Docker Image run: | docker run -d --name test_submodel_registry_kafka_mem test/submodel-registry-kafka-mem:${VERSION} - sleep 30 - if [ "$(docker inspect --format='{{.State.Health.Status}}' test_submodel_registry_kafka_mem)" == "healthy" ]; then - echo "Submodel Registry Kafka Mem started successfully and is healthy." - else - echo "Submodel Registry Kafka Mem failed to start or is unhealthy." + + # Initialize variables + max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) + sleep_interval=5 # Interval in seconds between checks + check_count=0 + + # Loop to check health status + while [ $check_count -lt $max_checks ]; do + if [ "$(docker inspect --format='{{.State.Health.Status}}' test_submodel_registry_kafka_mem)" == "healthy" ]; then + echo "Submodel Registry Kafka Mem started successfully and is healthy." + break + else + echo "Waiting for Submodel Registry Kafka Mem to become healthy..." + check_count=$((check_count + 1)) + sleep $sleep_interval + fi + done + + # If the container is still not healthy after the loop + if [ $check_count -eq $max_checks ]; then + echo "Submodel Registry Kafka Mem failed to start or is unhealthy after 2 minutes." docker logs test_submodel_registry_kafka_mem exit 1 fi + + # Stop and remove the container after testing docker stop test_submodel_registry_kafka_mem docker rm test_submodel_registry_kafka_mem @@ -460,14 +657,32 @@ jobs: - name: Test Submodel Registry Kafka MongoDB Docker Image run: | docker run -d --name test_submodel_registry_kafka_mongodb test/submodel-registry-kafka-mongodb:${VERSION} - sleep 30 - if [ "$(docker inspect --format='{{.State.Health.Status}}' test_submodel_registry_kafka_mongodb)" == "healthy" ]; then - echo "Submodel Registry Kafka MongoDB started successfully and is healthy." - else - echo "Submodel Registry Kafka MongoDB failed to start or is unhealthy." + + # Initialize variables + max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) + sleep_interval=5 # Interval in seconds between checks + check_count=0 + + # Loop to check health status + while [ $check_count -lt $max_checks ]; do + if [ "$(docker inspect --format='{{.State.Health.Status}}' test_submodel_registry_kafka_mongodb)" == "healthy" ]; then + echo "Submodel Registry Kafka MongoDB started successfully and is healthy." + break + else + echo "Waiting for Submodel Registry Kafka MongoDB to become healthy..." + check_count=$((check_count + 1)) + sleep $sleep_interval + fi + done + + # If the container is still not healthy after the loop + if [ $check_count -eq $max_checks ]; then + echo "Submodel Registry Kafka MongoDB failed to start or is unhealthy after 2 minutes." docker logs test_submodel_registry_kafka_mongodb exit 1 fi + + # Stop and remove the container after testing docker stop test_submodel_registry_kafka_mongodb docker rm test_submodel_registry_kafka_mongodb @@ -493,14 +708,32 @@ jobs: - name: Test Submodel Registry Log Mem Docker Image run: | docker run -d --name test_submodel_registry_log_mem test/submodel-registry-log-mem:${VERSION} - sleep 30 - if [ "$(docker inspect --format='{{.State.Health.Status}}' test_submodel_registry_log_mem)" == "healthy" ]; then - echo "Submodel Registry Log Mem started successfully and is healthy." - else - echo "Submodel Registry Log Mem failed to start or is unhealthy." + + # Initialize variables + max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) + sleep_interval=5 # Interval in seconds between checks + check_count=0 + + # Loop to check health status + while [ $check_count -lt $max_checks ]; do + if [ "$(docker inspect --format='{{.State.Health.Status}}' test_submodel_registry_log_mem)" == "healthy" ]; then + echo "Submodel Registry Log Mem started successfully and is healthy." + break + else + echo "Waiting for Submodel Registry Log Mem to become healthy..." + check_count=$((check_count + 1)) + sleep $sleep_interval + fi + done + + # If the container is still not healthy after the loop + if [ $check_count -eq $max_checks ]; then + echo "Submodel Registry Log Mem failed to start or is unhealthy after 2 minutes." docker logs test_submodel_registry_log_mem exit 1 fi + + # Stop and remove the container after testing docker stop test_submodel_registry_log_mem docker rm test_submodel_registry_log_mem @@ -526,16 +759,34 @@ jobs: - name: Test Submodel Registry Log MongoDB Docker Image run: | docker run -d --name test_submodel_registry_log_mongodb test/submodel-registry-log-mongodb:${VERSION} - sleep 30 - if [ "$(docker inspect --format='{{.State.Health.Status}}' test_submodel_registry_log_mongodb)" == "healthy" ]; then - echo "Submodel Registry Log MongoDB started successfully and is healthy." - else - echo "Submodel Registry Log MongoDB failed to start or is unhealthy." + + # Initialize variables + max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) + sleep_interval=5 # Interval in seconds between checks + check_count=0 + + # Loop to check health status + while [ $check_count -lt $max_checks ]; do + if [ "$(docker inspect --format='{{.State.Health.Status}}' test_submodel_registry_log_mongodb)" == "healthy" ]; then + echo "Submodel Registry Log MongoDB started successfully and is healthy." + break + else + echo "Waiting for Submodel Registry Log MongoDB to become healthy..." + check_count=$((check_count + 1)) + sleep $sleep_interval + fi + done + + # If the container is still not healthy after the loop + if [ $check_count -eq $max_checks ]; then + echo "Submodel Registry Log MongoDB failed to start or is unhealthy after 2 minutes." docker logs test_submodel_registry_log_mongodb exit 1 fi + + # Stop and remove the container after testing docker stop test_submodel_registry_log_mongodb docker rm test_submodel_registry_log_mongodb - name: Clean up Docker Image - run: docker rmi -f $(docker images -aq) \ No newline at end of file + run: docker rmi -f $(docker images -aq) From 2bf60c8efd34cd44e91fdc692789dd6b5660c6f4 Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Thu, 29 Aug 2024 11:57:56 +0200 Subject: [PATCH 14/57] Changes workflow --- .github/workflows/maven_run_test.yml | 12 +- .../aas-registry-kafka-mem/docker-compose.yml | 92 +++++++++++++++ .../docker-compose.yml | 109 ++++++++++++++++++ .../docker-compose.yml | 51 ++++++++ .../docker-compose.yml | 90 +++++++++++++++ .../docker-compose.yml | 109 ++++++++++++++++++ .../docker-compose.yml | 107 +++++++++++++++++ 7 files changed, 564 insertions(+), 6 deletions(-) create mode 100644 ci/testImages/aas-registry-kafka-mem/docker-compose.yml create mode 100644 ci/testImages/aas-registry-kafka-mongodb/docker-compose.yml create mode 100644 ci/testImages/aas-registry-log-mongodb/docker-compose.yml create mode 100644 ci/testImages/submodel-registry-kafka-mem/docker-compose.yml create mode 100644 ci/testImages/submodel-registry-kafka-mongodb/docker-compose.yml create mode 100644 ci/testImages/submodel-registry-log-mongodb/docker-compose.yml diff --git a/.github/workflows/maven_run_test.yml b/.github/workflows/maven_run_test.yml index 78a39fa96..8b4abefad 100644 --- a/.github/workflows/maven_run_test.yml +++ b/.github/workflows/maven_run_test.yml @@ -401,7 +401,7 @@ jobs: - name: Test AAS Registry Kafka Mem Docker Image run: | - docker run -d --name test_aas_registry_kafka_mem test/aas-registry-kafka-mem:${VERSION} + docker compose --project-directory ./ci/testImages/aas-registry-kafka-mem up -d # Initialize variables max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) @@ -452,7 +452,7 @@ jobs: - name: Test AAS Registry Kafka MongoDB Docker Image run: | - docker run -d --name test_aas_registry_kafka_mongodb test/aas-registry-kafka-mongodb:${VERSION} + docker compose --project-directory ./ci/testImages/aas-registry-kafka-mongodb up -d # Initialize variables max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) @@ -554,7 +554,7 @@ jobs: - name: Test AAS Registry Log MongoDB Docker Image run: | - docker run -d --name test_aas_registry_log_mongodb test/aas-registry-log-mongodb:${VERSION} + docker compose --project-directory ./ci/testImages/aas-registry-log-mongodb up -d # Initialize variables max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) @@ -605,7 +605,7 @@ jobs: - name: Test Submodel Registry Kafka Mem Docker Image run: | - docker run -d --name test_submodel_registry_kafka_mem test/submodel-registry-kafka-mem:${VERSION} + docker compose --project-directory ./ci/testImages/submodel-registry-kafka-mem up -d # Initialize variables max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) @@ -656,7 +656,7 @@ jobs: - name: Test Submodel Registry Kafka MongoDB Docker Image run: | - docker run -d --name test_submodel_registry_kafka_mongodb test/submodel-registry-kafka-mongodb:${VERSION} + docker compose --project-directory ./ci/testImages/submodel-registry-kafka-mongodb up -d # Initialize variables max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) @@ -758,7 +758,7 @@ jobs: - name: Test Submodel Registry Log MongoDB Docker Image run: | - docker run -d --name test_submodel_registry_log_mongodb test/submodel-registry-log-mongodb:${VERSION} + docker compose --project-directory ./ci/testImages/submodel-registry-log-mongodb up -d # Initialize variables max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) diff --git a/ci/testImages/aas-registry-kafka-mem/docker-compose.yml b/ci/testImages/aas-registry-kafka-mem/docker-compose.yml new file mode 100644 index 000000000..5fd14e909 --- /dev/null +++ b/ci/testImages/aas-registry-kafka-mem/docker-compose.yml @@ -0,0 +1,92 @@ +version: '3.6' + +networks: + basyx: + internal: false + +volumes: + zookeeper-data: + driver: local + zookeeper-log: + driver: local + kafka-data: + driver: local + aas-config: + +services: + portainer: + image: portainer/portainer-ce:2.0.1 + container_name: portainer + restart: always + ports: + - "9090:9000" + volumes: + - /var/run/docker.sock:/var/run/docker.sock + networks: + - basyx + + zookeeper: + image: zookeeper:3.6 + container_name: zookeeper + restart: always + ports: + - "2181:2181" + volumes: + - zookeeper-data:/var/lib/zookeeper/data + - zookeeper-log:/var/lib/zookeeper/log + networks: + - basyx + + kafka: + image: confluentinc/cp-kafka:6.2.1 + container_name: kafka + volumes: + - kafka-data:/var/lib/kafka + ports: + - "9092:9092" + environment: + KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 + KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 + KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT + KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT + KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092 + KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true' + links: + - zookeeper + restart: always + networks: + - basyx + + akhq: + image: tchiotludo/akhq:0.24.0 + container_name: akhq + environment: + AKHQ_CONFIGURATION: | + akhq: + connections: + docker-kafka-server: + properties: + bootstrap.servers: "kafka:29092" + ports: + - 8086:8080 + restart: always + depends_on: + - kafka + networks: + - basyx + + + + aas-registry-kafka-mem: + image: test/aas-registry-kafka-mem:$BASYX_VERSION + container_name: aas-registry-kafka-mem + pull_policy: never + ports: + - "8030:8080" + depends_on: + - kafka + restart: always + environment: + KAFKA_BOOTSTRAP_SERVERS: PLAINTEXT://kafka:29092 + networks: + - basyx \ No newline at end of file diff --git a/ci/testImages/aas-registry-kafka-mongodb/docker-compose.yml b/ci/testImages/aas-registry-kafka-mongodb/docker-compose.yml new file mode 100644 index 000000000..19f96ef2f --- /dev/null +++ b/ci/testImages/aas-registry-kafka-mongodb/docker-compose.yml @@ -0,0 +1,109 @@ +version: '3.6' + +networks: + basyx: + internal: false + mongo: + internal: false + +volumes: + zookeeper-data: + driver: local + zookeeper-log: + driver: local + kafka-data: + driver: local + mongodb-data-5.0.10: + driver: local + aas-config: + +services: + portainer: + image: portainer/portainer-ce:2.0.1 + container_name: portainer + restart: always + ports: + - "9090:9000" + volumes: + - /var/run/docker.sock:/var/run/docker.sock + networks: + - basyx + + zookeeper: + image: zookeeper:3.6 + container_name: zookeeper + restart: always + ports: + - "2181:2181" + volumes: + - zookeeper-data:/var/lib/zookeeper/data + - zookeeper-log:/var/lib/zookeeper/log + networks: + - basyx + + kafka: + image: confluentinc/cp-kafka:6.2.1 + container_name: kafka + volumes: + - kafka-data:/var/lib/kafka + ports: + - "9092:9092" + environment: + KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 + KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 + KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT + KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT + KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092 + KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true' + links: + - zookeeper + restart: always + networks: + - basyx + + akhq: + image: tchiotludo/akhq:0.24.0 + container_name: akhq + environment: + AKHQ_CONFIGURATION: | + akhq: + connections: + docker-kafka-server: + properties: + bootstrap.servers: "kafka:29092" + ports: + - 8086:8080 + restart: always + depends_on: + - kafka + networks: + - basyx + + mongodb: + image: mongo:5.0.10 + container_name: mongodb + environment: + MONGO_INITDB_ROOT_USERNAME: admin + MONGO_INITDB_ROOT_PASSWORD: admin + ports: + - 27017:27017 + volumes: + - mongodb-data-5.0.10:/data/db + networks: + - basyx + + aas-registry-kafka-mongodb: + image: test/aas-registry-kafka-mongodb:$BASYX_VERSION + container_name: aas-registry-kafka-mongodb + pull_policy: never + ports: + - "8020:8080" + depends_on: + - mongodb + - kafka + restart: always + environment: + KAFKA_BOOTSTRAP_SERVERS: PLAINTEXT://kafka:29092 + SPRING_DATA_MONGODB_URI: mongodb://admin:admin@mongodb:27017 + networks: + - basyx diff --git a/ci/testImages/aas-registry-log-mongodb/docker-compose.yml b/ci/testImages/aas-registry-log-mongodb/docker-compose.yml new file mode 100644 index 000000000..9418855b9 --- /dev/null +++ b/ci/testImages/aas-registry-log-mongodb/docker-compose.yml @@ -0,0 +1,51 @@ +version: '3.6' + +networks: + basyx: + internal: false + mongo: + internal: false + +volumes: + mongodb-data-5.0.10: + driver: local + aas-config: + +services: + portainer: + image: portainer/portainer-ce:2.0.1 + container_name: portainer + restart: always + ports: + - "9090:9000" + volumes: + - /var/run/docker.sock:/var/run/docker.sock + networks: + - basyx + + mongodb: + image: mongo:5.0.10 + container_name: mongodb + environment: + MONGO_INITDB_ROOT_USERNAME: admin + MONGO_INITDB_ROOT_PASSWORD: admin + ports: + - 27017:27017 + volumes: + - mongodb-data-5.0.10:/data/db + networks: + - basyx + + aas-registry-log-mongodb: + image: test/aas-registry-log-mongodb:$BASYX_VERSION + container_name: aas-registry-log-mongodb + pull_policy: never + ports: + - "8050:8080" + depends_on: + - mongodb + restart: always + environment: + SPRING_DATA_MONGODB_URI: mongodb://admin:admin@mongodb:27017 + networks: + - basyx diff --git a/ci/testImages/submodel-registry-kafka-mem/docker-compose.yml b/ci/testImages/submodel-registry-kafka-mem/docker-compose.yml new file mode 100644 index 000000000..6e89e684e --- /dev/null +++ b/ci/testImages/submodel-registry-kafka-mem/docker-compose.yml @@ -0,0 +1,90 @@ +version: '3.6' + +networks: + basyx-submodel: + internal: false + +volumes: + zookeeper-data: + driver: local + zookeeper-log: + driver: local + kafka-data: + driver: local + submodel-config: + +services: + portainer: + image: portainer/portainer-ce:2.0.1 + container_name: portainer + restart: always + ports: + - "9091:9000" + volumes: + - /var/run/docker.sock:/var/run/docker.sock + networks: + - basyx-submodel + + zookeeper: + image: zookeeper:3.6 + container_name: zookeeper + restart: always + ports: + - "2182:2181" + volumes: + - zookeeper-data:/var/lib/zookeeper/data + - zookeeper-log:/var/lib/zookeeper/log + networks: + - basyx-submodel + + kafka: + image: confluentinc/cp-kafka:6.2.1 + container_name: kafka + volumes: + - kafka-data:/var/lib/kafka + ports: + - "9093:9092" + environment: + KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 + KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 + KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT + KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT + KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9093 + KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true' + links: + - zookeeper + restart: always + networks: + - basyx-submodel + + akhq: + image: tchiotludo/akhq:0.24.0 + container_name: akhq + environment: + AKHQ_CONFIGURATION: | + akhq: + connections: + docker-kafka-server: + properties: + bootstrap.servers: "kafka:29092" + ports: + - 8087:8080 + restart: always + depends_on: + - kafka + networks: + - basyx-submodel + + submodel-registry-kafka-mem: + image: test/submodel-registry-kafka-mem:$BASYX_VERSION + container_name: submodel-registry-kafka-mem + pull_policy: never + ports: + - "8035:8080" + depends_on: + - kafka + restart: always + environment: + KAFKA_BOOTSTRAP_SERVERS: PLAINTEXT://kafka:29092 + networks: + - basyx-submodel diff --git a/ci/testImages/submodel-registry-kafka-mongodb/docker-compose.yml b/ci/testImages/submodel-registry-kafka-mongodb/docker-compose.yml new file mode 100644 index 000000000..a3f06e1b0 --- /dev/null +++ b/ci/testImages/submodel-registry-kafka-mongodb/docker-compose.yml @@ -0,0 +1,109 @@ +docker-compose.ymlversion: '3.6' + +networks: + basyx-submodel: + internal: false + mongo-submodel: + internal: false + +volumes: + zookeeper-data: + driver: local + zookeeper-log: + driver: local + kafka-data: + driver: local + mongodb-data-5.0.10: + driver: local + submodel-config: + +services: + portainer: + image: portainer/portainer-ce:2.0.1 + container_name: portainer + restart: always + ports: + - "9091:9000" + volumes: + - /var/run/docker.sock:/var/run/docker.sock + networks: + - basyx-submodel + + zookeeper: + image: zookeeper:3.6 + container_name: zookeeper + restart: always + ports: + - "2182:2181" + volumes: + - zookeeper-data:/var/lib/zookeeper/data + - zookeeper-log:/var/lib/zookeeper/log + networks: + - basyx-submodel + + kafka: + image: confluentinc/cp-kafka:6.2.1 + container_name: kafka + volumes: + - kafka-data:/var/lib/kafka + ports: + - "9093:9092" + environment: + KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 + KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 + KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT + KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT + KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9093 + KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true' + links: + - zookeeper + restart: always + networks: + - basyx-submodel + + akhq: + image: tchiotludo/akhq:0.24.0 + container_name: akhq + environment: + AKHQ_CONFIGURATION: | + akhq: + connections: + docker-kafka-server: + properties: + bootstrap.servers: "kafka:29092" + ports: + - 8087:8080 + restart: always + depends_on: + - kafka + networks: + - basyx-submodel + + mongodb: + image: mongo:5.0.10 + container_name: mongodb + environment: + MONGO_INITDB_ROOT_USERNAME: admin + MONGO_INITDB_ROOT_PASSWORD: admin + ports: + - 27018:27017 + volumes: + - mongodb-data-5.0.10:/data/db + networks: + - basyx-submodel + + submodel-registry-kafka-mongodb: + image: test/submodel-registry-kafka-mongodb:$BASYX_VERSION + container_name: submodel-registry-kafka-mongodb + pull_policy: never + ports: + - "8024:8080" + depends_on: + - mongodb + - kafka + restart: always + environment: + KAFKA_BOOTSTRAP_SERVERS: PLAINTEXT://kafka:29092 + SPRING_DATA_MONGODB_URI: mongodb://admin:admin@mongodb:27017 + networks: + - basyx-submodel diff --git a/ci/testImages/submodel-registry-log-mongodb/docker-compose.yml b/ci/testImages/submodel-registry-log-mongodb/docker-compose.yml new file mode 100644 index 000000000..32b06d50b --- /dev/null +++ b/ci/testImages/submodel-registry-log-mongodb/docker-compose.yml @@ -0,0 +1,107 @@ +version: '3.6' + +networks: + basyx-submodel: + internal: false + mongo-submodel: + internal: false + +volumes: + zookeeper-data: + driver: local + zookeeper-log: + driver: local + kafka-data: + driver: local + mongodb-data-5.0.10: + driver: local + submodel-config: + +services: + portainer: + image: portainer/portainer-ce:2.0.1 + container_name: portainer + restart: always + ports: + - "9091:9000" + volumes: + - /var/run/docker.sock:/var/run/docker.sock + networks: + - basyx-submodel + + zookeeper: + image: zookeeper:3.6 + container_name: zookeeper + restart: always + ports: + - "2182:2181" + volumes: + - zookeeper-data:/var/lib/zookeeper/data + - zookeeper-log:/var/lib/zookeeper/log + networks: + - basyx-submodel + + kafka: + image: confluentinc/cp-kafka:6.2.1 + container_name: kafka + volumes: + - kafka-data:/var/lib/kafka + ports: + - "9093:9092" + environment: + KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 + KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 + KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT + KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT + KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9093 + KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true' + links: + - zookeeper + restart: always + networks: + - basyx-submodel + + akhq: + image: tchiotludo/akhq:0.24.0 + container_name: akhq + environment: + AKHQ_CONFIGURATION: | + akhq: + connections: + docker-kafka-server: + properties: + bootstrap.servers: "kafka:29092" + ports: + - 8087:8080 + restart: always + depends_on: + - kafka + networks: + - basyx-submodel + + mongodb: + image: mongo:5.0.10 + container_name: mongodb + environment: + MONGO_INITDB_ROOT_USERNAME: admin + MONGO_INITDB_ROOT_PASSWORD: admin + ports: + - 27018:27017 + volumes: + - mongodb-data-5.0.10:/data/db + networks: + - basyx-submodel + + submodel-registry-log-mongodb: + image: test/submodel-registry-log-mongodb:$BASYX_VERSION + container_name: submodel-registry-log-mongodb + pull_policy: never + ports: + - "8053:8080" + depends_on: + - mongodb + restart: always + environment: + SPRING_DATA_MONGODB_URI: mongodb://admin:admin@mongodb:27017 + networks: + - basyx-submodel From d9ba631671623894835e099c0c0638088cef56b1 Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Thu, 29 Aug 2024 13:23:31 +0200 Subject: [PATCH 15/57] Changes workflow --- .github/workflows/maven_run_test.yml | 12 ++++++------ ...r-compose.yml => test-aas-registry-kafka-mem.yml} | 0 ...mpose.yml => test-aas-registry-kafka-mongodb.yml} | 0 ...compose.yml => test-aas-registry-log-mongodb.yml} | 0 ...pose.yml => test-submodel-registry-kafka-mem.yml} | 0 ....yml => test-submodel-registry-kafka-mongodb.yml} | 0 ...se.yml => test-submodel-registry-log-mongodb.yml} | 0 7 files changed, 6 insertions(+), 6 deletions(-) rename ci/{testImages/aas-registry-kafka-mem/docker-compose.yml => test-aas-registry-kafka-mem.yml} (100%) rename ci/{testImages/aas-registry-kafka-mongodb/docker-compose.yml => test-aas-registry-kafka-mongodb.yml} (100%) rename ci/{testImages/aas-registry-log-mongodb/docker-compose.yml => test-aas-registry-log-mongodb.yml} (100%) rename ci/{testImages/submodel-registry-kafka-mem/docker-compose.yml => test-submodel-registry-kafka-mem.yml} (100%) rename ci/{testImages/submodel-registry-kafka-mongodb/docker-compose.yml => test-submodel-registry-kafka-mongodb.yml} (100%) rename ci/{testImages/submodel-registry-log-mongodb/docker-compose.yml => test-submodel-registry-log-mongodb.yml} (100%) diff --git a/.github/workflows/maven_run_test.yml b/.github/workflows/maven_run_test.yml index 8b4abefad..dd4758618 100644 --- a/.github/workflows/maven_run_test.yml +++ b/.github/workflows/maven_run_test.yml @@ -401,7 +401,7 @@ jobs: - name: Test AAS Registry Kafka Mem Docker Image run: | - docker compose --project-directory ./ci/testImages/aas-registry-kafka-mem up -d + docker compose --project-directory ./ci -f test-aas-registry-kafka-mem.yml up -d # Initialize variables max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) @@ -452,7 +452,7 @@ jobs: - name: Test AAS Registry Kafka MongoDB Docker Image run: | - docker compose --project-directory ./ci/testImages/aas-registry-kafka-mongodb up -d + docker compose --project-directory ./ci -f test-aas-registry-kafka-mongodb.yml up -d # Initialize variables max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) @@ -554,7 +554,7 @@ jobs: - name: Test AAS Registry Log MongoDB Docker Image run: | - docker compose --project-directory ./ci/testImages/aas-registry-log-mongodb up -d + docker compose --project-directory ./ci -f test-aas-registry-log-mongodb.yml up -d # Initialize variables max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) @@ -605,7 +605,7 @@ jobs: - name: Test Submodel Registry Kafka Mem Docker Image run: | - docker compose --project-directory ./ci/testImages/submodel-registry-kafka-mem up -d + docker compose --project-directory ./ci -f test-submodel-registry-kafka-mem.yml up -d # Initialize variables max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) @@ -656,7 +656,7 @@ jobs: - name: Test Submodel Registry Kafka MongoDB Docker Image run: | - docker compose --project-directory ./ci/testImages/submodel-registry-kafka-mongodb up -d + docker compose --project-directory ./ci -f test-submodel-registry-kafka-mongodb.yml up -d # Initialize variables max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) @@ -758,7 +758,7 @@ jobs: - name: Test Submodel Registry Log MongoDB Docker Image run: | - docker compose --project-directory ./ci/testImages/submodel-registry-log-mongodb up -d + docker compose --project-directory ./ci -f test-submodel-registry-log-mongodb.yml up -d # Initialize variables max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) diff --git a/ci/testImages/aas-registry-kafka-mem/docker-compose.yml b/ci/test-aas-registry-kafka-mem.yml similarity index 100% rename from ci/testImages/aas-registry-kafka-mem/docker-compose.yml rename to ci/test-aas-registry-kafka-mem.yml diff --git a/ci/testImages/aas-registry-kafka-mongodb/docker-compose.yml b/ci/test-aas-registry-kafka-mongodb.yml similarity index 100% rename from ci/testImages/aas-registry-kafka-mongodb/docker-compose.yml rename to ci/test-aas-registry-kafka-mongodb.yml diff --git a/ci/testImages/aas-registry-log-mongodb/docker-compose.yml b/ci/test-aas-registry-log-mongodb.yml similarity index 100% rename from ci/testImages/aas-registry-log-mongodb/docker-compose.yml rename to ci/test-aas-registry-log-mongodb.yml diff --git a/ci/testImages/submodel-registry-kafka-mem/docker-compose.yml b/ci/test-submodel-registry-kafka-mem.yml similarity index 100% rename from ci/testImages/submodel-registry-kafka-mem/docker-compose.yml rename to ci/test-submodel-registry-kafka-mem.yml diff --git a/ci/testImages/submodel-registry-kafka-mongodb/docker-compose.yml b/ci/test-submodel-registry-kafka-mongodb.yml similarity index 100% rename from ci/testImages/submodel-registry-kafka-mongodb/docker-compose.yml rename to ci/test-submodel-registry-kafka-mongodb.yml diff --git a/ci/testImages/submodel-registry-log-mongodb/docker-compose.yml b/ci/test-submodel-registry-log-mongodb.yml similarity index 100% rename from ci/testImages/submodel-registry-log-mongodb/docker-compose.yml rename to ci/test-submodel-registry-log-mongodb.yml From 20a1a65c8d2804dc9c79dfd5952d3763baf1bef1 Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Thu, 29 Aug 2024 13:25:21 +0200 Subject: [PATCH 16/57] Changes workflow --- .github/workflows/maven_run_test.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/maven_run_test.yml b/.github/workflows/maven_run_test.yml index dd4758618..35ef6d5bc 100644 --- a/.github/workflows/maven_run_test.yml +++ b/.github/workflows/maven_run_test.yml @@ -401,7 +401,7 @@ jobs: - name: Test AAS Registry Kafka Mem Docker Image run: | - docker compose --project-directory ./ci -f test-aas-registry-kafka-mem.yml up -d + docker compose --project-directory ./ci -f ./ci/test-aas-registry-kafka-mem.yml up -d # Initialize variables max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) @@ -452,7 +452,7 @@ jobs: - name: Test AAS Registry Kafka MongoDB Docker Image run: | - docker compose --project-directory ./ci -f test-aas-registry-kafka-mongodb.yml up -d + docker compose --project-directory ./ci -f ./ci/test-aas-registry-kafka-mongodb.yml up -d # Initialize variables max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) @@ -554,7 +554,7 @@ jobs: - name: Test AAS Registry Log MongoDB Docker Image run: | - docker compose --project-directory ./ci -f test-aas-registry-log-mongodb.yml up -d + docker compose --project-directory ./ci -f ./ci/test-aas-registry-log-mongodb.yml up -d # Initialize variables max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) @@ -605,7 +605,7 @@ jobs: - name: Test Submodel Registry Kafka Mem Docker Image run: | - docker compose --project-directory ./ci -f test-submodel-registry-kafka-mem.yml up -d + docker compose --project-directory ./ci -f ./ci/test-submodel-registry-kafka-mem.yml up -d # Initialize variables max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) @@ -656,7 +656,7 @@ jobs: - name: Test Submodel Registry Kafka MongoDB Docker Image run: | - docker compose --project-directory ./ci -f test-submodel-registry-kafka-mongodb.yml up -d + docker compose --project-directory ./ci -f ./ci/test-submodel-registry-kafka-mongodb.yml up -d # Initialize variables max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) @@ -758,7 +758,7 @@ jobs: - name: Test Submodel Registry Log MongoDB Docker Image run: | - docker compose --project-directory ./ci -f test-submodel-registry-log-mongodb.yml up -d + docker compose --project-directory ./ci -f ./ci/test-submodel-registry-log-mongodb.yml up -d # Initialize variables max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) From 2f2e1c9ebda039de16b690dbcdd77e5ef88c1d35 Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Thu, 29 Aug 2024 13:28:20 +0200 Subject: [PATCH 17/57] Changes workflow --- ci/test-aas-registry-kafka-mem.yml | 2 +- ci/test-aas-registry-kafka-mongodb.yml | 2 +- ci/test-aas-registry-log-mongodb.yml | 2 +- ci/test-submodel-registry-kafka-mem.yml | 2 +- ci/test-submodel-registry-kafka-mongodb.yml | 2 +- ci/test-submodel-registry-log-mongodb.yml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ci/test-aas-registry-kafka-mem.yml b/ci/test-aas-registry-kafka-mem.yml index 5fd14e909..0450e9e95 100644 --- a/ci/test-aas-registry-kafka-mem.yml +++ b/ci/test-aas-registry-kafka-mem.yml @@ -79,7 +79,7 @@ services: aas-registry-kafka-mem: image: test/aas-registry-kafka-mem:$BASYX_VERSION - container_name: aas-registry-kafka-mem + container_name: test-aas-registry-kafka-mem pull_policy: never ports: - "8030:8080" diff --git a/ci/test-aas-registry-kafka-mongodb.yml b/ci/test-aas-registry-kafka-mongodb.yml index 19f96ef2f..bee06a510 100644 --- a/ci/test-aas-registry-kafka-mongodb.yml +++ b/ci/test-aas-registry-kafka-mongodb.yml @@ -94,7 +94,7 @@ services: aas-registry-kafka-mongodb: image: test/aas-registry-kafka-mongodb:$BASYX_VERSION - container_name: aas-registry-kafka-mongodb + container_name: test-aas-registry-kafka-mongodb pull_policy: never ports: - "8020:8080" diff --git a/ci/test-aas-registry-log-mongodb.yml b/ci/test-aas-registry-log-mongodb.yml index 9418855b9..3645ab529 100644 --- a/ci/test-aas-registry-log-mongodb.yml +++ b/ci/test-aas-registry-log-mongodb.yml @@ -38,7 +38,7 @@ services: aas-registry-log-mongodb: image: test/aas-registry-log-mongodb:$BASYX_VERSION - container_name: aas-registry-log-mongodb + container_name: test-aas-registry-log-mongodb pull_policy: never ports: - "8050:8080" diff --git a/ci/test-submodel-registry-kafka-mem.yml b/ci/test-submodel-registry-kafka-mem.yml index 6e89e684e..0a226f094 100644 --- a/ci/test-submodel-registry-kafka-mem.yml +++ b/ci/test-submodel-registry-kafka-mem.yml @@ -77,7 +77,7 @@ services: submodel-registry-kafka-mem: image: test/submodel-registry-kafka-mem:$BASYX_VERSION - container_name: submodel-registry-kafka-mem + container_name: test-submodel-registry-kafka-mem pull_policy: never ports: - "8035:8080" diff --git a/ci/test-submodel-registry-kafka-mongodb.yml b/ci/test-submodel-registry-kafka-mongodb.yml index a3f06e1b0..6a5f690b6 100644 --- a/ci/test-submodel-registry-kafka-mongodb.yml +++ b/ci/test-submodel-registry-kafka-mongodb.yml @@ -94,7 +94,7 @@ services: submodel-registry-kafka-mongodb: image: test/submodel-registry-kafka-mongodb:$BASYX_VERSION - container_name: submodel-registry-kafka-mongodb + container_name: test-submodel-registry-kafka-mongodb pull_policy: never ports: - "8024:8080" diff --git a/ci/test-submodel-registry-log-mongodb.yml b/ci/test-submodel-registry-log-mongodb.yml index 32b06d50b..517513b42 100644 --- a/ci/test-submodel-registry-log-mongodb.yml +++ b/ci/test-submodel-registry-log-mongodb.yml @@ -94,7 +94,7 @@ services: submodel-registry-log-mongodb: image: test/submodel-registry-log-mongodb:$BASYX_VERSION - container_name: submodel-registry-log-mongodb + container_name: test-submodel-registry-log-mongodb pull_policy: never ports: - "8053:8080" From e9b58c2d1669204b3194f024f8d11a761b85f815 Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Thu, 29 Aug 2024 13:31:26 +0200 Subject: [PATCH 18/57] Changes workflow --- ci/test-aas-registry-kafka-mem.yml | 2 +- ci/test-aas-registry-kafka-mongodb.yml | 2 +- ci/test-aas-registry-log-mongodb.yml | 2 +- ci/test-submodel-registry-kafka-mem.yml | 2 +- ci/test-submodel-registry-kafka-mongodb.yml | 2 +- ci/test-submodel-registry-log-mongodb.yml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ci/test-aas-registry-kafka-mem.yml b/ci/test-aas-registry-kafka-mem.yml index 0450e9e95..506450ed1 100644 --- a/ci/test-aas-registry-kafka-mem.yml +++ b/ci/test-aas-registry-kafka-mem.yml @@ -79,7 +79,7 @@ services: aas-registry-kafka-mem: image: test/aas-registry-kafka-mem:$BASYX_VERSION - container_name: test-aas-registry-kafka-mem + container_name: test_aas_registry_kafka_mem pull_policy: never ports: - "8030:8080" diff --git a/ci/test-aas-registry-kafka-mongodb.yml b/ci/test-aas-registry-kafka-mongodb.yml index bee06a510..487325eaf 100644 --- a/ci/test-aas-registry-kafka-mongodb.yml +++ b/ci/test-aas-registry-kafka-mongodb.yml @@ -94,7 +94,7 @@ services: aas-registry-kafka-mongodb: image: test/aas-registry-kafka-mongodb:$BASYX_VERSION - container_name: test-aas-registry-kafka-mongodb + container_name: test_aas_registry_kafka_mongodb pull_policy: never ports: - "8020:8080" diff --git a/ci/test-aas-registry-log-mongodb.yml b/ci/test-aas-registry-log-mongodb.yml index 3645ab529..8e2618c33 100644 --- a/ci/test-aas-registry-log-mongodb.yml +++ b/ci/test-aas-registry-log-mongodb.yml @@ -38,7 +38,7 @@ services: aas-registry-log-mongodb: image: test/aas-registry-log-mongodb:$BASYX_VERSION - container_name: test-aas-registry-log-mongodb + container_name: test_aas_registry_log_mongodb pull_policy: never ports: - "8050:8080" diff --git a/ci/test-submodel-registry-kafka-mem.yml b/ci/test-submodel-registry-kafka-mem.yml index 0a226f094..fa7c006f8 100644 --- a/ci/test-submodel-registry-kafka-mem.yml +++ b/ci/test-submodel-registry-kafka-mem.yml @@ -77,7 +77,7 @@ services: submodel-registry-kafka-mem: image: test/submodel-registry-kafka-mem:$BASYX_VERSION - container_name: test-submodel-registry-kafka-mem + container_name: test_submodel_registry_kafka_mem pull_policy: never ports: - "8035:8080" diff --git a/ci/test-submodel-registry-kafka-mongodb.yml b/ci/test-submodel-registry-kafka-mongodb.yml index 6a5f690b6..1ff9d3513 100644 --- a/ci/test-submodel-registry-kafka-mongodb.yml +++ b/ci/test-submodel-registry-kafka-mongodb.yml @@ -94,7 +94,7 @@ services: submodel-registry-kafka-mongodb: image: test/submodel-registry-kafka-mongodb:$BASYX_VERSION - container_name: test-submodel-registry-kafka-mongodb + container_name: test_submodel_registry_kafka_mongodb pull_policy: never ports: - "8024:8080" diff --git a/ci/test-submodel-registry-log-mongodb.yml b/ci/test-submodel-registry-log-mongodb.yml index 517513b42..2e2bb1fe0 100644 --- a/ci/test-submodel-registry-log-mongodb.yml +++ b/ci/test-submodel-registry-log-mongodb.yml @@ -94,7 +94,7 @@ services: submodel-registry-log-mongodb: image: test/submodel-registry-log-mongodb:$BASYX_VERSION - container_name: test-submodel-registry-log-mongodb + container_name: test_submodel_registry_log_mongodb pull_policy: never ports: - "8053:8080" From 583e285d88f5ffe1385f4a687e7d3009339f6f21 Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Thu, 29 Aug 2024 13:35:11 +0200 Subject: [PATCH 19/57] Changes workflow --- .github/workflows/maven_run_test.yml | 60 ++++++++++----------- ci/test-submodel-registry-kafka-mongodb.yml | 2 +- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/.github/workflows/maven_run_test.yml b/.github/workflows/maven_run_test.yml index 35ef6d5bc..da267b0ca 100644 --- a/.github/workflows/maven_run_test.yml +++ b/.github/workflows/maven_run_test.yml @@ -74,8 +74,8 @@ jobs: docker stop test_aas_repository docker rm test_aas_repository - - name: Clean up Docker Image - run: docker rmi -f $(docker images -aq) + - name: Clean up + run: exit 0 build-test-aas-environment: runs-on: ubuntu-latest @@ -125,8 +125,8 @@ jobs: docker stop test_aas_environment docker rm test_aas_environment - - name: Clean up Docker Image - run: docker rmi -f $(docker images -aq) + - name: Clean up + run: exit 0 build-test-concept-description-repository: runs-on: ubuntu-latest @@ -176,8 +176,8 @@ jobs: docker stop test_conceptdescription_repository docker rm test_conceptdescription_repository - - name: Clean up Docker Image - run: docker rmi -f $(docker images -aq) + - name: Clean up + run: exit 0 build-test-aas-discovery: runs-on: ubuntu-latest @@ -227,8 +227,8 @@ jobs: docker stop test_aas_discovery docker rm test_aas_discovery - - name: Clean up Docker Image - run: docker rmi -f $(docker images -aq) + - name: Clean up + run: exit 0 build-test-aasx-fileserver: runs-on: ubuntu-latest @@ -278,8 +278,8 @@ jobs: docker stop test_aasxfileserver docker rm test_aasxfileserver - - name: Clean up Docker Image - run: docker rmi -f $(docker images -aq) + - name: Clean up + run: exit 0 build-test-submodel-repository: runs-on: ubuntu-latest @@ -329,8 +329,8 @@ jobs: docker stop test_submodel_repository docker rm test_submodel_repository - - name: Clean up Docker Image - run: docker rmi -f $(docker images -aq) + - name: Clean up + run: exit 0 build-test-submodel-service: runs-on: ubuntu-latest @@ -380,8 +380,8 @@ jobs: docker stop test_submodel_service docker rm test_submodel_service - - name: Clean up Docker Image - run: docker rmi -f $(docker images -aq) + - name: Clean up + run: exit 0 build-test-aas-registry-kafka-mem: runs-on: ubuntu-latest @@ -431,8 +431,8 @@ jobs: docker stop test_aas_registry_kafka_mem docker rm test_aas_registry_kafka_mem - - name: Clean up Docker Image - run: docker rmi -f $(docker images -aq) + - name: Clean up + run: exit 0 build-test-aas-registry-kafka-mongodb: runs-on: ubuntu-latest @@ -482,8 +482,8 @@ jobs: docker stop test_aas_registry_kafka_mongodb docker rm test_aas_registry_kafka_mongodb - - name: Clean up Docker Image - run: docker rmi -f $(docker images -aq) + - name: Clean up + run: exit 0 build-test-aas-registry-log-mem: runs-on: ubuntu-latest @@ -533,8 +533,8 @@ jobs: docker stop test_aas_registry_log_mem docker rm test_aas_registry_log_mem - - name: Clean up Docker Image - run: docker rmi -f $(docker images -aq) + - name: Clean up + run: exit 0 build-test-aas-registry-log-mongodb: runs-on: ubuntu-latest @@ -584,8 +584,8 @@ jobs: docker stop test_aas_registry_log_mongodb docker rm test_aas_registry_log_mongodb - - name: Clean up Docker Image - run: docker rmi -f $(docker images -aq) + - name: Clean up + run: exit 0 build-test-submodel-registry-kafka-mem: runs-on: ubuntu-latest @@ -635,8 +635,8 @@ jobs: docker stop test_submodel_registry_kafka_mem docker rm test_submodel_registry_kafka_mem - - name: Clean up Docker Image - run: docker rmi -f $(docker images -aq) + - name: Clean up + run: exit 0 build-test-submodel-registry-kafka-mongodb: runs-on: ubuntu-latest @@ -686,8 +686,8 @@ jobs: docker stop test_submodel_registry_kafka_mongodb docker rm test_submodel_registry_kafka_mongodb - - name: Clean up Docker Image - run: docker rmi -f $(docker images -aq) + - name: Clean up + run: exit 0 build-test-submodel-registry-log-mem: runs-on: ubuntu-latest @@ -737,8 +737,8 @@ jobs: docker stop test_submodel_registry_log_mem docker rm test_submodel_registry_log_mem - - name: Clean up Docker Image - run: docker rmi -f $(docker images -aq) + - name: Clean up + run: exit 0 build-test-submodel-registry-log-mongodb: runs-on: ubuntu-latest @@ -788,5 +788,5 @@ jobs: docker stop test_submodel_registry_log_mongodb docker rm test_submodel_registry_log_mongodb - - name: Clean up Docker Image - run: docker rmi -f $(docker images -aq) + - name: Clean up + run: exit 0 diff --git a/ci/test-submodel-registry-kafka-mongodb.yml b/ci/test-submodel-registry-kafka-mongodb.yml index 1ff9d3513..027b9a62b 100644 --- a/ci/test-submodel-registry-kafka-mongodb.yml +++ b/ci/test-submodel-registry-kafka-mongodb.yml @@ -1,4 +1,4 @@ -docker-compose.ymlversion: '3.6' +version: '3.6' networks: basyx-submodel: From 5b32de42fa85de9a7b7224721eeb88f710612ebb Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Thu, 29 Aug 2024 13:50:25 +0200 Subject: [PATCH 20/57] Changes workflow --- .github/workflows/maven_run_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven_run_test.yml b/.github/workflows/maven_run_test.yml index da267b0ca..6f91eb50b 100644 --- a/.github/workflows/maven_run_test.yml +++ b/.github/workflows/maven_run_test.yml @@ -350,7 +350,7 @@ jobs: - name: Test Submodel Service Docker Image run: | - docker run -d --name test_submodel_service test/submodel-service:${VERSION} + docker run -d --name test_submodel_service test/standalone_submodel_example:${VERSION} # Initialize variables max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) From c944cae8549c1434aae42121dfe4c2cf06e96215 Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Thu, 29 Aug 2024 14:37:15 +0200 Subject: [PATCH 21/57] Changes workflow --- .github/workflows/maven_run_test.yml | 11 ++++ .../basyx.aasxfileserver.component/pom.xml | 63 +++++++++++++++++++ 2 files changed, 74 insertions(+) diff --git a/.github/workflows/maven_run_test.yml b/.github/workflows/maven_run_test.yml index 6f91eb50b..5d513cd8a 100644 --- a/.github/workflows/maven_run_test.yml +++ b/.github/workflows/maven_run_test.yml @@ -26,6 +26,17 @@ env: VERSION: 2.0.0-SNAPSHOT jobs: + compile-basyx: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + cache: maven build-test-aas-repository: runs-on: ubuntu-latest steps: diff --git a/basyx.aasxfileserver/basyx.aasxfileserver.component/pom.xml b/basyx.aasxfileserver/basyx.aasxfileserver.component/pom.xml index 583010243..b793f6898 100644 --- a/basyx.aasxfileserver/basyx.aasxfileserver.component/pom.xml +++ b/basyx.aasxfileserver/basyx.aasxfileserver.component/pom.xml @@ -15,6 +15,7 @@ aasxfileserver + http://localhost:${docker.host.port}/packages @@ -68,4 +69,66 @@ + + + + docker + + + docker.namespace + + + + + + io.fabric8 + docker-maven-plugin + + + + + + + ${docker.host.port}:${docker.container.port} + + + + ${docker.container.waitForEndpoint} + + + + + + + + + build-docker + + + push-docker + + + docker-compose-up + pre-integration-test + + start + + + + docker-compose-down + post-integration-test + + stop + + + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + + + \ No newline at end of file From c845d7ba722dffb052c49ce4a5928bb1891a1b10 Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Thu, 29 Aug 2024 14:39:40 +0200 Subject: [PATCH 22/57] Changes workflow --- .github/workflows/maven_run_test.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.github/workflows/maven_run_test.yml b/.github/workflows/maven_run_test.yml index 5d513cd8a..6f91eb50b 100644 --- a/.github/workflows/maven_run_test.yml +++ b/.github/workflows/maven_run_test.yml @@ -26,17 +26,6 @@ env: VERSION: 2.0.0-SNAPSHOT jobs: - compile-basyx: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'adopt' - cache: maven build-test-aas-repository: runs-on: ubuntu-latest steps: From aeed6624cc874cb285e539814b7c8ef9584490d1 Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Thu, 29 Aug 2024 14:43:59 +0200 Subject: [PATCH 23/57] Changes workflow --- .github/workflows/maven_run_test.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/maven_run_test.yml b/.github/workflows/maven_run_test.yml index 6f91eb50b..2b252158c 100644 --- a/.github/workflows/maven_run_test.yml +++ b/.github/workflows/maven_run_test.yml @@ -26,6 +26,21 @@ env: VERSION: 2.0.0-SNAPSHOT jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + cache: maven + + - name: Build with Maven + run: mvn package -DskipTests -T1C build-test-aas-repository: runs-on: ubuntu-latest steps: From a462a49a44a32ed2468968fbe132c5a99c67f448 Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Thu, 29 Aug 2024 14:50:10 +0200 Subject: [PATCH 24/57] Changes workflow --- .github/workflows/maven_run_test.yml | 236 ++++++++++++++++++++++----- 1 file changed, 191 insertions(+), 45 deletions(-) diff --git a/.github/workflows/maven_run_test.yml b/.github/workflows/maven_run_test.yml index 2b252158c..ded199203 100644 --- a/.github/workflows/maven_run_test.yml +++ b/.github/workflows/maven_run_test.yml @@ -41,7 +41,20 @@ jobs: - name: Build with Maven run: mvn package -DskipTests -T1C + - name: Check if previous workflows were successful + id: check_success + run: | + echo "Workflow conclusion: ${{ github.event.workflow_run.conclusion }}" + if [[ "${{ github.event.workflow_run.conclusion }}" != "success" ]]; then + echo "One or more of the required workflows failed." + echo "::set-output name=success::false" + exit 1 + fi + echo "::set-output name=success::true" + build-test-aas-repository: + needs: check_previous_success + if: needs.check_previous_success.outputs.success == 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -88,11 +101,20 @@ jobs: # Stop and remove the container after testing docker stop test_aas_repository docker rm test_aas_repository - - - name: Clean up - run: exit 0 + - name: Check if previous workflows were successful + id: check_success + run: | + echo "Workflow conclusion: ${{ github.event.workflow_run.conclusion }}" + if [[ "${{ github.event.workflow_run.conclusion }}" != "success" ]]; then + echo "One or more of the required workflows failed." + echo "::set-output name=success::false" + exit 1 + fi + echo "::set-output name=success::true" build-test-aas-environment: + needs: check_previous_success + if: needs.check_previous_success.outputs.success == 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -139,11 +161,20 @@ jobs: # Stop and remove the container after testing docker stop test_aas_environment docker rm test_aas_environment - - - name: Clean up - run: exit 0 + - name: Check if previous workflows were successful + id: check_success + run: | + echo "Workflow conclusion: ${{ github.event.workflow_run.conclusion }}" + if [[ "${{ github.event.workflow_run.conclusion }}" != "success" ]]; then + echo "One or more of the required workflows failed." + echo "::set-output name=success::false" + exit 1 + fi + echo "::set-output name=success::true" build-test-concept-description-repository: + needs: check_previous_success + if: needs.check_previous_success.outputs.success == 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -190,11 +221,20 @@ jobs: # Stop and remove the container after testing docker stop test_conceptdescription_repository docker rm test_conceptdescription_repository - - - name: Clean up - run: exit 0 + - name: Check if previous workflows were successful + id: check_success + run: | + echo "Workflow conclusion: ${{ github.event.workflow_run.conclusion }}" + if [[ "${{ github.event.workflow_run.conclusion }}" != "success" ]]; then + echo "One or more of the required workflows failed." + echo "::set-output name=success::false" + exit 1 + fi + echo "::set-output name=success::true" build-test-aas-discovery: + needs: check_previous_success + if: needs.check_previous_success.outputs.success == 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -241,11 +281,20 @@ jobs: # Stop and remove the container after testing docker stop test_aas_discovery docker rm test_aas_discovery - - - name: Clean up - run: exit 0 + - name: Check if previous workflows were successful + id: check_success + run: | + echo "Workflow conclusion: ${{ github.event.workflow_run.conclusion }}" + if [[ "${{ github.event.workflow_run.conclusion }}" != "success" ]]; then + echo "One or more of the required workflows failed." + echo "::set-output name=success::false" + exit 1 + fi + echo "::set-output name=success::true" build-test-aasx-fileserver: + needs: check_previous_success + if: needs.check_previous_success.outputs.success == 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -292,11 +341,20 @@ jobs: # Stop and remove the container after testing docker stop test_aasxfileserver docker rm test_aasxfileserver - - - name: Clean up - run: exit 0 + - name: Check if previous workflows were successful + id: check_success + run: | + echo "Workflow conclusion: ${{ github.event.workflow_run.conclusion }}" + if [[ "${{ github.event.workflow_run.conclusion }}" != "success" ]]; then + echo "One or more of the required workflows failed." + echo "::set-output name=success::false" + exit 1 + fi + echo "::set-output name=success::true" build-test-submodel-repository: + needs: check_previous_success + if: needs.check_previous_success.outputs.success == 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -343,11 +401,20 @@ jobs: # Stop and remove the container after testing docker stop test_submodel_repository docker rm test_submodel_repository - - - name: Clean up - run: exit 0 + - name: Check if previous workflows were successful + id: check_success + run: | + echo "Workflow conclusion: ${{ github.event.workflow_run.conclusion }}" + if [[ "${{ github.event.workflow_run.conclusion }}" != "success" ]]; then + echo "One or more of the required workflows failed." + echo "::set-output name=success::false" + exit 1 + fi + echo "::set-output name=success::true" build-test-submodel-service: + needs: check_previous_success + if: needs.check_previous_success.outputs.success == 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -394,11 +461,20 @@ jobs: # Stop and remove the container after testing docker stop test_submodel_service docker rm test_submodel_service - - - name: Clean up - run: exit 0 + - name: Check if previous workflows were successful + id: check_success + run: | + echo "Workflow conclusion: ${{ github.event.workflow_run.conclusion }}" + if [[ "${{ github.event.workflow_run.conclusion }}" != "success" ]]; then + echo "One or more of the required workflows failed." + echo "::set-output name=success::false" + exit 1 + fi + echo "::set-output name=success::true" build-test-aas-registry-kafka-mem: + needs: check_previous_success + if: needs.check_previous_success.outputs.success == 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -445,11 +521,20 @@ jobs: # Stop and remove the container after testing docker stop test_aas_registry_kafka_mem docker rm test_aas_registry_kafka_mem - - - name: Clean up - run: exit 0 + - name: Check if previous workflows were successful + id: check_success + run: | + echo "Workflow conclusion: ${{ github.event.workflow_run.conclusion }}" + if [[ "${{ github.event.workflow_run.conclusion }}" != "success" ]]; then + echo "One or more of the required workflows failed." + echo "::set-output name=success::false" + exit 1 + fi + echo "::set-output name=success::true" build-test-aas-registry-kafka-mongodb: + needs: check_previous_success + if: needs.check_previous_success.outputs.success == 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -496,11 +581,20 @@ jobs: # Stop and remove the container after testing docker stop test_aas_registry_kafka_mongodb docker rm test_aas_registry_kafka_mongodb - - - name: Clean up - run: exit 0 + - name: Check if previous workflows were successful + id: check_success + run: | + echo "Workflow conclusion: ${{ github.event.workflow_run.conclusion }}" + if [[ "${{ github.event.workflow_run.conclusion }}" != "success" ]]; then + echo "One or more of the required workflows failed." + echo "::set-output name=success::false" + exit 1 + fi + echo "::set-output name=success::true" build-test-aas-registry-log-mem: + needs: check_previous_success + if: needs.check_previous_success.outputs.success == 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -547,11 +641,20 @@ jobs: # Stop and remove the container after testing docker stop test_aas_registry_log_mem docker rm test_aas_registry_log_mem - - - name: Clean up - run: exit 0 + - name: Check if previous workflows were successful + id: check_success + run: | + echo "Workflow conclusion: ${{ github.event.workflow_run.conclusion }}" + if [[ "${{ github.event.workflow_run.conclusion }}" != "success" ]]; then + echo "One or more of the required workflows failed." + echo "::set-output name=success::false" + exit 1 + fi + echo "::set-output name=success::true" build-test-aas-registry-log-mongodb: + needs: check_previous_success + if: needs.check_previous_success.outputs.success == 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -598,11 +701,20 @@ jobs: # Stop and remove the container after testing docker stop test_aas_registry_log_mongodb docker rm test_aas_registry_log_mongodb - - - name: Clean up - run: exit 0 + - name: Check if previous workflows were successful + id: check_success + run: | + echo "Workflow conclusion: ${{ github.event.workflow_run.conclusion }}" + if [[ "${{ github.event.workflow_run.conclusion }}" != "success" ]]; then + echo "One or more of the required workflows failed." + echo "::set-output name=success::false" + exit 1 + fi + echo "::set-output name=success::true" build-test-submodel-registry-kafka-mem: + needs: check_previous_success + if: needs.check_previous_success.outputs.success == 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -649,11 +761,20 @@ jobs: # Stop and remove the container after testing docker stop test_submodel_registry_kafka_mem docker rm test_submodel_registry_kafka_mem - - - name: Clean up - run: exit 0 + - name: Check if previous workflows were successful + id: check_success + run: | + echo "Workflow conclusion: ${{ github.event.workflow_run.conclusion }}" + if [[ "${{ github.event.workflow_run.conclusion }}" != "success" ]]; then + echo "One or more of the required workflows failed." + echo "::set-output name=success::false" + exit 1 + fi + echo "::set-output name=success::true" build-test-submodel-registry-kafka-mongodb: + needs: check_previous_success + if: needs.check_previous_success.outputs.success == 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -700,11 +821,20 @@ jobs: # Stop and remove the container after testing docker stop test_submodel_registry_kafka_mongodb docker rm test_submodel_registry_kafka_mongodb - - - name: Clean up - run: exit 0 + - name: Check if previous workflows were successful + id: check_success + run: | + echo "Workflow conclusion: ${{ github.event.workflow_run.conclusion }}" + if [[ "${{ github.event.workflow_run.conclusion }}" != "success" ]]; then + echo "One or more of the required workflows failed." + echo "::set-output name=success::false" + exit 1 + fi + echo "::set-output name=success::true" build-test-submodel-registry-log-mem: + needs: check_previous_success + if: needs.check_previous_success.outputs.success == 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -751,11 +881,20 @@ jobs: # Stop and remove the container after testing docker stop test_submodel_registry_log_mem docker rm test_submodel_registry_log_mem - - - name: Clean up - run: exit 0 + - name: Check if previous workflows were successful + id: check_success + run: | + echo "Workflow conclusion: ${{ github.event.workflow_run.conclusion }}" + if [[ "${{ github.event.workflow_run.conclusion }}" != "success" ]]; then + echo "One or more of the required workflows failed." + echo "::set-output name=success::false" + exit 1 + fi + echo "::set-output name=success::true" build-test-submodel-registry-log-mongodb: + needs: check_previous_success + if: needs.check_previous_success.outputs.success == 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -802,6 +941,13 @@ jobs: # Stop and remove the container after testing docker stop test_submodel_registry_log_mongodb docker rm test_submodel_registry_log_mongodb - - - name: Clean up - run: exit 0 + - name: Check if previous workflows were successful + id: check_success + run: | + echo "Workflow conclusion: ${{ github.event.workflow_run.conclusion }}" + if [[ "${{ github.event.workflow_run.conclusion }}" != "success" ]]; then + echo "One or more of the required workflows failed." + echo "::set-output name=success::false" + exit 1 + fi + echo "::set-output name=success::true" From d782f7df89e722dae280956dd141985e95d2a7a0 Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Thu, 29 Aug 2024 14:54:18 +0200 Subject: [PATCH 25/57] Changes workflow --- .../{maven_run_test.yml => docker_test.yml} | 274 ++++-------------- 1 file changed, 51 insertions(+), 223 deletions(-) rename .github/workflows/{maven_run_test.yml => docker_test.yml} (74%) diff --git a/.github/workflows/maven_run_test.yml b/.github/workflows/docker_test.yml similarity index 74% rename from .github/workflows/maven_run_test.yml rename to .github/workflows/docker_test.yml index ded199203..9b34d67db 100644 --- a/.github/workflows/maven_run_test.yml +++ b/.github/workflows/docker_test.yml @@ -1,60 +1,21 @@ # This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven -name: Java CI with Maven +name: Build and Start Docker Images on: - pull_request: - branches: [ main ] - paths-ignore: - - '.github/ISSUE_TEMPLATE/**' - - '.github/CODE_OF_CONDUCT.md' - - '.github/CODING_CONVENTIONS.md' - - '.github/CONTRIBUTING.md' - - '.github/dependabot.yml' - - '.github/pull_request_template.md' - - '.github/SECURITY.md' - - 'docs/**' - - 'examples/**' - - 'README.md' - - '.gitattributes' - - '.gitignore' - - 'LICENSE' - - 'NOTICE' + workflow_run: + workflows: ["Install BaSyx"] + types: + - completed + env: VERSION: 2.0.0-SNAPSHOT jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'adopt' - cache: maven - - - name: Build with Maven - run: mvn package -DskipTests -T1C - - name: Check if previous workflows were successful - id: check_success - run: | - echo "Workflow conclusion: ${{ github.event.workflow_run.conclusion }}" - if [[ "${{ github.event.workflow_run.conclusion }}" != "success" ]]; then - echo "One or more of the required workflows failed." - echo "::set-output name=success::false" - exit 1 - fi - echo "::set-output name=success::true" - build-test-aas-repository: - needs: check_previous_success - if: needs.check_previous_success.outputs.success == 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -101,20 +62,11 @@ jobs: # Stop and remove the container after testing docker stop test_aas_repository docker rm test_aas_repository - - name: Check if previous workflows were successful - id: check_success - run: | - echo "Workflow conclusion: ${{ github.event.workflow_run.conclusion }}" - if [[ "${{ github.event.workflow_run.conclusion }}" != "success" ]]; then - echo "One or more of the required workflows failed." - echo "::set-output name=success::false" - exit 1 - fi - echo "::set-output name=success::true" + + - name: Clean up + run: exit 0 build-test-aas-environment: - needs: check_previous_success - if: needs.check_previous_success.outputs.success == 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -161,20 +113,11 @@ jobs: # Stop and remove the container after testing docker stop test_aas_environment docker rm test_aas_environment - - name: Check if previous workflows were successful - id: check_success - run: | - echo "Workflow conclusion: ${{ github.event.workflow_run.conclusion }}" - if [[ "${{ github.event.workflow_run.conclusion }}" != "success" ]]; then - echo "One or more of the required workflows failed." - echo "::set-output name=success::false" - exit 1 - fi - echo "::set-output name=success::true" + + - name: Clean up + run: exit 0 build-test-concept-description-repository: - needs: check_previous_success - if: needs.check_previous_success.outputs.success == 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -221,20 +164,11 @@ jobs: # Stop and remove the container after testing docker stop test_conceptdescription_repository docker rm test_conceptdescription_repository - - name: Check if previous workflows were successful - id: check_success - run: | - echo "Workflow conclusion: ${{ github.event.workflow_run.conclusion }}" - if [[ "${{ github.event.workflow_run.conclusion }}" != "success" ]]; then - echo "One or more of the required workflows failed." - echo "::set-output name=success::false" - exit 1 - fi - echo "::set-output name=success::true" + + - name: Clean up + run: exit 0 build-test-aas-discovery: - needs: check_previous_success - if: needs.check_previous_success.outputs.success == 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -281,20 +215,11 @@ jobs: # Stop and remove the container after testing docker stop test_aas_discovery docker rm test_aas_discovery - - name: Check if previous workflows were successful - id: check_success - run: | - echo "Workflow conclusion: ${{ github.event.workflow_run.conclusion }}" - if [[ "${{ github.event.workflow_run.conclusion }}" != "success" ]]; then - echo "One or more of the required workflows failed." - echo "::set-output name=success::false" - exit 1 - fi - echo "::set-output name=success::true" + + - name: Clean up + run: exit 0 build-test-aasx-fileserver: - needs: check_previous_success - if: needs.check_previous_success.outputs.success == 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -341,20 +266,11 @@ jobs: # Stop and remove the container after testing docker stop test_aasxfileserver docker rm test_aasxfileserver - - name: Check if previous workflows were successful - id: check_success - run: | - echo "Workflow conclusion: ${{ github.event.workflow_run.conclusion }}" - if [[ "${{ github.event.workflow_run.conclusion }}" != "success" ]]; then - echo "One or more of the required workflows failed." - echo "::set-output name=success::false" - exit 1 - fi - echo "::set-output name=success::true" + + - name: Clean up + run: exit 0 build-test-submodel-repository: - needs: check_previous_success - if: needs.check_previous_success.outputs.success == 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -401,20 +317,11 @@ jobs: # Stop and remove the container after testing docker stop test_submodel_repository docker rm test_submodel_repository - - name: Check if previous workflows were successful - id: check_success - run: | - echo "Workflow conclusion: ${{ github.event.workflow_run.conclusion }}" - if [[ "${{ github.event.workflow_run.conclusion }}" != "success" ]]; then - echo "One or more of the required workflows failed." - echo "::set-output name=success::false" - exit 1 - fi - echo "::set-output name=success::true" + + - name: Clean up + run: exit 0 build-test-submodel-service: - needs: check_previous_success - if: needs.check_previous_success.outputs.success == 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -461,20 +368,11 @@ jobs: # Stop and remove the container after testing docker stop test_submodel_service docker rm test_submodel_service - - name: Check if previous workflows were successful - id: check_success - run: | - echo "Workflow conclusion: ${{ github.event.workflow_run.conclusion }}" - if [[ "${{ github.event.workflow_run.conclusion }}" != "success" ]]; then - echo "One or more of the required workflows failed." - echo "::set-output name=success::false" - exit 1 - fi - echo "::set-output name=success::true" + + - name: Clean up + run: exit 0 build-test-aas-registry-kafka-mem: - needs: check_previous_success - if: needs.check_previous_success.outputs.success == 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -521,20 +419,11 @@ jobs: # Stop and remove the container after testing docker stop test_aas_registry_kafka_mem docker rm test_aas_registry_kafka_mem - - name: Check if previous workflows were successful - id: check_success - run: | - echo "Workflow conclusion: ${{ github.event.workflow_run.conclusion }}" - if [[ "${{ github.event.workflow_run.conclusion }}" != "success" ]]; then - echo "One or more of the required workflows failed." - echo "::set-output name=success::false" - exit 1 - fi - echo "::set-output name=success::true" + + - name: Clean up + run: exit 0 build-test-aas-registry-kafka-mongodb: - needs: check_previous_success - if: needs.check_previous_success.outputs.success == 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -581,20 +470,11 @@ jobs: # Stop and remove the container after testing docker stop test_aas_registry_kafka_mongodb docker rm test_aas_registry_kafka_mongodb - - name: Check if previous workflows were successful - id: check_success - run: | - echo "Workflow conclusion: ${{ github.event.workflow_run.conclusion }}" - if [[ "${{ github.event.workflow_run.conclusion }}" != "success" ]]; then - echo "One or more of the required workflows failed." - echo "::set-output name=success::false" - exit 1 - fi - echo "::set-output name=success::true" + + - name: Clean up + run: exit 0 build-test-aas-registry-log-mem: - needs: check_previous_success - if: needs.check_previous_success.outputs.success == 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -641,20 +521,11 @@ jobs: # Stop and remove the container after testing docker stop test_aas_registry_log_mem docker rm test_aas_registry_log_mem - - name: Check if previous workflows were successful - id: check_success - run: | - echo "Workflow conclusion: ${{ github.event.workflow_run.conclusion }}" - if [[ "${{ github.event.workflow_run.conclusion }}" != "success" ]]; then - echo "One or more of the required workflows failed." - echo "::set-output name=success::false" - exit 1 - fi - echo "::set-output name=success::true" + + - name: Clean up + run: exit 0 build-test-aas-registry-log-mongodb: - needs: check_previous_success - if: needs.check_previous_success.outputs.success == 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -701,20 +572,11 @@ jobs: # Stop and remove the container after testing docker stop test_aas_registry_log_mongodb docker rm test_aas_registry_log_mongodb - - name: Check if previous workflows were successful - id: check_success - run: | - echo "Workflow conclusion: ${{ github.event.workflow_run.conclusion }}" - if [[ "${{ github.event.workflow_run.conclusion }}" != "success" ]]; then - echo "One or more of the required workflows failed." - echo "::set-output name=success::false" - exit 1 - fi - echo "::set-output name=success::true" + + - name: Clean up + run: exit 0 build-test-submodel-registry-kafka-mem: - needs: check_previous_success - if: needs.check_previous_success.outputs.success == 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -761,20 +623,11 @@ jobs: # Stop and remove the container after testing docker stop test_submodel_registry_kafka_mem docker rm test_submodel_registry_kafka_mem - - name: Check if previous workflows were successful - id: check_success - run: | - echo "Workflow conclusion: ${{ github.event.workflow_run.conclusion }}" - if [[ "${{ github.event.workflow_run.conclusion }}" != "success" ]]; then - echo "One or more of the required workflows failed." - echo "::set-output name=success::false" - exit 1 - fi - echo "::set-output name=success::true" + + - name: Clean up + run: exit 0 build-test-submodel-registry-kafka-mongodb: - needs: check_previous_success - if: needs.check_previous_success.outputs.success == 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -821,20 +674,11 @@ jobs: # Stop and remove the container after testing docker stop test_submodel_registry_kafka_mongodb docker rm test_submodel_registry_kafka_mongodb - - name: Check if previous workflows were successful - id: check_success - run: | - echo "Workflow conclusion: ${{ github.event.workflow_run.conclusion }}" - if [[ "${{ github.event.workflow_run.conclusion }}" != "success" ]]; then - echo "One or more of the required workflows failed." - echo "::set-output name=success::false" - exit 1 - fi - echo "::set-output name=success::true" + + - name: Clean up + run: exit 0 build-test-submodel-registry-log-mem: - needs: check_previous_success - if: needs.check_previous_success.outputs.success == 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -881,20 +725,11 @@ jobs: # Stop and remove the container after testing docker stop test_submodel_registry_log_mem docker rm test_submodel_registry_log_mem - - name: Check if previous workflows were successful - id: check_success - run: | - echo "Workflow conclusion: ${{ github.event.workflow_run.conclusion }}" - if [[ "${{ github.event.workflow_run.conclusion }}" != "success" ]]; then - echo "One or more of the required workflows failed." - echo "::set-output name=success::false" - exit 1 - fi - echo "::set-output name=success::true" + + - name: Clean up + run: exit 0 build-test-submodel-registry-log-mongodb: - needs: check_previous_success - if: needs.check_previous_success.outputs.success == 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -941,13 +776,6 @@ jobs: # Stop and remove the container after testing docker stop test_submodel_registry_log_mongodb docker rm test_submodel_registry_log_mongodb - - name: Check if previous workflows were successful - id: check_success - run: | - echo "Workflow conclusion: ${{ github.event.workflow_run.conclusion }}" - if [[ "${{ github.event.workflow_run.conclusion }}" != "success" ]]; then - echo "One or more of the required workflows failed." - echo "::set-output name=success::false" - exit 1 - fi - echo "::set-output name=success::true" + + - name: Clean up + run: exit 0 From 16f746eaeab5ca14c059c0d3e3801aa96cac90a1 Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Thu, 29 Aug 2024 14:54:26 +0200 Subject: [PATCH 26/57] Changes workflow --- .github/workflows/maven_run.yml | 35 +++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/maven_run.yml diff --git a/.github/workflows/maven_run.yml b/.github/workflows/maven_run.yml new file mode 100644 index 000000000..51b80fa80 --- /dev/null +++ b/.github/workflows/maven_run.yml @@ -0,0 +1,35 @@ +name: Install BaSyx + +on: + pull_request: + branches: [ main ] + paths-ignore: + - '.github/ISSUE_TEMPLATE/**' + - '.github/CODE_OF_CONDUCT.md' + - '.github/CODING_CONVENTIONS.md' + - '.github/CONTRIBUTING.md' + - '.github/dependabot.yml' + - '.github/pull_request_template.md' + - '.github/SECURITY.md' + - 'docs/**' + - 'examples/**' + - 'README.md' + - '.gitattributes' + - '.gitignore' + - 'LICENSE' + - 'NOTICE' + +jobs: + compile: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + cache: maven + - name: Package BaSyx ( No Tests ) + run: mvn clean package -DskipTests From 53d54a24e6e456a30da1b21bc2d51ccf156798e3 Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Thu, 29 Aug 2024 15:01:38 +0200 Subject: [PATCH 27/57] Changes workflow --- .github/workflows/docker_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker_test.yml b/.github/workflows/docker_test.yml index 9b34d67db..c0fff630a 100644 --- a/.github/workflows/docker_test.yml +++ b/.github/workflows/docker_test.yml @@ -5,7 +5,7 @@ name: Build and Start Docker Images on: workflow_run: - workflows: ["Install BaSyx"] + workflows: [Install BaSyx] types: - completed From 8886c956efd57e3bfc5b56a9c585fc26f096c8ab Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Thu, 29 Aug 2024 15:08:02 +0200 Subject: [PATCH 28/57] Changes workflow --- .github/workflows/docker_test.yml | 50 +++++++++++++++++++++++++++---- .github/workflows/maven_run.yml | 35 ---------------------- 2 files changed, 45 insertions(+), 40 deletions(-) delete mode 100644 .github/workflows/maven_run.yml diff --git a/.github/workflows/docker_test.yml b/.github/workflows/docker_test.yml index c0fff630a..69f03b790 100644 --- a/.github/workflows/docker_test.yml +++ b/.github/workflows/docker_test.yml @@ -4,18 +4,44 @@ name: Build and Start Docker Images on: - workflow_run: - workflows: [Install BaSyx] - types: - - completed - + pull_request: + branches: [ main ] + paths-ignore: + - '.github/ISSUE_TEMPLATE/**' + - '.github/CODE_OF_CONDUCT.md' + - '.github/CODING_CONVENTIONS.md' + - '.github/CONTRIBUTING.md' + - '.github/dependabot.yml' + - '.github/pull_request_template.md' + - '.github/SECURITY.md' + - 'docs/**' + - 'examples/**' + - 'README.md' + - '.gitattributes' + - '.gitignore' + - 'LICENSE' + - 'NOTICE' env: VERSION: 2.0.0-SNAPSHOT jobs: + compile: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + cache: maven + - name: Package BaSyx ( No Tests ) + run: mvn clean package -DskipTests build-test-aas-repository: + needs: compile runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -67,6 +93,7 @@ jobs: run: exit 0 build-test-aas-environment: + needs: compile runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -118,6 +145,7 @@ jobs: run: exit 0 build-test-concept-description-repository: + needs: compile runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -169,6 +197,7 @@ jobs: run: exit 0 build-test-aas-discovery: + needs: compile runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -220,6 +249,7 @@ jobs: run: exit 0 build-test-aasx-fileserver: + needs: compile runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -271,6 +301,7 @@ jobs: run: exit 0 build-test-submodel-repository: + needs: compile runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -322,6 +353,7 @@ jobs: run: exit 0 build-test-submodel-service: + needs: compile runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -373,6 +405,7 @@ jobs: run: exit 0 build-test-aas-registry-kafka-mem: + needs: compile runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -424,6 +457,7 @@ jobs: run: exit 0 build-test-aas-registry-kafka-mongodb: + needs: compile runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -475,6 +509,7 @@ jobs: run: exit 0 build-test-aas-registry-log-mem: + needs: compile runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -526,6 +561,7 @@ jobs: run: exit 0 build-test-aas-registry-log-mongodb: + needs: compile runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -577,6 +613,7 @@ jobs: run: exit 0 build-test-submodel-registry-kafka-mem: + needs: compile runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -628,6 +665,7 @@ jobs: run: exit 0 build-test-submodel-registry-kafka-mongodb: + needs: compile runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -679,6 +717,7 @@ jobs: run: exit 0 build-test-submodel-registry-log-mem: + needs: compile runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -730,6 +769,7 @@ jobs: run: exit 0 build-test-submodel-registry-log-mongodb: + needs: compile runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/maven_run.yml b/.github/workflows/maven_run.yml deleted file mode 100644 index 51b80fa80..000000000 --- a/.github/workflows/maven_run.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Install BaSyx - -on: - pull_request: - branches: [ main ] - paths-ignore: - - '.github/ISSUE_TEMPLATE/**' - - '.github/CODE_OF_CONDUCT.md' - - '.github/CODING_CONVENTIONS.md' - - '.github/CONTRIBUTING.md' - - '.github/dependabot.yml' - - '.github/pull_request_template.md' - - '.github/SECURITY.md' - - 'docs/**' - - 'examples/**' - - 'README.md' - - '.gitattributes' - - '.gitignore' - - 'LICENSE' - - 'NOTICE' - -jobs: - compile: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'adopt' - cache: maven - - name: Package BaSyx ( No Tests ) - run: mvn clean package -DskipTests From b790238b3ea54f0861116022c80353adfbd58a1c Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Thu, 29 Aug 2024 15:13:01 +0200 Subject: [PATCH 29/57] Changes workflow --- .github/workflows/docker_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker_test.yml b/.github/workflows/docker_test.yml index 69f03b790..01dd6c1b3 100644 --- a/.github/workflows/docker_test.yml +++ b/.github/workflows/docker_test.yml @@ -38,7 +38,7 @@ jobs: distribution: 'adopt' cache: maven - name: Package BaSyx ( No Tests ) - run: mvn clean package -DskipTests + run: mvn install -DskipTests -T1C build-test-aas-repository: needs: compile From c0a368f8638aa52a81e4db18e2d03da0371bbfc5 Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Thu, 29 Aug 2024 15:16:19 +0200 Subject: [PATCH 30/57] Changes workflow --- .github/workflows/docker_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker_test.yml b/.github/workflows/docker_test.yml index 01dd6c1b3..f74f97680 100644 --- a/.github/workflows/docker_test.yml +++ b/.github/workflows/docker_test.yml @@ -38,7 +38,7 @@ jobs: distribution: 'adopt' cache: maven - name: Package BaSyx ( No Tests ) - run: mvn install -DskipTests -T1C + run: mvn package -DskipTests -T1C build-test-aas-repository: needs: compile From fde2c649337f0c420e4fdfc36ac15c7dc0ab7102 Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Thu, 29 Aug 2024 15:22:18 +0200 Subject: [PATCH 31/57] Changes workflow --- .github/workflows/docker_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker_test.yml b/.github/workflows/docker_test.yml index f74f97680..62d5ff38a 100644 --- a/.github/workflows/docker_test.yml +++ b/.github/workflows/docker_test.yml @@ -38,7 +38,7 @@ jobs: distribution: 'adopt' cache: maven - name: Package BaSyx ( No Tests ) - run: mvn package -DskipTests -T1C + run: mvn clean package -DskipTests -T1C build-test-aas-repository: needs: compile From 4173dce4a15484088296c40ae6625d117c210a0d Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Thu, 29 Aug 2024 15:37:13 +0200 Subject: [PATCH 32/57] Changes workflow --- .github/workflows/docker_test.yml | 90 ++++++++++++++++++++----------- 1 file changed, 60 insertions(+), 30 deletions(-) diff --git a/.github/workflows/docker_test.yml b/.github/workflows/docker_test.yml index 62d5ff38a..516354fae 100644 --- a/.github/workflows/docker_test.yml +++ b/.github/workflows/docker_test.yml @@ -26,22 +26,8 @@ env: VERSION: 2.0.0-SNAPSHOT jobs: - compile: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'adopt' - cache: maven - - name: Package BaSyx ( No Tests ) - run: mvn clean package -DskipTests -T1C - build-test-aas-repository: - needs: compile + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -52,7 +38,9 @@ jobs: java-version: '17' distribution: 'adopt' cache: maven - + - name: Build BaSyx + run: | + mvn clean install -DskipTests - name: Build AAS Repository Docker Image run: | mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasrepository.component" @@ -93,7 +81,7 @@ jobs: run: exit 0 build-test-aas-environment: - needs: compile + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -104,6 +92,9 @@ jobs: java-version: '17' distribution: 'adopt' cache: maven + - name: Build BaSyx + run: | + mvn clean install -DskipTests - name: Build AAS Environment Docker Image run: | @@ -145,7 +136,7 @@ jobs: run: exit 0 build-test-concept-description-repository: - needs: compile + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -156,6 +147,9 @@ jobs: java-version: '17' distribution: 'adopt' cache: maven + - name: Build BaSyx + run: | + mvn clean install -DskipTests - name: Build Concept Description Repository Docker Image run: | @@ -197,7 +191,7 @@ jobs: run: exit 0 build-test-aas-discovery: - needs: compile + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -208,6 +202,9 @@ jobs: java-version: '17' distribution: 'adopt' cache: maven + - name: Build BaSyx + run: | + mvn clean install -DskipTests - name: Build AAS Discovery Docker Image run: | @@ -249,7 +246,7 @@ jobs: run: exit 0 build-test-aasx-fileserver: - needs: compile + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -260,6 +257,9 @@ jobs: java-version: '17' distribution: 'adopt' cache: maven + - name: Build BaSyx + run: | + mvn clean install -DskipTests - name: Build AASX File Server Docker Image run: | @@ -301,7 +301,7 @@ jobs: run: exit 0 build-test-submodel-repository: - needs: compile + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -312,6 +312,9 @@ jobs: java-version: '17' distribution: 'adopt' cache: maven + - name: Build BaSyx + run: | + mvn clean install -DskipTests - name: Build Submodel Repository Docker Image run: | @@ -353,7 +356,7 @@ jobs: run: exit 0 build-test-submodel-service: - needs: compile + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -364,6 +367,9 @@ jobs: java-version: '17' distribution: 'adopt' cache: maven + - name: Build BaSyx + run: | + mvn clean install -DskipTests - name: Build Submodel Service Docker Image run: | @@ -405,7 +411,7 @@ jobs: run: exit 0 build-test-aas-registry-kafka-mem: - needs: compile + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -416,6 +422,9 @@ jobs: java-version: '17' distribution: 'adopt' cache: maven + - name: Build BaSyx + run: | + mvn clean install -DskipTests - name: Build AAS Registry Kafka Mem Docker Image run: | @@ -457,7 +466,7 @@ jobs: run: exit 0 build-test-aas-registry-kafka-mongodb: - needs: compile + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -468,6 +477,9 @@ jobs: java-version: '17' distribution: 'adopt' cache: maven + - name: Build BaSyx + run: | + mvn clean install -DskipTests - name: Build AAS Registry Kafka MongoDB Docker Image run: | @@ -509,7 +521,7 @@ jobs: run: exit 0 build-test-aas-registry-log-mem: - needs: compile + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -520,6 +532,9 @@ jobs: java-version: '17' distribution: 'adopt' cache: maven + - name: Build BaSyx + run: | + mvn clean install -DskipTests - name: Build AAS Registry Log Mem Docker Image run: | @@ -561,7 +576,7 @@ jobs: run: exit 0 build-test-aas-registry-log-mongodb: - needs: compile + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -572,6 +587,9 @@ jobs: java-version: '17' distribution: 'adopt' cache: maven + - name: Build BaSyx + run: | + mvn clean install -DskipTests - name: Build AAS Registry Log MongoDB Docker Image run: | @@ -613,7 +631,7 @@ jobs: run: exit 0 build-test-submodel-registry-kafka-mem: - needs: compile + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -624,6 +642,9 @@ jobs: java-version: '17' distribution: 'adopt' cache: maven + - name: Build BaSyx + run: | + mvn clean install -DskipTests - name: Build Submodel Registry Kafka Mem Docker Image run: | @@ -665,7 +686,7 @@ jobs: run: exit 0 build-test-submodel-registry-kafka-mongodb: - needs: compile + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -676,6 +697,9 @@ jobs: java-version: '17' distribution: 'adopt' cache: maven + - name: Build BaSyx + run: | + mvn clean install -DskipTests - name: Build Submodel Registry Kafka MongoDB Docker Image run: | @@ -717,7 +741,7 @@ jobs: run: exit 0 build-test-submodel-registry-log-mem: - needs: compile + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -728,6 +752,9 @@ jobs: java-version: '17' distribution: 'adopt' cache: maven + - name: Build BaSyx + run: | + mvn clean install -DskipTests - name: Build Submodel Registry Log Mem Docker Image run: | @@ -769,7 +796,7 @@ jobs: run: exit 0 build-test-submodel-registry-log-mongodb: - needs: compile + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -780,6 +807,9 @@ jobs: java-version: '17' distribution: 'adopt' cache: maven + - name: Build BaSyx + run: | + mvn clean install -DskipTests - name: Build Submodel Registry Log MongoDB Docker Image run: | From 9d67e2072a11060e61a13aed6fc0d5ba6c8f19a2 Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Thu, 29 Aug 2024 15:45:04 +0200 Subject: [PATCH 33/57] Changes workflow --- .github/workflows/docker_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker_test.yml b/.github/workflows/docker_test.yml index 516354fae..bcc5fc7fe 100644 --- a/.github/workflows/docker_test.yml +++ b/.github/workflows/docker_test.yml @@ -149,7 +149,7 @@ jobs: cache: maven - name: Build BaSyx run: | - mvn clean install -DskipTests + mvn clean install -DskipTests -T1C - name: Build Concept Description Repository Docker Image run: | From 025adf84d35ac23200b1fe5d6bd969b81793551c Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Thu, 29 Aug 2024 15:51:45 +0200 Subject: [PATCH 34/57] Changes workflow --- .github/workflows/docker_test.yml | 191 +++++++++++++++++++++++++++--- 1 file changed, 176 insertions(+), 15 deletions(-) diff --git a/.github/workflows/docker_test.yml b/.github/workflows/docker_test.yml index bcc5fc7fe..b470441a3 100644 --- a/.github/workflows/docker_test.yml +++ b/.github/workflows/docker_test.yml @@ -24,6 +24,7 @@ on: env: VERSION: 2.0.0-SNAPSHOT + MVN_ARGS_BUILD_BASYX_NO_TESTS: -DskipTests jobs: build-test-aas-repository: @@ -40,7 +41,7 @@ jobs: cache: maven - name: Build BaSyx run: | - mvn clean install -DskipTests + mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Build AAS Repository Docker Image run: | mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasrepository.component" @@ -94,7 +95,7 @@ jobs: cache: maven - name: Build BaSyx run: | - mvn clean install -DskipTests + mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Build AAS Environment Docker Image run: | @@ -149,7 +150,7 @@ jobs: cache: maven - name: Build BaSyx run: | - mvn clean install -DskipTests -T1C + mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Build Concept Description Repository Docker Image run: | @@ -204,7 +205,7 @@ jobs: cache: maven - name: Build BaSyx run: | - mvn clean install -DskipTests + mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Build AAS Discovery Docker Image run: | @@ -259,7 +260,7 @@ jobs: cache: maven - name: Build BaSyx run: | - mvn clean install -DskipTests + mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Build AASX File Server Docker Image run: | @@ -314,7 +315,7 @@ jobs: cache: maven - name: Build BaSyx run: | - mvn clean install -DskipTests + mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Build Submodel Repository Docker Image run: | @@ -369,7 +370,7 @@ jobs: cache: maven - name: Build BaSyx run: | - mvn clean install -DskipTests + mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Build Submodel Service Docker Image run: | @@ -424,7 +425,7 @@ jobs: cache: maven - name: Build BaSyx run: | - mvn clean install -DskipTests + mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Build AAS Registry Kafka Mem Docker Image run: | @@ -479,7 +480,7 @@ jobs: cache: maven - name: Build BaSyx run: | - mvn clean install -DskipTests + mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Build AAS Registry Kafka MongoDB Docker Image run: | @@ -534,7 +535,7 @@ jobs: cache: maven - name: Build BaSyx run: | - mvn clean install -DskipTests + mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Build AAS Registry Log Mem Docker Image run: | @@ -589,7 +590,7 @@ jobs: cache: maven - name: Build BaSyx run: | - mvn clean install -DskipTests + mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Build AAS Registry Log MongoDB Docker Image run: | @@ -644,7 +645,7 @@ jobs: cache: maven - name: Build BaSyx run: | - mvn clean install -DskipTests + mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Build Submodel Registry Kafka Mem Docker Image run: | @@ -699,7 +700,7 @@ jobs: cache: maven - name: Build BaSyx run: | - mvn clean install -DskipTests + mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Build Submodel Registry Kafka MongoDB Docker Image run: | @@ -754,7 +755,7 @@ jobs: cache: maven - name: Build BaSyx run: | - mvn clean install -DskipTests + mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Build Submodel Registry Log Mem Docker Image run: | @@ -809,7 +810,7 @@ jobs: cache: maven - name: Build BaSyx run: | - mvn clean install -DskipTests + mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Build Submodel Registry Log MongoDB Docker Image run: | @@ -849,3 +850,163 @@ jobs: - name: Clean up run: exit 0 + test-basyx-aasenvironment: + runs-on: ubuntu-latest + name: Test BaSyx AAS Environment + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + cache: maven + - name: Start environment + run: docker compose --project-directory ./ci up -d --wait + - name: Install BaSyx + run: mvn clean install -f "basyx.aasenvironment/pom.xml" + - name: Stop environment + if: always() + run: docker compose --project-directory ./ci down + test-basyx-aasrepository: + runs-on: ubuntu-latest + name: Test BaSyx AAS Repository + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + cache: maven + - name: Start environment + run: docker compose --project-directory ./ci up -d --wait + - name: Install BaSyx + run: mvn clean install -f "basyx.aasrepository/pom.xml" + - name: Stop environment + if: always() + run: docker compose --project-directory ./ci down + test-basyx-aasservice: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + cache: maven + - name: Start environment + run: docker compose --project-directory ./ci up -d --wait + - name: Install BaSyx + run: mvn clean install -f "basyx.aasservice/pom.xml" + - name: Stop environment + if: always() + run: docker compose --project-directory ./ci down + test-basyx-submodelrepository: + runs-on: ubuntu-latest + name: Test BaSyx Submodel Repository + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + cache: maven + - name: Start environment + run: docker compose --project-directory ./ci up -d --wait + - name: Install BaSyx + run: mvn clean install -f "basyx.submodelrepository/pom.xml" + - name: Stop environment + if: always() + run: docker compose --project-directory ./ci down + test-basyx-submodelservice: + runs-on: ubuntu-latest + name: Test BaSyx Submodel Service + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + cache: maven + - name: Start environment + run: docker compose --project-directory ./ci up -d --wait + - name: Install BaSyx + run: mvn clean install -f "basyx.submodelservice/pom.xml" + - name: Stop environment + if: always() + run: docker compose --project-directory ./ci down + test-basyx-conceptdescriptionrepository: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + cache: maven + - name: Start environment + run: docker compose --project-directory ./ci up -d --wait + - name: Install BaSyx + run: mvn clean install -f "basyx.conceptdescriptionrepository/pom.xml" + - name: Stop environment + if: always() + run: docker compose --project-directory ./ci down + test-basyx-submodelregistry: + runs-on: ubuntu-latest + name: Test BaSyx Submodel Registry + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + cache: maven + - name: Start environment + run: docker compose --project-directory ./ci up -d --wait + - name: Install BaSyx + run: mvn clean install -f "basyx.submodelregistry/pom.xml" + - name: Stop environment + if: always() + run: docker compose --project-directory ./ci down + test-basyx-aasregisty: + runs-on: ubuntu-latest + name: Test BaSyx AAS Registry + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + cache: maven + - name: Start environment + run: docker compose --project-directory ./ci up -d --wait + - name: Install BaSyx + run: mvn clean install -f "basyx.aasregisty/pom.xml" + - name: Stop environment + if: always() + run: docker compose --project-directory ./ci down + test-basyx-aasdiscoveryservice: + runs-on: ubuntu-latest + name: Test BaSyx AAS Discovery Service + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + cache: maven + - name: Start environment + run: docker compose --project-directory ./ci up -d --wait + - name: Install BaSyx + run: mvn clean install -f "basyx.aasdiscoveryservice/pom.xml" + - name: Stop environment + if: always() + run: docker compose --project-directory ./ci down \ No newline at end of file From cb5e9f95cea42e0ffc55f1a8fd80fd1d5efbaa17 Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Thu, 29 Aug 2024 15:57:15 +0200 Subject: [PATCH 35/57] Changes workflow --- .github/workflows/docker_test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/docker_test.yml b/.github/workflows/docker_test.yml index b470441a3..626cc9d33 100644 --- a/.github/workflows/docker_test.yml +++ b/.github/workflows/docker_test.yml @@ -863,6 +863,8 @@ jobs: cache: maven - name: Start environment run: docker compose --project-directory ./ci up -d --wait + - name: Build BaSyx + run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Install BaSyx run: mvn clean install -f "basyx.aasenvironment/pom.xml" - name: Stop environment From bcffe09e37762ec4c2bd162f4d2b9c54bd018fca Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Thu, 29 Aug 2024 16:01:42 +0200 Subject: [PATCH 36/57] Changes workflow --- .github/workflows/docker_test.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/docker_test.yml b/.github/workflows/docker_test.yml index 626cc9d33..231b00ac6 100644 --- a/.github/workflows/docker_test.yml +++ b/.github/workflows/docker_test.yml @@ -883,6 +883,8 @@ jobs: cache: maven - name: Start environment run: docker compose --project-directory ./ci up -d --wait + - name: Build BaSyx + run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Install BaSyx run: mvn clean install -f "basyx.aasrepository/pom.xml" - name: Stop environment @@ -900,6 +902,8 @@ jobs: cache: maven - name: Start environment run: docker compose --project-directory ./ci up -d --wait + - name: Build BaSyx + run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Install BaSyx run: mvn clean install -f "basyx.aasservice/pom.xml" - name: Stop environment @@ -918,6 +922,8 @@ jobs: cache: maven - name: Start environment run: docker compose --project-directory ./ci up -d --wait + - name: Build BaSyx + run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Install BaSyx run: mvn clean install -f "basyx.submodelrepository/pom.xml" - name: Stop environment @@ -936,6 +942,8 @@ jobs: cache: maven - name: Start environment run: docker compose --project-directory ./ci up -d --wait + - name: Build BaSyx + run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Install BaSyx run: mvn clean install -f "basyx.submodelservice/pom.xml" - name: Stop environment @@ -953,6 +961,8 @@ jobs: cache: maven - name: Start environment run: docker compose --project-directory ./ci up -d --wait + - name: Build BaSyx + run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Install BaSyx run: mvn clean install -f "basyx.conceptdescriptionrepository/pom.xml" - name: Stop environment @@ -971,6 +981,8 @@ jobs: cache: maven - name: Start environment run: docker compose --project-directory ./ci up -d --wait + - name: Build BaSyx + run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Install BaSyx run: mvn clean install -f "basyx.submodelregistry/pom.xml" - name: Stop environment @@ -989,6 +1001,8 @@ jobs: cache: maven - name: Start environment run: docker compose --project-directory ./ci up -d --wait + - name: Build BaSyx + run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Install BaSyx run: mvn clean install -f "basyx.aasregisty/pom.xml" - name: Stop environment @@ -1007,6 +1021,8 @@ jobs: cache: maven - name: Start environment run: docker compose --project-directory ./ci up -d --wait + - name: Build BaSyx + run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Install BaSyx run: mvn clean install -f "basyx.aasdiscoveryservice/pom.xml" - name: Stop environment From 2750bff6c2c091b522a2f066c1663c588f46ee87 Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Thu, 29 Aug 2024 16:11:29 +0200 Subject: [PATCH 37/57] Changes workflow --- .github/workflows/docker_test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker_test.yml b/.github/workflows/docker_test.yml index 231b00ac6..13da8d551 100644 --- a/.github/workflows/docker_test.yml +++ b/.github/workflows/docker_test.yml @@ -988,7 +988,7 @@ jobs: - name: Stop environment if: always() run: docker compose --project-directory ./ci down - test-basyx-aasregisty: + test-basyx-aasregistry: runs-on: ubuntu-latest name: Test BaSyx AAS Registry steps: @@ -1004,7 +1004,7 @@ jobs: - name: Build BaSyx run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Install BaSyx - run: mvn clean install -f "basyx.aasregisty/pom.xml" + run: mvn clean install -f "basyx.aasregistry/pom.xml" - name: Stop environment if: always() run: docker compose --project-directory ./ci down From 751b7b55605f09d7430878ce10d5927b552c9906 Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Thu, 29 Aug 2024 16:14:53 +0200 Subject: [PATCH 38/57] Changes Dirties Context --- .../basyx/aasregistry/service/tests/BaseInterfaceTest.java | 2 +- .../service/tests/integration/BaseIntegrationTest.java | 2 +- .../service/tests/integration/PersistencyTestSuite.java | 2 +- .../service/tests/api/BasyxRegistryApiDelegateTest.java | 2 +- .../basyx/aasregistry/service/tests/CorsHeaderTest.java | 2 +- .../aasregistry/service/tests/DescriptionProfilesTest.java | 2 +- .../basyx/submodelregistry/service/tests/BaseInterfaceTest.java | 2 +- .../service/tests/integration/BaseIntegrationTest.java | 2 +- .../service/tests/integration/PersistencyTestSuite.java | 2 +- .../service/tests/api/BasyxRegistryApiDelegateTest.java | 2 +- .../basyx/submodelregistry/service/tests/CorsHeaderTest.java | 2 +- .../submodelregistry/service/tests/DescriptionProfilesTest.java | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/basyx.aasregistry/basyx.aasregistry-service-basetests/src/main/java/org/eclipse/digitaltwin/basyx/aasregistry/service/tests/BaseInterfaceTest.java b/basyx.aasregistry/basyx.aasregistry-service-basetests/src/main/java/org/eclipse/digitaltwin/basyx/aasregistry/service/tests/BaseInterfaceTest.java index e2fe2743c..0ade65fce 100644 --- a/basyx.aasregistry/basyx.aasregistry-service-basetests/src/main/java/org/eclipse/digitaltwin/basyx/aasregistry/service/tests/BaseInterfaceTest.java +++ b/basyx.aasregistry/basyx.aasregistry-service-basetests/src/main/java/org/eclipse/digitaltwin/basyx/aasregistry/service/tests/BaseInterfaceTest.java @@ -54,7 +54,7 @@ import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) -@DirtiesContext(classMode = ClassMode.AFTER_EACH_TEST_METHOD) +@DirtiesContext(classMode = ClassMode.AFTER_CLASS) public abstract class BaseInterfaceTest { protected static final String IDENTIFICATION_2_3 = "identification_2.3"; diff --git a/basyx.aasregistry/basyx.aasregistry-service-basetests/src/main/java/org/eclipse/digitaltwin/basyx/aasregistry/service/tests/integration/BaseIntegrationTest.java b/basyx.aasregistry/basyx.aasregistry-service-basetests/src/main/java/org/eclipse/digitaltwin/basyx/aasregistry/service/tests/integration/BaseIntegrationTest.java index 21940a5a2..da381d92b 100644 --- a/basyx.aasregistry/basyx.aasregistry-service-basetests/src/main/java/org/eclipse/digitaltwin/basyx/aasregistry/service/tests/integration/BaseIntegrationTest.java +++ b/basyx.aasregistry/basyx.aasregistry-service-basetests/src/main/java/org/eclipse/digitaltwin/basyx/aasregistry/service/tests/integration/BaseIntegrationTest.java @@ -99,7 +99,7 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; -@DirtiesContext(classMode = ClassMode.AFTER_EACH_TEST_METHOD) +@DirtiesContext(classMode = ClassMode.AFTER_CLASS) @SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT) @RunWith(SpringRunner.class) public abstract class BaseIntegrationTest { diff --git a/basyx.aasregistry/basyx.aasregistry-service-basetests/src/main/java/org/eclipse/digitaltwin/basyx/aasregistry/service/tests/integration/PersistencyTestSuite.java b/basyx.aasregistry/basyx.aasregistry-service-basetests/src/main/java/org/eclipse/digitaltwin/basyx/aasregistry/service/tests/integration/PersistencyTestSuite.java index 1b49d23da..2e1e260bc 100644 --- a/basyx.aasregistry/basyx.aasregistry-service-basetests/src/main/java/org/eclipse/digitaltwin/basyx/aasregistry/service/tests/integration/PersistencyTestSuite.java +++ b/basyx.aasregistry/basyx.aasregistry-service-basetests/src/main/java/org/eclipse/digitaltwin/basyx/aasregistry/service/tests/integration/PersistencyTestSuite.java @@ -45,7 +45,7 @@ * * @author mateusmolina, danish */ -@DirtiesContext(classMode = ClassMode.AFTER_EACH_TEST_METHOD) +@DirtiesContext(classMode = ClassMode.AFTER_CLASS) public abstract class PersistencyTestSuite { protected static final String DESC_ID = "TestDescriptor"; diff --git a/basyx.aasregistry/basyx.aasregistry-service-inmemory-storage/src/test/java/org/eclipse/digitaltwin/basyx/aasregistry/service/tests/api/BasyxRegistryApiDelegateTest.java b/basyx.aasregistry/basyx.aasregistry-service-inmemory-storage/src/test/java/org/eclipse/digitaltwin/basyx/aasregistry/service/tests/api/BasyxRegistryApiDelegateTest.java index 88ed9c638..32ff6737b 100644 --- a/basyx.aasregistry/basyx.aasregistry-service-inmemory-storage/src/test/java/org/eclipse/digitaltwin/basyx/aasregistry/service/tests/api/BasyxRegistryApiDelegateTest.java +++ b/basyx.aasregistry/basyx.aasregistry-service-inmemory-storage/src/test/java/org/eclipse/digitaltwin/basyx/aasregistry/service/tests/api/BasyxRegistryApiDelegateTest.java @@ -68,7 +68,7 @@ @RunWith(SpringRunner.class) @ContextConfiguration(classes = { BasyxSearchApiDelegate.class, BasyxRegistryApiDelegate.class, SearchApiController.class, ShellDescriptorsApiController.class, InMemoryAasStorageConfiguration.class }) -@DirtiesContext(classMode = ClassMode.AFTER_EACH_TEST_METHOD) +@DirtiesContext(classMode = ClassMode.AFTER_CLASS) @TestPropertySource(properties = { "registry.type=inMemory" }) public class BasyxRegistryApiDelegateTest { diff --git a/basyx.aasregistry/basyx.aasregistry-service-release-log-mem/src/test/java/org/eclipse/digitaltwin/basyx/aasregistry/service/tests/CorsHeaderTest.java b/basyx.aasregistry/basyx.aasregistry-service-release-log-mem/src/test/java/org/eclipse/digitaltwin/basyx/aasregistry/service/tests/CorsHeaderTest.java index d99add978..c02e02e2d 100644 --- a/basyx.aasregistry/basyx.aasregistry-service-release-log-mem/src/test/java/org/eclipse/digitaltwin/basyx/aasregistry/service/tests/CorsHeaderTest.java +++ b/basyx.aasregistry/basyx.aasregistry-service-release-log-mem/src/test/java/org/eclipse/digitaltwin/basyx/aasregistry/service/tests/CorsHeaderTest.java @@ -15,7 +15,7 @@ import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.junit4.SpringRunner; -@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD) +@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_CLASS) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) @RunWith(SpringRunner.class) @TestPropertySource(properties = {"spring.profiles.active=logEvents,inMemoryStorage", "basyx.cors.allowed-origins=*", "basyx.cors.allowed-methods=GET,POST,PATCH,DELETE,PUT,OPTIONS,HEAD" }) diff --git a/basyx.aasregistry/basyx.aasregistry-service/src/test/java/org/eclipse/digitaltwin/basyx/aasregistry/service/tests/DescriptionProfilesTest.java b/basyx.aasregistry/basyx.aasregistry-service/src/test/java/org/eclipse/digitaltwin/basyx/aasregistry/service/tests/DescriptionProfilesTest.java index b08ed285f..2352c4cd1 100644 --- a/basyx.aasregistry/basyx.aasregistry-service/src/test/java/org/eclipse/digitaltwin/basyx/aasregistry/service/tests/DescriptionProfilesTest.java +++ b/basyx.aasregistry/basyx.aasregistry-service/src/test/java/org/eclipse/digitaltwin/basyx/aasregistry/service/tests/DescriptionProfilesTest.java @@ -54,7 +54,7 @@ @RunWith(SpringRunner.class) @WebMvcTest(DescriptionApiController.class) -@DirtiesContext(classMode = ClassMode.AFTER_EACH_TEST_METHOD) +@DirtiesContext(classMode = ClassMode.AFTER_CLASS) @TestPropertySource(properties = { "description.profiles=https://admin-shell.io/aas/API/3/0/AssetAdministrationShellRegistryServiceSpecification/SSP-001,https://admin-shell.io/aas/API/3/0/SubmodelRegistryServiceSpecification/SSP-001" }) public class DescriptionProfilesTest { diff --git a/basyx.submodelregistry/basyx.submodelregistry-service-basetests/src/main/java/org/eclipse/digitaltwin/basyx/submodelregistry/service/tests/BaseInterfaceTest.java b/basyx.submodelregistry/basyx.submodelregistry-service-basetests/src/main/java/org/eclipse/digitaltwin/basyx/submodelregistry/service/tests/BaseInterfaceTest.java index 39ecca396..4bb7ce5d3 100644 --- a/basyx.submodelregistry/basyx.submodelregistry-service-basetests/src/main/java/org/eclipse/digitaltwin/basyx/submodelregistry/service/tests/BaseInterfaceTest.java +++ b/basyx.submodelregistry/basyx.submodelregistry-service-basetests/src/main/java/org/eclipse/digitaltwin/basyx/submodelregistry/service/tests/BaseInterfaceTest.java @@ -51,7 +51,7 @@ import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) -@DirtiesContext(classMode = ClassMode.AFTER_EACH_TEST_METHOD) +@DirtiesContext(classMode = ClassMode.AFTER_CLASS) public abstract class BaseInterfaceTest { protected static final String SM_ID_5 = "sm5"; diff --git a/basyx.submodelregistry/basyx.submodelregistry-service-basetests/src/main/java/org/eclipse/digitaltwin/basyx/submodelregistry/service/tests/integration/BaseIntegrationTest.java b/basyx.submodelregistry/basyx.submodelregistry-service-basetests/src/main/java/org/eclipse/digitaltwin/basyx/submodelregistry/service/tests/integration/BaseIntegrationTest.java index 91792d554..fc25049b6 100644 --- a/basyx.submodelregistry/basyx.submodelregistry-service-basetests/src/main/java/org/eclipse/digitaltwin/basyx/submodelregistry/service/tests/integration/BaseIntegrationTest.java +++ b/basyx.submodelregistry/basyx.submodelregistry-service-basetests/src/main/java/org/eclipse/digitaltwin/basyx/submodelregistry/service/tests/integration/BaseIntegrationTest.java @@ -82,7 +82,7 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; -@DirtiesContext(classMode = ClassMode.AFTER_EACH_TEST_METHOD) +@DirtiesContext(classMode = ClassMode.AFTER_CLASS) @SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT) @RunWith(SpringRunner.class) public abstract class BaseIntegrationTest { diff --git a/basyx.submodelregistry/basyx.submodelregistry-service-basetests/src/main/java/org/eclipse/digitaltwin/basyx/submodelregistry/service/tests/integration/PersistencyTestSuite.java b/basyx.submodelregistry/basyx.submodelregistry-service-basetests/src/main/java/org/eclipse/digitaltwin/basyx/submodelregistry/service/tests/integration/PersistencyTestSuite.java index d5a39f1da..444adf5fb 100644 --- a/basyx.submodelregistry/basyx.submodelregistry-service-basetests/src/main/java/org/eclipse/digitaltwin/basyx/submodelregistry/service/tests/integration/PersistencyTestSuite.java +++ b/basyx.submodelregistry/basyx.submodelregistry-service-basetests/src/main/java/org/eclipse/digitaltwin/basyx/submodelregistry/service/tests/integration/PersistencyTestSuite.java @@ -40,7 +40,7 @@ * * @author mateusmolina */ -@DirtiesContext(classMode = ClassMode.AFTER_EACH_TEST_METHOD) +@DirtiesContext(classMode = ClassMode.AFTER_CLASS) public abstract class PersistencyTestSuite { protected static final String DESC_ID = "TestDescriptor"; diff --git a/basyx.submodelregistry/basyx.submodelregistry-service-inmemory-storage/src/test/java/org/eclipse/digitaltwin/basyx/submodelregistry/service/tests/api/BasyxRegistryApiDelegateTest.java b/basyx.submodelregistry/basyx.submodelregistry-service-inmemory-storage/src/test/java/org/eclipse/digitaltwin/basyx/submodelregistry/service/tests/api/BasyxRegistryApiDelegateTest.java index 4092a13ca..88cac1e33 100644 --- a/basyx.submodelregistry/basyx.submodelregistry-service-inmemory-storage/src/test/java/org/eclipse/digitaltwin/basyx/submodelregistry/service/tests/api/BasyxRegistryApiDelegateTest.java +++ b/basyx.submodelregistry/basyx.submodelregistry-service-inmemory-storage/src/test/java/org/eclipse/digitaltwin/basyx/submodelregistry/service/tests/api/BasyxRegistryApiDelegateTest.java @@ -59,7 +59,7 @@ @RunWith(SpringRunner.class) @ContextConfiguration(classes = { BasyxSubmodelRegistryApiDelegate.class, SubmodelDescriptorsApiController.class, SubmodelDescriptorsApiController.class, InMemorySubmodelStorageConfiguration.class }) -@DirtiesContext(classMode = ClassMode.AFTER_EACH_TEST_METHOD) +@DirtiesContext(classMode = ClassMode.AFTER_CLASS) @TestPropertySource(properties = { "registry.type=inMemory" }) public class BasyxRegistryApiDelegateTest { diff --git a/basyx.submodelregistry/basyx.submodelregistry-service-release-log-mem/src/test/java/org/eclipse/digitaltwin/basyx/submodelregistry/service/tests/CorsHeaderTest.java b/basyx.submodelregistry/basyx.submodelregistry-service-release-log-mem/src/test/java/org/eclipse/digitaltwin/basyx/submodelregistry/service/tests/CorsHeaderTest.java index bd29cb471..4574980cf 100644 --- a/basyx.submodelregistry/basyx.submodelregistry-service-release-log-mem/src/test/java/org/eclipse/digitaltwin/basyx/submodelregistry/service/tests/CorsHeaderTest.java +++ b/basyx.submodelregistry/basyx.submodelregistry-service-release-log-mem/src/test/java/org/eclipse/digitaltwin/basyx/submodelregistry/service/tests/CorsHeaderTest.java @@ -41,7 +41,7 @@ import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.junit4.SpringRunner; -@DirtiesContext(classMode = ClassMode.AFTER_EACH_TEST_METHOD) +@DirtiesContext(classMode = ClassMode.AFTER_CLASS) @SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT) @RunWith(SpringRunner.class) @TestPropertySource(properties = { "spring.profiles.active=logEvents,inMemoryStorage", "basyx.cors.allowed-origins=*", "basyx.cors.allowed-methods=GET,POST,PATCH,DELETE,PUT,OPTIONS,HEAD" }) diff --git a/basyx.submodelregistry/basyx.submodelregistry-service/src/test/java/org/eclipse/digitaltwin/basyx/submodelregistry/service/tests/DescriptionProfilesTest.java b/basyx.submodelregistry/basyx.submodelregistry-service/src/test/java/org/eclipse/digitaltwin/basyx/submodelregistry/service/tests/DescriptionProfilesTest.java index f537605b6..04f0c7c2b 100644 --- a/basyx.submodelregistry/basyx.submodelregistry-service/src/test/java/org/eclipse/digitaltwin/basyx/submodelregistry/service/tests/DescriptionProfilesTest.java +++ b/basyx.submodelregistry/basyx.submodelregistry-service/src/test/java/org/eclipse/digitaltwin/basyx/submodelregistry/service/tests/DescriptionProfilesTest.java @@ -54,7 +54,7 @@ @RunWith(SpringRunner.class) @WebMvcTest(DescriptionApiController.class) -@DirtiesContext(classMode = ClassMode.AFTER_EACH_TEST_METHOD) +@DirtiesContext(classMode = ClassMode.AFTER_CLASS) @TestPropertySource(properties = { "description.profiles=https://admin-shell.io/aas/API/3/0/SubmodelRegistryServiceSpecification/SSP-001,https://admin-shell.io/aas/API/3/0/DiscoveryServiceSpecification/SSP-001" }) public class DescriptionProfilesTest { From 839a426ab0ce9eb70efe7272f956d9456bc67e7f Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Thu, 29 Aug 2024 16:30:21 +0200 Subject: [PATCH 39/57] Changes workflow --- .github/workflows/docker_test.yml | 18 ++--- ci/docker-compose-ci.yml | 119 ++++++++++++++++++++++++++++++ ci/docker-compose-registries.yml | 112 ++++++++++++++++++++++++++++ ci/docker-compose.yml | 30 ++++---- 4 files changed, 255 insertions(+), 24 deletions(-) create mode 100644 ci/docker-compose-ci.yml create mode 100644 ci/docker-compose-registries.yml diff --git a/.github/workflows/docker_test.yml b/.github/workflows/docker_test.yml index 13da8d551..942037cfd 100644 --- a/.github/workflows/docker_test.yml +++ b/.github/workflows/docker_test.yml @@ -862,7 +862,7 @@ jobs: distribution: 'adopt' cache: maven - name: Start environment - run: docker compose --project-directory ./ci up -d --wait + run: docker compose --project-directory ./ci -f ./ci/docker-compose-ci.yml up -d --wait - name: Build BaSyx run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Install BaSyx @@ -882,7 +882,7 @@ jobs: distribution: 'adopt' cache: maven - name: Start environment - run: docker compose --project-directory ./ci up -d --wait + run: docker compose --project-directory ./ci -f ./ci/docker-compose-ci.yml up -d --wait - name: Build BaSyx run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Install BaSyx @@ -901,7 +901,7 @@ jobs: distribution: 'adopt' cache: maven - name: Start environment - run: docker compose --project-directory ./ci up -d --wait + run: docker compose --project-directory ./ci -f ./ci/docker-compose-ci.yml up -d --wait - name: Build BaSyx run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Install BaSyx @@ -921,7 +921,7 @@ jobs: distribution: 'adopt' cache: maven - name: Start environment - run: docker compose --project-directory ./ci up -d --wait + run: docker compose --project-directory ./ci -f ./ci/docker-compose-ci.yml up -d --wait - name: Build BaSyx run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Install BaSyx @@ -941,7 +941,7 @@ jobs: distribution: 'adopt' cache: maven - name: Start environment - run: docker compose --project-directory ./ci up -d --wait + run: docker compose --project-directory ./ci -f ./ci/docker-compose-ci.yml up -d --wait - name: Build BaSyx run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Install BaSyx @@ -960,7 +960,7 @@ jobs: distribution: 'adopt' cache: maven - name: Start environment - run: docker compose --project-directory ./ci up -d --wait + run: docker compose --project-directory ./ci -f ./ci/docker-compose-ci.yml up -d --wait - name: Build BaSyx run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Install BaSyx @@ -980,7 +980,7 @@ jobs: distribution: 'adopt' cache: maven - name: Start environment - run: docker compose --project-directory ./ci up -d --wait + run: docker compose --project-directory ./ci -f ./ci/docker-compose-registries.yml up -d --wait - name: Build BaSyx run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Install BaSyx @@ -1000,7 +1000,7 @@ jobs: distribution: 'adopt' cache: maven - name: Start environment - run: docker compose --project-directory ./ci up -d --wait + run: docker compose --project-directory ./ci -f ./ci/docker-compose-registries.yml up -d --wait - name: Build BaSyx run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Install BaSyx @@ -1020,7 +1020,7 @@ jobs: distribution: 'adopt' cache: maven - name: Start environment - run: docker compose --project-directory ./ci up -d --wait + run: docker compose --project-directory ./ci -f ./ci/docker-compose-ci.yml up -d --wait - name: Build BaSyx run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Install BaSyx diff --git a/ci/docker-compose-ci.yml b/ci/docker-compose-ci.yml new file mode 100644 index 000000000..900e0ccd1 --- /dev/null +++ b/ci/docker-compose-ci.yml @@ -0,0 +1,119 @@ +version: "3.9" +services: + mongo: + image: mongo:5.0.10 + # Provide mongo config + restart: always + environment: + MONGO_INITDB_ROOT_USERNAME: mongoAdmin + MONGO_INITDB_ROOT_PASSWORD: mongoPassword + # Set health checks to wait until mongo has started + healthcheck: + test: mongo + interval: 10s + start_period: 5s + retries: 5 + # Maps tcp port to host + ports: + - 27017:27017 + networks: + - basyx-java-server-sdk + + aas-registry-log-mem: + image: eclipsebasyx/aas-registry-log-mem:$BASYX_VERSION + container_name: aas-registry-log-mem + ports: + - "8050:8080" + environment: + SERVER_SERVLET_CONTEXT_PATH: / + restart: always + networks: + - basyx-java-server-sdk + + sm-registry-log-mem: + image: eclipsebasyx/submodel-registry-log-mem:$BASYX_VERSION + container_name: sm-registry-log-mem + environment: + SERVER_SERVLET_CONTEXT_PATH: / + ports: + - "8060:8080" + restart: always + networks: + - basyx-java-server-sdk + + secured-aas-registry-log-mem: + image: eclipsebasyx/aas-registry-log-mem:$BASYX_VERSION + container_name: secured-aas-registry-log-mem + ports: + - "8051:8080" + environment: + SERVER_SERVLET_CONTEXT_PATH: / + BASYX_CORS_ALLOWED_ORIGINS: '*' + BASYX_CORS_ALLOWED_METHODS: GET,POST,PATCH,DELETE,PUT,OPTIONS,HEAD + BASYX_FEATURE_AUTHORIZATION_ENABLED: true + BASYX_FEATURE_AUTHORIZATION_TYPE: rbac + BASYX_FEATURE_AUTHORIZATION_JWTBEARERTOKENPROVIDER: keycloak + SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_ISSUER_URI: http://keycloak:8080/realms/BaSyx + BASYX_FEATURE_AUTHORIZATION_RBAC_FILE: file:/rbac/rbac_rules.json + volumes: + - ./keycloak/rules/rbac_rules-aas-registry.json:/rbac/rbac_rules.json:ro + restart: always + networks: + - basyx-java-server-sdk + + secured-sm-registry-log-mem: + image: eclipsebasyx/submodel-registry-log-mem:$BASYX_VERSION + container_name: secured-sm-registry-log-mem + environment: + SERVER_SERVLET_CONTEXT_PATH: / + BASYX_CORS_ALLOWED_ORIGINS: '*' + BASYX_CORS_ALLOWED_METHODS: GET,POST,PATCH,DELETE,PUT,OPTIONS,HEAD + BASYX_FEATURE_AUTHORIZATION_ENABLED: true + BASYX_FEATURE_AUTHORIZATION_TYPE: rbac + BASYX_FEATURE_AUTHORIZATION_JWTBEARERTOKENPROVIDER: keycloak + SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_ISSUER_URI: http://keycloak:8080/realms/BaSyx + BASYX_FEATURE_AUTHORIZATION_RBAC_FILE: file:/rbac/rbac_rules.json + volumes: + - ./keycloak/rules/rbac_rules-sm-registry.json:/rbac/rbac_rules.json:ro + ports: + - "8061:8080" + restart: always + networks: + - basyx-java-server-sdk + + keycloak: + build: + context: ./keycloak + volumes: + - ./keycloak/realm:/opt/jboss/keycloak/imports + ports: + - 9096:8080 + environment: + - KEYCLOAK_ADMIN=admin + - KEYCLOAK_ADMIN_PASSWORD=admin + networks: + - basyx-java-server-sdk + + keycloak-fixed-uri: + image: eclipsebasyx/keycloak:0.0.1 + build: + context: ./keycloak + dockerfile: Dockerfile.keycloak + container_name: keycloak-fixed-uri + environment: + KC_HOSTNAME: localhost + KC_SPI_INITIALIZER_ISSUER_BASE_URI: http://keycloak:8080 + KEYCLOAK_ADMIN: admin + KEYCLOAK_ADMIN_PASSWORD: keycloak-admin + command: ["start-dev", "--import-realm"] + ports: + - 9097:8080 + volumes: + - ./keycloak/realm:/opt/keycloak/data/import:ro + networks: + - basyx-java-server-sdk + +networks: + basyx-java-server-sdk: + name: basyx-java-server-sdk + driver: bridge diff --git a/ci/docker-compose-registries.yml b/ci/docker-compose-registries.yml new file mode 100644 index 000000000..1b0692b73 --- /dev/null +++ b/ci/docker-compose-registries.yml @@ -0,0 +1,112 @@ +version: "3.9" +services: + mongo: + image: mongo:5.0.10 + # Provide mongo config + restart: always + environment: + MONGO_INITDB_ROOT_USERNAME: mongoAdmin + MONGO_INITDB_ROOT_PASSWORD: mongoPassword + # Set health checks to wait until mongo has started + healthcheck: + test: mongo + interval: 10s + start_period: 5s + retries: 5 + # Maps tcp port to host + ports: + - 27017:27017 + networks: + - basyx-java-server-sdk + + zookeeper: + image: confluentinc/cp-zookeeper:7.5.2 + environment: + ZOOKEEPER_CLIENT_PORT: 2181 + ZOOKEEPER_TICK_TIME: 2000 + healthcheck: + test: nc -z localhost 2181 || exit -1 + interval: 10s + timeout: 5s + retries: 10 + start_period: 10s + networks: + - basyx-java-server-sdk + + akhq: + image: tchiotludo/akhq:0.24.0 + container_name: akhq + environment: + AKHQ_CONFIGURATION: | + akhq: + connections: + docker-kafka-server: + properties: + bootstrap.servers: "kafka:29092" + ports: + - 8086:8080 + restart: always + depends_on: + - kafka + networks: + - basyx-java-server-sdk + + kafka: + image: confluentinc/cp-kafka:7.5.2 + ports: + - 9092:9092 + environment: + KAFKA_BROKER_ID: 1 + KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 + KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092 + KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT + KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT + KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 + healthcheck: + test: nc -z localhost 9092 || exit -1 + interval: 5s + timeout: 10s + retries: 10 + start_period: 15s + depends_on: + zookeeper: + condition: service_healthy + networks: + - basyx-java-server-sdk + + keycloak: + build: + context: ./keycloak + volumes: + - ./keycloak/realm:/opt/jboss/keycloak/imports + ports: + - 9096:8080 + environment: + - KEYCLOAK_ADMIN=admin + - KEYCLOAK_ADMIN_PASSWORD=admin + networks: + - basyx-java-server-sdk + + keycloak-fixed-uri: + image: eclipsebasyx/keycloak:0.0.1 + build: + context: ./keycloak + dockerfile: Dockerfile.keycloak + container_name: keycloak-fixed-uri + environment: + KC_HOSTNAME: localhost + KC_SPI_INITIALIZER_ISSUER_BASE_URI: http://keycloak:8080 + KEYCLOAK_ADMIN: admin + KEYCLOAK_ADMIN_PASSWORD: keycloak-admin + command: ["start-dev", "--import-realm"] + ports: + - 9097:8080 + volumes: + - ./keycloak/realm:/opt/keycloak/data/import:ro + networks: + - basyx-java-server-sdk + +networks: + basyx-java-server-sdk: + name: basyx-java-server-sdk + driver: bridge diff --git a/ci/docker-compose.yml b/ci/docker-compose.yml index ff216c98d..d1c8de165 100644 --- a/ci/docker-compose.yml +++ b/ci/docker-compose.yml @@ -73,7 +73,7 @@ services: condition: service_healthy networks: - basyx-java-server-sdk - + aas-registry-log-mem: image: eclipsebasyx/aas-registry-log-mem:$BASYX_VERSION container_name: aas-registry-log-mem @@ -84,7 +84,7 @@ services: restart: always networks: - basyx-java-server-sdk - + sm-registry-log-mem: image: eclipsebasyx/submodel-registry-log-mem:$BASYX_VERSION container_name: sm-registry-log-mem @@ -95,7 +95,7 @@ services: restart: always networks: - basyx-java-server-sdk - + secured-aas-registry-log-mem: image: eclipsebasyx/aas-registry-log-mem:$BASYX_VERSION container_name: secured-aas-registry-log-mem @@ -115,7 +115,7 @@ services: restart: always networks: - basyx-java-server-sdk - + secured-sm-registry-log-mem: image: eclipsebasyx/submodel-registry-log-mem:$BASYX_VERSION container_name: secured-sm-registry-log-mem @@ -137,17 +137,17 @@ services: - basyx-java-server-sdk keycloak: - build: - context: ./keycloak - volumes: - - ./keycloak/realm:/opt/jboss/keycloak/imports - ports: - - 9096:8080 - environment: - - KEYCLOAK_ADMIN=admin - - KEYCLOAK_ADMIN_PASSWORD=admin - networks: - - basyx-java-server-sdk + build: + context: ./keycloak + volumes: + - ./keycloak/realm:/opt/jboss/keycloak/imports + ports: + - 9096:8080 + environment: + - KEYCLOAK_ADMIN=admin + - KEYCLOAK_ADMIN_PASSWORD=admin + networks: + - basyx-java-server-sdk keycloak-fixed-uri: image: eclipsebasyx/keycloak:0.0.1 From 7352350c5771ff89882f582a1d01e0f9e74e3362 Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Fri, 30 Aug 2024 08:14:18 +0200 Subject: [PATCH 40/57] Changes POM --- pom.xml | 76 +++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 50 insertions(+), 26 deletions(-) diff --git a/pom.xml b/pom.xml index 5801f1dae..a87d6eec6 100644 --- a/pom.xml +++ b/pom.xml @@ -94,20 +94,6 @@ - - org.eclipse.dash - license-tool-plugin - 1.1.1-SNAPSHOT - - - license-check - - license-check - - - - - org.codehaus.mojo flatten-maven-plugin @@ -177,18 +163,6 @@ - - org.apache.maven.plugins - maven-javadoc-plugin - - - attach-javadocs - - jar - - - - @@ -1265,6 +1239,31 @@ org.apache.maven.plugins maven-gpg-plugin + + org.eclipse.dash + license-tool-plugin + 1.1.1-SNAPSHOT + + + license-check + + license-check + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + + + attach-javadocs + + jar + + + + @@ -1286,6 +1285,31 @@ + + org.eclipse.dash + license-tool-plugin + 1.1.1-SNAPSHOT + + + license-check + + license-check + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + + + attach-javadocs + + jar + + + + From 74aec4af171de6df4d3ecedd60cbbebda0886f57 Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Fri, 30 Aug 2024 08:30:23 +0200 Subject: [PATCH 41/57] Refactors Workflow --- .github/workflows/docker_test.yml | 434 +----------------- .../scripts/build_start_docker_image.sh | 43 ++ 2 files changed, 57 insertions(+), 420 deletions(-) create mode 100644 .github/workflows/scripts/build_start_docker_image.sh diff --git a/.github/workflows/docker_test.yml b/.github/workflows/docker_test.yml index 942037cfd..8fbe41cf3 100644 --- a/.github/workflows/docker_test.yml +++ b/.github/workflows/docker_test.yml @@ -47,36 +47,7 @@ jobs: mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasrepository.component" - name: Test AAS Repository Docker Image - run: | - docker run -d --name test_aas_repository test/aas-repository:${VERSION} - - # Initialize variables - max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) - sleep_interval=5 # Interval in seconds between checks - check_count=0 - - # Loop to check health status - while [ $check_count -lt $max_checks ]; do - if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aas_repository)" == "healthy" ]; then - echo "AAS Repository started successfully and is healthy." - break - else - echo "Waiting for AAS Repository to become healthy..." - check_count=$((check_count + 1)) - sleep $sleep_interval - fi - done - - # If the container is still not healthy after the loop - if [ $check_count -eq $max_checks ]; then - echo "AAS Repository failed to start or is unhealthy after 2 minutes." - docker logs test_aas_repository - exit 1 - fi - - # Stop and remove the container after testing - docker stop test_aas_repository - docker rm test_aas_repository + run: ./.github/workflows/scripts/build_start_docker_image.sh test/aas-repository ${VERSION} test_aas_repository - name: Clean up run: exit 0 @@ -102,36 +73,7 @@ jobs: mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasenvironment.component" - name: Test AAS Environment Docker Image - run: | - docker run -d --name test_aas_environment test/aas-environment:${VERSION} - - # Initialize variables - max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) - sleep_interval=5 # Interval in seconds between checks - check_count=0 - - # Loop to check health status - while [ $check_count -lt $max_checks ]; do - if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aas_environment)" == "healthy" ]; then - echo "AAS Environment started successfully and is healthy." - break - else - echo "Waiting for AAS Environment to become healthy..." - check_count=$((check_count + 1)) - sleep $sleep_interval - fi - done - - # If the container is still not healthy after the loop - if [ $check_count -eq $max_checks ]; then - echo "AAS Environment failed to start or is unhealthy after 2 minutes." - docker logs test_aas_environment - exit 1 - fi - - # Stop and remove the container after testing - docker stop test_aas_environment - docker rm test_aas_environment + run: ./.github/workflows/scripts/build_start_docker_image.sh test/aas-environment ${VERSION} test_aas_environment - name: Clean up run: exit 0 @@ -157,36 +99,7 @@ jobs: mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.conceptdescriptionrepository.component" - name: Test Concept Description Repository Docker Image - run: | - docker run -d --name test_conceptdescription_repository test/conceptdescription-repository:${VERSION} - - # Initialize variables - max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) - sleep_interval=5 # Interval in seconds between checks - check_count=0 - - # Loop to check health status - while [ $check_count -lt $max_checks ]; do - if [ "$(docker inspect --format='{{.State.Health.Status}}' test_conceptdescription_repository)" == "healthy" ]; then - echo "Concept Description Repository started successfully and is healthy." - break - else - echo "Waiting for Concept Description Repository to become healthy..." - check_count=$((check_count + 1)) - sleep $sleep_interval - fi - done - - # If the container is still not healthy after the loop - if [ $check_count -eq $max_checks ]; then - echo "Concept Description Repository failed to start or is unhealthy after 2 minutes." - docker logs test_conceptdescription_repository - exit 1 - fi - - # Stop and remove the container after testing - docker stop test_conceptdescription_repository - docker rm test_conceptdescription_repository + run: ./.github/workflows/scripts/build_start_docker_image.sh test/conceptdescription-repository ${VERSION} test_conceptdescription_repository - name: Clean up run: exit 0 @@ -212,36 +125,7 @@ jobs: mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasdiscoveryservice.component" - name: Test AAS Discovery Docker Image - run: | - docker run -d --name test_aas_discovery test/aas-discovery:${VERSION} - - # Initialize variables - max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) - sleep_interval=5 # Interval in seconds between checks - check_count=0 - - # Loop to check health status - while [ $check_count -lt $max_checks ]; do - if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aas_discovery)" == "healthy" ]; then - echo "AAS Discovery started successfully and is healthy." - break - else - echo "Waiting for AAS Discovery to become healthy..." - check_count=$((check_count + 1)) - sleep $sleep_interval - fi - done - - # If the container is still not healthy after the loop - if [ $check_count -eq $max_checks ]; then - echo "AAS Discovery failed to start or is unhealthy after 2 minutes." - docker logs test_aas_discovery - exit 1 - fi - - # Stop and remove the container after testing - docker stop test_aas_discovery - docker rm test_aas_discovery + run: ./.github/workflows/scripts/build_start_docker_image.sh test/aas-discovery ${VERSION} test_aas_discovery - name: Clean up run: exit 0 @@ -267,36 +151,7 @@ jobs: mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasxfileserver.component" - name: Test AASX File Server Docker Image - run: | - docker run -d --name test_aasxfileserver test/aasxfileserver:${VERSION} - - # Initialize variables - max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) - sleep_interval=5 # Interval in seconds between checks - check_count=0 - - # Loop to check health status - while [ $check_count -lt $max_checks ]; do - if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aasxfileserver)" == "healthy" ]; then - echo "AASX File Server started successfully and is healthy." - break - else - echo "Waiting for AASX File Server to become healthy..." - check_count=$((check_count + 1)) - sleep $sleep_interval - fi - done - - # If the container is still not healthy after the loop - if [ $check_count -eq $max_checks ]; then - echo "AASX File Server failed to start or is unhealthy after 2 minutes." - docker logs test_aasxfileserver - exit 1 - fi - - # Stop and remove the container after testing - docker stop test_aasxfileserver - docker rm test_aasxfileserver + run: ./.github/workflows/scripts/build_start_docker_image.sh test/aasxfileserver ${VERSION} test_aasxfileserver - name: Clean up run: exit 0 @@ -322,36 +177,7 @@ jobs: mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.submodelrepository.component" - name: Test Submodel Repository Docker Image - run: | - docker run -p 8081:8081 -d --name test_submodel_repository test/submodel-repository:${VERSION} - - # Initialize variables - max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) - sleep_interval=5 # Interval in seconds between checks - check_count=0 - - # Loop to check health status - while [ $check_count -lt $max_checks ]; do - if [ "$(docker inspect --format='{{.State.Health.Status}}' test_submodel_repository)" == "healthy" ]; then - echo "Submodel Repository started successfully and is healthy." - break - else - echo "Waiting for Submodel Repository to become healthy..." - check_count=$((check_count + 1)) - sleep $sleep_interval - fi - done - - # If the container is still not healthy after the loop - if [ $check_count -eq $max_checks ]; then - echo "Submodel Repository failed to start or is unhealthy after 2 minutes." - docker logs test_submodel_repository - exit 1 - fi - - # Stop and remove the container after testing - docker stop test_submodel_repository - docker rm test_submodel_repository + run: ./.github/workflows/scripts/build_start_docker_image.sh test/submodel-repository ${VERSION} test_submodel_repository - name: Clean up run: exit 0 @@ -377,36 +203,7 @@ jobs: mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.submodelservice.example" - name: Test Submodel Service Docker Image - run: | - docker run -d --name test_submodel_service test/standalone_submodel_example:${VERSION} - - # Initialize variables - max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) - sleep_interval=5 # Interval in seconds between checks - check_count=0 - - # Loop to check health status - while [ $check_count -lt $max_checks]; do - if [ "$(docker inspect --format='{{.State.Health.Status}}' test_submodel_service)" == "healthy" ]; then - echo "Submodel Service started successfully and is healthy." - break - else - echo "Waiting for Submodel Service to become healthy..." - check_count=$((check_count + 1)) - sleep $sleep_interval - fi - done - - # If the container is still not healthy after the loop - if [ $check_count -eq $max_checks ]; then - echo "Submodel Service failed to start or is unhealthy after 2 minutes." - docker logs test_submodel_service - exit 1 - fi - - # Stop and remove the container after testing - docker stop test_submodel_service - docker rm test_submodel_service + run: ./.github/workflows/scripts/build_start_docker_image.sh test/submodel-service ${VERSION} test_submodel_service - name: Clean up run: exit 0 @@ -432,36 +229,7 @@ jobs: mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasregistry-service-release-kafka-mem" - name: Test AAS Registry Kafka Mem Docker Image - run: | - docker compose --project-directory ./ci -f ./ci/test-aas-registry-kafka-mem.yml up -d - - # Initialize variables - max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) - sleep_interval=5 # Interval in seconds between checks - check_count=0 - - # Loop to check health status - while [ $check_count -lt $max_checks ]; do - if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aas_registry_kafka_mem)" == "healthy" ]; then - echo "AAS Registry Kafka Mem started successfully and is healthy." - break - else - echo "Waiting for AAS Registry Kafka Mem to become healthy..." - check_count=$((check_count + 1)) - sleep $sleep_interval - fi - done - - # If the container is still not healthy after the loop - if [ $check_count -eq $max_checks ]; then - echo "AAS Registry Kafka Mem failed to start or is unhealthy after 2 minutes." - docker logs test_aas_registry_kafka_mem - exit 1 - fi - - # Stop and remove the container after testing - docker stop test_aas_registry_kafka_mem - docker rm test_aas_registry_kafka_mem + run: ./.github/workflows/scripts/build_start_docker_image.sh test/aas-registry-kafka-mem ${VERSION} test_aas_registry_kafka_mem - name: Clean up run: exit 0 @@ -487,36 +255,7 @@ jobs: mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasregistry-service-release-kafka-mongodb" - name: Test AAS Registry Kafka MongoDB Docker Image - run: | - docker compose --project-directory ./ci -f ./ci/test-aas-registry-kafka-mongodb.yml up -d - - # Initialize variables - max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) - sleep_interval=5 # Interval in seconds between checks - check_count=0 - - # Loop to check health status - while [ $check_count -lt $max_checks ]; do - if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aas_registry_kafka_mongodb)" == "healthy" ]; then - echo "AAS Registry Kafka MongoDB started successfully and is healthy." - break - else - echo "Waiting for AAS Registry Kafka MongoDB to become healthy..." - check_count=$((check_count + 1)) - sleep $sleep_interval - fi - done - - # If the container is still not healthy after the loop - if [ $check_count -eq $max_checks ]; then - echo "AAS Registry Kafka MongoDB failed to start or is unhealthy after 2 minutes." - docker logs test_aas_registry_kafka_mongodb - exit 1 - fi - - # Stop and remove the container after testing - docker stop test_aas_registry_kafka_mongodb - docker rm test_aas_registry_kafka_mongodb + run: ./.github/workflows/scripts/build_start_docker_image.sh test/aas-registry-kafka-mongodb ${VERSION} test_aas_registry_kafka_mongodb - name: Clean up run: exit 0 @@ -542,36 +281,7 @@ jobs: mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasregistry-service-release-log-mem" - name: Test AAS Registry Log Mem Docker Image - run: | - docker run -d --name test_aas_registry_log_mem test/aas-registry-log-mem:${VERSION} - - # Initialize variables - max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) - sleep_interval=5 # Interval in seconds between checks - check_count=0 - - # Loop to check health status - while [ $check_count -lt $max_checks ]; do - if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aas_registry_log_mem)" == "healthy" ]; then - echo "AAS Registry Log Mem started successfully and is healthy." - break - else - echo "Waiting for AAS Registry Log Mem to become healthy..." - check_count=$((check_count + 1)) - sleep $sleep_interval - fi - done - - # If the container is still not healthy after the loop - if [ $check_count -eq $max_checks ]; then - echo "AAS Registry Log Mem failed to start or is unhealthy after 2 minutes." - docker logs test_aas_registry_log_mem - exit 1 - fi - - # Stop and remove the container after testing - docker stop test_aas_registry_log_mem - docker rm test_aas_registry_log_mem + run: ./.github/workflows/scripts/build_start_docker_image.sh test/aas-registry-log-mem ${VERSION} test_aas_registry_log_mem - name: Clean up run: exit 0 @@ -597,36 +307,7 @@ jobs: mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasregistry-service-release-log-mongodb" - name: Test AAS Registry Log MongoDB Docker Image - run: | - docker compose --project-directory ./ci -f ./ci/test-aas-registry-log-mongodb.yml up -d - - # Initialize variables - max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) - sleep_interval=5 # Interval in seconds between checks - check_count=0 - - # Loop to check health status - while [ $check_count -lt $max_checks ]; do - if [ "$(docker inspect --format='{{.State.Health.Status}}' test_aas_registry_log_mongodb)" == "healthy" ]; then - echo "AAS Registry Log MongoDB started successfully and is healthy." - break - else - echo "Waiting for AAS Registry Log MongoDB to become healthy..." - check_count=$((check_count + 1)) - sleep $sleep_interval - fi - done - - # If the container is still not healthy after the loop - if [ $check_count -eq $max_checks ]; then - echo "AAS Registry Log MongoDB failed to start or is unhealthy after 2 minutes." - docker logs test_aas_registry_log_mongodb - exit 1 - fi - - # Stop and remove the container after testing - docker stop test_aas_registry_log_mongodb - docker rm test_aas_registry_log_mongodb + run: ./.github/workflows/scripts/build_start_docker_image.sh test/aas-registry-log-mongodb ${VERSION} test_aas_registry_log_mongodb - name: Clean up run: exit 0 @@ -652,36 +333,7 @@ jobs: mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.submodelregistry-service-release-kafka-mem" - name: Test Submodel Registry Kafka Mem Docker Image - run: | - docker compose --project-directory ./ci -f ./ci/test-submodel-registry-kafka-mem.yml up -d - - # Initialize variables - max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) - sleep_interval=5 # Interval in seconds between checks - check_count=0 - - # Loop to check health status - while [ $check_count -lt $max_checks ]; do - if [ "$(docker inspect --format='{{.State.Health.Status}}' test_submodel_registry_kafka_mem)" == "healthy" ]; then - echo "Submodel Registry Kafka Mem started successfully and is healthy." - break - else - echo "Waiting for Submodel Registry Kafka Mem to become healthy..." - check_count=$((check_count + 1)) - sleep $sleep_interval - fi - done - - # If the container is still not healthy after the loop - if [ $check_count -eq $max_checks ]; then - echo "Submodel Registry Kafka Mem failed to start or is unhealthy after 2 minutes." - docker logs test_submodel_registry_kafka_mem - exit 1 - fi - - # Stop and remove the container after testing - docker stop test_submodel_registry_kafka_mem - docker rm test_submodel_registry_kafka_mem + run: ./.github/workflows/scripts/build_start_docker_image.sh test/submodel-registry-kafka-mem ${VERSION} test_submodel_registry_kafka_mem - name: Clean up run: exit 0 @@ -707,36 +359,7 @@ jobs: mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.submodelregistry-service-release-kafka-mongodb" - name: Test Submodel Registry Kafka MongoDB Docker Image - run: | - docker compose --project-directory ./ci -f ./ci/test-submodel-registry-kafka-mongodb.yml up -d - - # Initialize variables - max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) - sleep_interval=5 # Interval in seconds between checks - check_count=0 - - # Loop to check health status - while [ $check_count -lt $max_checks ]; do - if [ "$(docker inspect --format='{{.State.Health.Status}}' test_submodel_registry_kafka_mongodb)" == "healthy" ]; then - echo "Submodel Registry Kafka MongoDB started successfully and is healthy." - break - else - echo "Waiting for Submodel Registry Kafka MongoDB to become healthy..." - check_count=$((check_count + 1)) - sleep $sleep_interval - fi - done - - # If the container is still not healthy after the loop - if [ $check_count -eq $max_checks ]; then - echo "Submodel Registry Kafka MongoDB failed to start or is unhealthy after 2 minutes." - docker logs test_submodel_registry_kafka_mongodb - exit 1 - fi - - # Stop and remove the container after testing - docker stop test_submodel_registry_kafka_mongodb - docker rm test_submodel_registry_kafka_mongodb + run: ./.github/workflows/scripts/build_start_docker_image.sh test/submodel-registry-kafka-mongodb ${VERSION} test_submodel_registry_kafka_mongodb - name: Clean up run: exit 0 @@ -762,36 +385,7 @@ jobs: mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.submodelregistry-service-release-log-mem" - name: Test Submodel Registry Log Mem Docker Image - run: | - docker run -d --name test_submodel_registry_log_mem test/submodel-registry-log-mem:${VERSION} - - # Initialize variables - max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) - sleep_interval=5 # Interval in seconds between checks - check_count=0 - - # Loop to check health status - while [ $check_count -lt $max_checks ]; do - if [ "$(docker inspect --format='{{.State.Health.Status}}' test_submodel_registry_log_mem)" == "healthy" ]; then - echo "Submodel Registry Log Mem started successfully and is healthy." - break - else - echo "Waiting for Submodel Registry Log Mem to become healthy..." - check_count=$((check_count + 1)) - sleep $sleep_interval - fi - done - - # If the container is still not healthy after the loop - if [ $check_count -eq $max_checks ]; then - echo "Submodel Registry Log Mem failed to start or is unhealthy after 2 minutes." - docker logs test_submodel_registry_log_mem - exit 1 - fi - - # Stop and remove the container after testing - docker stop test_submodel_registry_log_mem - docker rm test_submodel_registry_log_mem + run: ./.github/workflows/scripts/build_start_docker_image.sh test/submodel-registry-log-mem ${VERSION} test_submodel_registry_log_mem - name: Clean up run: exit 0 diff --git a/.github/workflows/scripts/build_start_docker_image.sh b/.github/workflows/scripts/build_start_docker_image.sh new file mode 100644 index 000000000..d4097dd9f --- /dev/null +++ b/.github/workflows/scripts/build_start_docker_image.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +# Check if the correct number of arguments are provided +if [ "$#" -ne 3 ]; then + echo "Usage: $0 " + exit 1 +fi + +# Assign input arguments to variables +IMAGE_NAME=$1 +VERSION=$2 +CONTAINER_NAME=$3 + +# Run the Docker container +docker run -d --name $CONTAINER_NAME $IMAGE_NAME:$VERSION + +# Initialize variables +max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) +sleep_interval=5 # Interval in seconds between checks +check_count=0 + +# Loop to check health status +while [ $check_count -lt $max_checks ]; do + if [ "$(docker inspect --format='{{.State.Health.Status}}' $CONTAINER_NAME)" == "healthy" ]; then + echo "$CONTAINER_NAME started successfully and is healthy." + break + else + echo "Waiting for $CONTAINER_NAME to become healthy..." + check_count=$((check_count + 1)) + sleep $sleep_interval + fi +done + +# If the container is still not healthy after the loop +if [ $check_count -eq $max_checks ]; then + echo "$CONTAINER_NAME failed to start or is unhealthy after 2 minutes." + docker logs $CONTAINER_NAME + exit 1 +fi + +# Stop and remove the container after testing +docker stop $CONTAINER_NAME +docker rm $CONTAINER_NAME From 9bf33936ba1601daa83c9719d07f0a4f3f2122ca Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Fri, 30 Aug 2024 08:34:39 +0200 Subject: [PATCH 42/57] Changes Workflow --- .github/workflows/docker_test.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/docker_test.yml b/.github/workflows/docker_test.yml index 8fbe41cf3..648bde1f2 100644 --- a/.github/workflows/docker_test.yml +++ b/.github/workflows/docker_test.yml @@ -47,7 +47,7 @@ jobs: mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasrepository.component" - name: Test AAS Repository Docker Image - run: ./.github/workflows/scripts/build_start_docker_image.sh test/aas-repository ${VERSION} test_aas_repository + run: chmod +x ./.github/workflows/scripts/build_start_docker_image.sh && ./.github/workflows/scripts/build_start_docker_image.sh test/aas-repository ${VERSION} test_aas_repository - name: Clean up run: exit 0 @@ -73,7 +73,7 @@ jobs: mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasenvironment.component" - name: Test AAS Environment Docker Image - run: ./.github/workflows/scripts/build_start_docker_image.sh test/aas-environment ${VERSION} test_aas_environment + run: chmod +x ./.github/workflows/scripts/build_start_docker_image.sh && ./.github/workflows/scripts/build_start_docker_image.sh test/aas-environment ${VERSION} test_aas_environment - name: Clean up run: exit 0 @@ -99,7 +99,7 @@ jobs: mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.conceptdescriptionrepository.component" - name: Test Concept Description Repository Docker Image - run: ./.github/workflows/scripts/build_start_docker_image.sh test/conceptdescription-repository ${VERSION} test_conceptdescription_repository + run: chmod +x ./.github/workflows/scripts/build_start_docker_image.sh && ./.github/workflows/scripts/build_start_docker_image.sh test/conceptdescription-repository ${VERSION} test_conceptdescription_repository - name: Clean up run: exit 0 @@ -125,7 +125,7 @@ jobs: mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasdiscoveryservice.component" - name: Test AAS Discovery Docker Image - run: ./.github/workflows/scripts/build_start_docker_image.sh test/aas-discovery ${VERSION} test_aas_discovery + run: chmod +x ./.github/workflows/scripts/build_start_docker_image.sh && ./.github/workflows/scripts/build_start_docker_image.sh test/aas-discovery ${VERSION} test_aas_discovery - name: Clean up run: exit 0 @@ -151,7 +151,7 @@ jobs: mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasxfileserver.component" - name: Test AASX File Server Docker Image - run: ./.github/workflows/scripts/build_start_docker_image.sh test/aasxfileserver ${VERSION} test_aasxfileserver + run: chmod +x ./.github/workflows/scripts/build_start_docker_image.sh && ./.github/workflows/scripts/build_start_docker_image.sh test/aasxfileserver ${VERSION} test_aasxfileserver - name: Clean up run: exit 0 @@ -177,7 +177,7 @@ jobs: mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.submodelrepository.component" - name: Test Submodel Repository Docker Image - run: ./.github/workflows/scripts/build_start_docker_image.sh test/submodel-repository ${VERSION} test_submodel_repository + run: chmod +x ./.github/workflows/scripts/build_start_docker_image.sh && ./.github/workflows/scripts/build_start_docker_image.sh test/submodel-repository ${VERSION} test_submodel_repository - name: Clean up run: exit 0 @@ -203,7 +203,7 @@ jobs: mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.submodelservice.example" - name: Test Submodel Service Docker Image - run: ./.github/workflows/scripts/build_start_docker_image.sh test/submodel-service ${VERSION} test_submodel_service + run: chmod +x ./.github/workflows/scripts/build_start_docker_image.sh && ./.github/workflows/scripts/build_start_docker_image.sh test/submodel-service ${VERSION} test_submodel_service - name: Clean up run: exit 0 @@ -229,7 +229,7 @@ jobs: mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasregistry-service-release-kafka-mem" - name: Test AAS Registry Kafka Mem Docker Image - run: ./.github/workflows/scripts/build_start_docker_image.sh test/aas-registry-kafka-mem ${VERSION} test_aas_registry_kafka_mem + run: chmod +x ./.github/workflows/scripts/build_start_docker_image.sh && ./.github/workflows/scripts/build_start_docker_image.sh test/aas-registry-kafka-mem ${VERSION} test_aas_registry_kafka_mem - name: Clean up run: exit 0 @@ -255,7 +255,7 @@ jobs: mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasregistry-service-release-kafka-mongodb" - name: Test AAS Registry Kafka MongoDB Docker Image - run: ./.github/workflows/scripts/build_start_docker_image.sh test/aas-registry-kafka-mongodb ${VERSION} test_aas_registry_kafka_mongodb + run: chmod +x ./.github/workflows/scripts/build_start_docker_image.sh && ./.github/workflows/scripts/build_start_docker_image.sh test/aas-registry-kafka-mongodb ${VERSION} test_aas_registry_kafka_mongodb - name: Clean up run: exit 0 @@ -281,7 +281,7 @@ jobs: mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasregistry-service-release-log-mem" - name: Test AAS Registry Log Mem Docker Image - run: ./.github/workflows/scripts/build_start_docker_image.sh test/aas-registry-log-mem ${VERSION} test_aas_registry_log_mem + run: chmod +x ./.github/workflows/scripts/build_start_docker_image.sh && ./.github/workflows/scripts/build_start_docker_image.sh test/aas-registry-log-mem ${VERSION} test_aas_registry_log_mem - name: Clean up run: exit 0 @@ -307,7 +307,7 @@ jobs: mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasregistry-service-release-log-mongodb" - name: Test AAS Registry Log MongoDB Docker Image - run: ./.github/workflows/scripts/build_start_docker_image.sh test/aas-registry-log-mongodb ${VERSION} test_aas_registry_log_mongodb + run: chmod +x ./.github/workflows/scripts/build_start_docker_image.sh && ./.github/workflows/scripts/build_start_docker_image.sh test/aas-registry-log-mongodb ${VERSION} test_aas_registry_log_mongodb - name: Clean up run: exit 0 @@ -333,7 +333,7 @@ jobs: mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.submodelregistry-service-release-kafka-mem" - name: Test Submodel Registry Kafka Mem Docker Image - run: ./.github/workflows/scripts/build_start_docker_image.sh test/submodel-registry-kafka-mem ${VERSION} test_submodel_registry_kafka_mem + run: chmod +x ./.github/workflows/scripts/build_start_docker_image.sh && ./.github/workflows/scripts/build_start_docker_image.sh test/submodel-registry-kafka-mem ${VERSION} test_submodel_registry_kafka_mem - name: Clean up run: exit 0 @@ -359,7 +359,7 @@ jobs: mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.submodelregistry-service-release-kafka-mongodb" - name: Test Submodel Registry Kafka MongoDB Docker Image - run: ./.github/workflows/scripts/build_start_docker_image.sh test/submodel-registry-kafka-mongodb ${VERSION} test_submodel_registry_kafka_mongodb + run: chmod +x ./.github/workflows/scripts/build_start_docker_image.sh && ./.github/workflows/scripts/build_start_docker_image.sh test/submodel-registry-kafka-mongodb ${VERSION} test_submodel_registry_kafka_mongodb - name: Clean up run: exit 0 @@ -385,7 +385,7 @@ jobs: mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.submodelregistry-service-release-log-mem" - name: Test Submodel Registry Log Mem Docker Image - run: ./.github/workflows/scripts/build_start_docker_image.sh test/submodel-registry-log-mem ${VERSION} test_submodel_registry_log_mem + run: chmod +x ./.github/workflows/scripts/build_start_docker_image.sh && ./.github/workflows/scripts/build_start_docker_image.sh test/submodel-registry-log-mem ${VERSION} test_submodel_registry_log_mem - name: Clean up run: exit 0 From 8256814300549594122a7936b6e7a5b29fb4efb2 Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Fri, 30 Aug 2024 09:10:24 +0200 Subject: [PATCH 43/57] Changes Workflow --- .github/workflows/docker_test.yml | 63 ++++------------ ci/docker-compose-ci.yml | 119 ------------------------------ ci/docker-compose-registries.yml | 112 ---------------------------- 3 files changed, 15 insertions(+), 279 deletions(-) delete mode 100644 ci/docker-compose-ci.yml delete mode 100644 ci/docker-compose-registries.yml diff --git a/.github/workflows/docker_test.yml b/.github/workflows/docker_test.yml index 648bde1f2..8d5432017 100644 --- a/.github/workflows/docker_test.yml +++ b/.github/workflows/docker_test.yml @@ -183,7 +183,6 @@ jobs: run: exit 0 build-test-submodel-service: - runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -209,7 +208,6 @@ jobs: run: exit 0 build-test-aas-registry-kafka-mem: - runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -229,13 +227,12 @@ jobs: mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasregistry-service-release-kafka-mem" - name: Test AAS Registry Kafka Mem Docker Image - run: chmod +x ./.github/workflows/scripts/build_start_docker_image.sh && ./.github/workflows/scripts/build_start_docker_image.sh test/aas-registry-kafka-mem ${VERSION} test_aas_registry_kafka_mem + run: chmod +x ./.github/workflows/scripts/build_start_docker_image_docker_compose.sh && ./.github/workflows/scripts/build_start_docker_image_docker_compose.sh ./ci/test-aas-registry-kafka-mem.yml - name: Clean up run: exit 0 build-test-aas-registry-kafka-mongodb: - runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -255,13 +252,12 @@ jobs: mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasregistry-service-release-kafka-mongodb" - name: Test AAS Registry Kafka MongoDB Docker Image - run: chmod +x ./.github/workflows/scripts/build_start_docker_image.sh && ./.github/workflows/scripts/build_start_docker_image.sh test/aas-registry-kafka-mongodb ${VERSION} test_aas_registry_kafka_mongodb + run: chmod +x ./.github/workflows/scripts/build_start_docker_image_docker_compose.sh && ./.github/workflows/scripts/build_start_docker_image_docker_compose.sh ./ci/test-aas-registry-kafka-mongodb.yml - name: Clean up run: exit 0 build-test-aas-registry-log-mem: - runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -307,7 +303,7 @@ jobs: mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasregistry-service-release-log-mongodb" - name: Test AAS Registry Log MongoDB Docker Image - run: chmod +x ./.github/workflows/scripts/build_start_docker_image.sh && ./.github/workflows/scripts/build_start_docker_image.sh test/aas-registry-log-mongodb ${VERSION} test_aas_registry_log_mongodb + run: chmod +x ./.github/workflows/scripts/build_start_docker_image_docker_compose.sh && ./.github/workflows/scripts/build_start_docker_image_docker_compose.sh ./ci/test-aas-registry-log-mongodb.yml - name: Clean up run: exit 0 @@ -333,7 +329,7 @@ jobs: mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.submodelregistry-service-release-kafka-mem" - name: Test Submodel Registry Kafka Mem Docker Image - run: chmod +x ./.github/workflows/scripts/build_start_docker_image.sh && ./.github/workflows/scripts/build_start_docker_image.sh test/submodel-registry-kafka-mem ${VERSION} test_submodel_registry_kafka_mem + run: chmod +x ./.github/workflows/scripts/build_start_docker_image_docker_compose.sh && ./.github/workflows/scripts/build_start_docker_image_docker_compose.sh ./ci/test-submodel-registry-kafka-mem.yml - name: Clean up run: exit 0 @@ -359,7 +355,7 @@ jobs: mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.submodelregistry-service-release-kafka-mongodb" - name: Test Submodel Registry Kafka MongoDB Docker Image - run: chmod +x ./.github/workflows/scripts/build_start_docker_image.sh && ./.github/workflows/scripts/build_start_docker_image.sh test/submodel-registry-kafka-mongodb ${VERSION} test_submodel_registry_kafka_mongodb + run: chmod +x ./.github/workflows/scripts/build_start_docker_image_docker_compose.sh && ./.github/workflows/scripts/build_start_docker_image_docker_compose.sh ./ci/test-submodel-registry-kafka-mongodb.yml - name: Clean up run: exit 0 @@ -411,36 +407,7 @@ jobs: mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.submodelregistry-service-release-log-mongodb" - name: Test Submodel Registry Log MongoDB Docker Image - run: | - docker compose --project-directory ./ci -f ./ci/test-submodel-registry-log-mongodb.yml up -d - - # Initialize variables - max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) - sleep_interval=5 # Interval in seconds between checks - check_count=0 - - # Loop to check health status - while [ $check_count -lt $max_checks ]; do - if [ "$(docker inspect --format='{{.State.Health.Status}}' test_submodel_registry_log_mongodb)" == "healthy" ]; then - echo "Submodel Registry Log MongoDB started successfully and is healthy." - break - else - echo "Waiting for Submodel Registry Log MongoDB to become healthy..." - check_count=$((check_count + 1)) - sleep $sleep_interval - fi - done - - # If the container is still not healthy after the loop - if [ $check_count -eq $max_checks ]; then - echo "Submodel Registry Log MongoDB failed to start or is unhealthy after 2 minutes." - docker logs test_submodel_registry_log_mongodb - exit 1 - fi - - # Stop and remove the container after testing - docker stop test_submodel_registry_log_mongodb - docker rm test_submodel_registry_log_mongodb + run: chmod +x ./.github/workflows/scripts/build_start_docker_image_docker_compose.sh && ./.github/workflows/scripts/build_start_docker_image_docker_compose.sh ./ci/test-submodel-registry-log-mongodb.yml - name: Clean up run: exit 0 @@ -456,7 +423,7 @@ jobs: distribution: 'adopt' cache: maven - name: Start environment - run: docker compose --project-directory ./ci -f ./ci/docker-compose-ci.yml up -d --wait + run: docker compose --project-directory ./ci up -d --wait - name: Build BaSyx run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Install BaSyx @@ -476,7 +443,7 @@ jobs: distribution: 'adopt' cache: maven - name: Start environment - run: docker compose --project-directory ./ci -f ./ci/docker-compose-ci.yml up -d --wait + run: docker compose --project-directory ./ci up -d --wait - name: Build BaSyx run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Install BaSyx @@ -495,7 +462,7 @@ jobs: distribution: 'adopt' cache: maven - name: Start environment - run: docker compose --project-directory ./ci -f ./ci/docker-compose-ci.yml up -d --wait + run: docker compose --project-directory ./ci up -d --wait - name: Build BaSyx run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Install BaSyx @@ -515,7 +482,7 @@ jobs: distribution: 'adopt' cache: maven - name: Start environment - run: docker compose --project-directory ./ci -f ./ci/docker-compose-ci.yml up -d --wait + run: docker compose --project-directory ./ci up -d --wait - name: Build BaSyx run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Install BaSyx @@ -535,7 +502,7 @@ jobs: distribution: 'adopt' cache: maven - name: Start environment - run: docker compose --project-directory ./ci -f ./ci/docker-compose-ci.yml up -d --wait + run: docker compose --project-directory ./ci up -d --wait - name: Build BaSyx run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Install BaSyx @@ -554,7 +521,7 @@ jobs: distribution: 'adopt' cache: maven - name: Start environment - run: docker compose --project-directory ./ci -f ./ci/docker-compose-ci.yml up -d --wait + run: docker compose --project-directory ./ci up -d --wait - name: Build BaSyx run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Install BaSyx @@ -574,7 +541,7 @@ jobs: distribution: 'adopt' cache: maven - name: Start environment - run: docker compose --project-directory ./ci -f ./ci/docker-compose-registries.yml up -d --wait + run: docker compose --project-directory ./ci up -d --wait - name: Build BaSyx run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Install BaSyx @@ -594,7 +561,7 @@ jobs: distribution: 'adopt' cache: maven - name: Start environment - run: docker compose --project-directory ./ci -f ./ci/docker-compose-registries.yml up -d --wait + run: docker compose --project-directory ./ci up -d --wait - name: Build BaSyx run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Install BaSyx @@ -614,7 +581,7 @@ jobs: distribution: 'adopt' cache: maven - name: Start environment - run: docker compose --project-directory ./ci -f ./ci/docker-compose-ci.yml up -d --wait + run: docker compose --project-directory ./ci up -d --wait - name: Build BaSyx run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Install BaSyx diff --git a/ci/docker-compose-ci.yml b/ci/docker-compose-ci.yml deleted file mode 100644 index 900e0ccd1..000000000 --- a/ci/docker-compose-ci.yml +++ /dev/null @@ -1,119 +0,0 @@ -version: "3.9" -services: - mongo: - image: mongo:5.0.10 - # Provide mongo config - restart: always - environment: - MONGO_INITDB_ROOT_USERNAME: mongoAdmin - MONGO_INITDB_ROOT_PASSWORD: mongoPassword - # Set health checks to wait until mongo has started - healthcheck: - test: mongo - interval: 10s - start_period: 5s - retries: 5 - # Maps tcp port to host - ports: - - 27017:27017 - networks: - - basyx-java-server-sdk - - aas-registry-log-mem: - image: eclipsebasyx/aas-registry-log-mem:$BASYX_VERSION - container_name: aas-registry-log-mem - ports: - - "8050:8080" - environment: - SERVER_SERVLET_CONTEXT_PATH: / - restart: always - networks: - - basyx-java-server-sdk - - sm-registry-log-mem: - image: eclipsebasyx/submodel-registry-log-mem:$BASYX_VERSION - container_name: sm-registry-log-mem - environment: - SERVER_SERVLET_CONTEXT_PATH: / - ports: - - "8060:8080" - restart: always - networks: - - basyx-java-server-sdk - - secured-aas-registry-log-mem: - image: eclipsebasyx/aas-registry-log-mem:$BASYX_VERSION - container_name: secured-aas-registry-log-mem - ports: - - "8051:8080" - environment: - SERVER_SERVLET_CONTEXT_PATH: / - BASYX_CORS_ALLOWED_ORIGINS: '*' - BASYX_CORS_ALLOWED_METHODS: GET,POST,PATCH,DELETE,PUT,OPTIONS,HEAD - BASYX_FEATURE_AUTHORIZATION_ENABLED: true - BASYX_FEATURE_AUTHORIZATION_TYPE: rbac - BASYX_FEATURE_AUTHORIZATION_JWTBEARERTOKENPROVIDER: keycloak - SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_ISSUER_URI: http://keycloak:8080/realms/BaSyx - BASYX_FEATURE_AUTHORIZATION_RBAC_FILE: file:/rbac/rbac_rules.json - volumes: - - ./keycloak/rules/rbac_rules-aas-registry.json:/rbac/rbac_rules.json:ro - restart: always - networks: - - basyx-java-server-sdk - - secured-sm-registry-log-mem: - image: eclipsebasyx/submodel-registry-log-mem:$BASYX_VERSION - container_name: secured-sm-registry-log-mem - environment: - SERVER_SERVLET_CONTEXT_PATH: / - BASYX_CORS_ALLOWED_ORIGINS: '*' - BASYX_CORS_ALLOWED_METHODS: GET,POST,PATCH,DELETE,PUT,OPTIONS,HEAD - BASYX_FEATURE_AUTHORIZATION_ENABLED: true - BASYX_FEATURE_AUTHORIZATION_TYPE: rbac - BASYX_FEATURE_AUTHORIZATION_JWTBEARERTOKENPROVIDER: keycloak - SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_ISSUER_URI: http://keycloak:8080/realms/BaSyx - BASYX_FEATURE_AUTHORIZATION_RBAC_FILE: file:/rbac/rbac_rules.json - volumes: - - ./keycloak/rules/rbac_rules-sm-registry.json:/rbac/rbac_rules.json:ro - ports: - - "8061:8080" - restart: always - networks: - - basyx-java-server-sdk - - keycloak: - build: - context: ./keycloak - volumes: - - ./keycloak/realm:/opt/jboss/keycloak/imports - ports: - - 9096:8080 - environment: - - KEYCLOAK_ADMIN=admin - - KEYCLOAK_ADMIN_PASSWORD=admin - networks: - - basyx-java-server-sdk - - keycloak-fixed-uri: - image: eclipsebasyx/keycloak:0.0.1 - build: - context: ./keycloak - dockerfile: Dockerfile.keycloak - container_name: keycloak-fixed-uri - environment: - KC_HOSTNAME: localhost - KC_SPI_INITIALIZER_ISSUER_BASE_URI: http://keycloak:8080 - KEYCLOAK_ADMIN: admin - KEYCLOAK_ADMIN_PASSWORD: keycloak-admin - command: ["start-dev", "--import-realm"] - ports: - - 9097:8080 - volumes: - - ./keycloak/realm:/opt/keycloak/data/import:ro - networks: - - basyx-java-server-sdk - -networks: - basyx-java-server-sdk: - name: basyx-java-server-sdk - driver: bridge diff --git a/ci/docker-compose-registries.yml b/ci/docker-compose-registries.yml deleted file mode 100644 index 1b0692b73..000000000 --- a/ci/docker-compose-registries.yml +++ /dev/null @@ -1,112 +0,0 @@ -version: "3.9" -services: - mongo: - image: mongo:5.0.10 - # Provide mongo config - restart: always - environment: - MONGO_INITDB_ROOT_USERNAME: mongoAdmin - MONGO_INITDB_ROOT_PASSWORD: mongoPassword - # Set health checks to wait until mongo has started - healthcheck: - test: mongo - interval: 10s - start_period: 5s - retries: 5 - # Maps tcp port to host - ports: - - 27017:27017 - networks: - - basyx-java-server-sdk - - zookeeper: - image: confluentinc/cp-zookeeper:7.5.2 - environment: - ZOOKEEPER_CLIENT_PORT: 2181 - ZOOKEEPER_TICK_TIME: 2000 - healthcheck: - test: nc -z localhost 2181 || exit -1 - interval: 10s - timeout: 5s - retries: 10 - start_period: 10s - networks: - - basyx-java-server-sdk - - akhq: - image: tchiotludo/akhq:0.24.0 - container_name: akhq - environment: - AKHQ_CONFIGURATION: | - akhq: - connections: - docker-kafka-server: - properties: - bootstrap.servers: "kafka:29092" - ports: - - 8086:8080 - restart: always - depends_on: - - kafka - networks: - - basyx-java-server-sdk - - kafka: - image: confluentinc/cp-kafka:7.5.2 - ports: - - 9092:9092 - environment: - KAFKA_BROKER_ID: 1 - KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 - KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092 - KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT - KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT - KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 - healthcheck: - test: nc -z localhost 9092 || exit -1 - interval: 5s - timeout: 10s - retries: 10 - start_period: 15s - depends_on: - zookeeper: - condition: service_healthy - networks: - - basyx-java-server-sdk - - keycloak: - build: - context: ./keycloak - volumes: - - ./keycloak/realm:/opt/jboss/keycloak/imports - ports: - - 9096:8080 - environment: - - KEYCLOAK_ADMIN=admin - - KEYCLOAK_ADMIN_PASSWORD=admin - networks: - - basyx-java-server-sdk - - keycloak-fixed-uri: - image: eclipsebasyx/keycloak:0.0.1 - build: - context: ./keycloak - dockerfile: Dockerfile.keycloak - container_name: keycloak-fixed-uri - environment: - KC_HOSTNAME: localhost - KC_SPI_INITIALIZER_ISSUER_BASE_URI: http://keycloak:8080 - KEYCLOAK_ADMIN: admin - KEYCLOAK_ADMIN_PASSWORD: keycloak-admin - command: ["start-dev", "--import-realm"] - ports: - - 9097:8080 - volumes: - - ./keycloak/realm:/opt/keycloak/data/import:ro - networks: - - basyx-java-server-sdk - -networks: - basyx-java-server-sdk: - name: basyx-java-server-sdk - driver: bridge From 05664318dedcd5548fe20c6320aa1d036ef6a9c1 Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Fri, 30 Aug 2024 09:12:37 +0200 Subject: [PATCH 44/57] Changes Workflow --- .github/workflows/basyx_test.yml | 203 ++++++++++++++++++++++++++++++ .github/workflows/docker_test.yml | 178 -------------------------- 2 files changed, 203 insertions(+), 178 deletions(-) create mode 100644 .github/workflows/basyx_test.yml diff --git a/.github/workflows/basyx_test.yml b/.github/workflows/basyx_test.yml new file mode 100644 index 000000000..935a2a2da --- /dev/null +++ b/.github/workflows/basyx_test.yml @@ -0,0 +1,203 @@ +name: Build and Test BaSyx + +on: + pull_request: + branches: [ main ] + paths-ignore: + - '.github/ISSUE_TEMPLATE/**' + - '.github/CODE_OF_CONDUCT.md' + - '.github/CODING_CONVENTIONS.md' + - '.github/CONTRIBUTING.md' + - '.github/dependabot.yml' + - '.github/pull_request_template.md' + - '.github/SECURITY.md' + - 'docs/**' + - 'examples/**' + - 'README.md' + - '.gitattributes' + - '.gitignore' + - 'LICENSE' + - 'NOTICE' + +env: + MVN_ARGS_BUILD_BASYX_NO_TESTS: -DskipTests -T1C + +jobs: + test-basyx-aasenvironment: + runs-on: ubuntu-latest + name: Test BaSyx AAS Environment + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + cache: maven + - name: Start environment + run: docker compose --project-directory ./ci up -d --wait + - name: Build BaSyx + run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} + - name: Install BaSyx + run: mvn clean install -f "basyx.aasenvironment/pom.xml" + - name: Stop environment + if: always() + run: docker compose --project-directory ./ci down + test-basyx-aasrepository: + runs-on: ubuntu-latest + name: Test BaSyx AAS Repository + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + cache: maven + - name: Start environment + run: docker compose --project-directory ./ci up -d --wait + - name: Build BaSyx + run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} + - name: Install BaSyx + run: mvn clean install -f "basyx.aasrepository/pom.xml" + - name: Stop environment + if: always() + run: docker compose --project-directory ./ci down + test-basyx-aasservice: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + cache: maven + - name: Start environment + run: docker compose --project-directory ./ci up -d --wait + - name: Build BaSyx + run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} + - name: Install BaSyx + run: mvn clean install -f "basyx.aasservice/pom.xml" + - name: Stop environment + if: always() + run: docker compose --project-directory ./ci down + test-basyx-submodelrepository: + runs-on: ubuntu-latest + name: Test BaSyx Submodel Repository + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + cache: maven + - name: Start environment + run: docker compose --project-directory ./ci up -d --wait + - name: Build BaSyx + run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} + - name: Install BaSyx + run: mvn clean install -f "basyx.submodelrepository/pom.xml" + - name: Stop environment + if: always() + run: docker compose --project-directory ./ci down + test-basyx-submodelservice: + runs-on: ubuntu-latest + name: Test BaSyx Submodel Service + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + cache: maven + - name: Start environment + run: docker compose --project-directory ./ci up -d --wait + - name: Build BaSyx + run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} + - name: Install BaSyx + run: mvn clean install -f "basyx.submodelservice/pom.xml" + - name: Stop environment + if: always() + run: docker compose --project-directory ./ci down + test-basyx-conceptdescriptionrepository: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + cache: maven + - name: Start environment + run: docker compose --project-directory ./ci up -d --wait + - name: Build BaSyx + run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} + - name: Install BaSyx + run: mvn clean install -f "basyx.conceptdescriptionrepository/pom.xml" + - name: Stop environment + if: always() + run: docker compose --project-directory ./ci down + test-basyx-submodelregistry: + runs-on: ubuntu-latest + name: Test BaSyx Submodel Registry + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + cache: maven + - name: Start environment + run: docker compose --project-directory ./ci up -d --wait + - name: Build BaSyx + run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} + - name: Install BaSyx + run: mvn clean install -f "basyx.submodelregistry/pom.xml" + - name: Stop environment + if: always() + run: docker compose --project-directory ./ci down + test-basyx-aasregistry: + runs-on: ubuntu-latest + name: Test BaSyx AAS Registry + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + cache: maven + - name: Start environment + run: docker compose --project-directory ./ci up -d --wait + - name: Build BaSyx + run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} + - name: Install BaSyx + run: mvn clean install -f "basyx.aasregistry/pom.xml" + - name: Stop environment + if: always() + run: docker compose --project-directory ./ci down + test-basyx-aasdiscoveryservice: + runs-on: ubuntu-latest + name: Test BaSyx AAS Discovery Service + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + cache: maven + - name: Start environment + run: docker compose --project-directory ./ci up -d --wait + - name: Build BaSyx + run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} + - name: Install BaSyx + run: mvn clean install -f "basyx.aasdiscoveryservice/pom.xml" + - name: Stop environment + if: always() + run: docker compose --project-directory ./ci down \ No newline at end of file diff --git a/.github/workflows/docker_test.yml b/.github/workflows/docker_test.yml index 8d5432017..869ba86f5 100644 --- a/.github/workflows/docker_test.yml +++ b/.github/workflows/docker_test.yml @@ -411,181 +411,3 @@ jobs: - name: Clean up run: exit 0 - test-basyx-aasenvironment: - runs-on: ubuntu-latest - name: Test BaSyx AAS Environment - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'adopt' - cache: maven - - name: Start environment - run: docker compose --project-directory ./ci up -d --wait - - name: Build BaSyx - run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - - name: Install BaSyx - run: mvn clean install -f "basyx.aasenvironment/pom.xml" - - name: Stop environment - if: always() - run: docker compose --project-directory ./ci down - test-basyx-aasrepository: - runs-on: ubuntu-latest - name: Test BaSyx AAS Repository - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'adopt' - cache: maven - - name: Start environment - run: docker compose --project-directory ./ci up -d --wait - - name: Build BaSyx - run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - - name: Install BaSyx - run: mvn clean install -f "basyx.aasrepository/pom.xml" - - name: Stop environment - if: always() - run: docker compose --project-directory ./ci down - test-basyx-aasservice: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'adopt' - cache: maven - - name: Start environment - run: docker compose --project-directory ./ci up -d --wait - - name: Build BaSyx - run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - - name: Install BaSyx - run: mvn clean install -f "basyx.aasservice/pom.xml" - - name: Stop environment - if: always() - run: docker compose --project-directory ./ci down - test-basyx-submodelrepository: - runs-on: ubuntu-latest - name: Test BaSyx Submodel Repository - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'adopt' - cache: maven - - name: Start environment - run: docker compose --project-directory ./ci up -d --wait - - name: Build BaSyx - run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - - name: Install BaSyx - run: mvn clean install -f "basyx.submodelrepository/pom.xml" - - name: Stop environment - if: always() - run: docker compose --project-directory ./ci down - test-basyx-submodelservice: - runs-on: ubuntu-latest - name: Test BaSyx Submodel Service - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'adopt' - cache: maven - - name: Start environment - run: docker compose --project-directory ./ci up -d --wait - - name: Build BaSyx - run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - - name: Install BaSyx - run: mvn clean install -f "basyx.submodelservice/pom.xml" - - name: Stop environment - if: always() - run: docker compose --project-directory ./ci down - test-basyx-conceptdescriptionrepository: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'adopt' - cache: maven - - name: Start environment - run: docker compose --project-directory ./ci up -d --wait - - name: Build BaSyx - run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - - name: Install BaSyx - run: mvn clean install -f "basyx.conceptdescriptionrepository/pom.xml" - - name: Stop environment - if: always() - run: docker compose --project-directory ./ci down - test-basyx-submodelregistry: - runs-on: ubuntu-latest - name: Test BaSyx Submodel Registry - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'adopt' - cache: maven - - name: Start environment - run: docker compose --project-directory ./ci up -d --wait - - name: Build BaSyx - run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - - name: Install BaSyx - run: mvn clean install -f "basyx.submodelregistry/pom.xml" - - name: Stop environment - if: always() - run: docker compose --project-directory ./ci down - test-basyx-aasregistry: - runs-on: ubuntu-latest - name: Test BaSyx AAS Registry - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'adopt' - cache: maven - - name: Start environment - run: docker compose --project-directory ./ci up -d --wait - - name: Build BaSyx - run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - - name: Install BaSyx - run: mvn clean install -f "basyx.aasregistry/pom.xml" - - name: Stop environment - if: always() - run: docker compose --project-directory ./ci down - test-basyx-aasdiscoveryservice: - runs-on: ubuntu-latest - name: Test BaSyx AAS Discovery Service - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'adopt' - cache: maven - - name: Start environment - run: docker compose --project-directory ./ci up -d --wait - - name: Build BaSyx - run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - - name: Install BaSyx - run: mvn clean install -f "basyx.aasdiscoveryservice/pom.xml" - - name: Stop environment - if: always() - run: docker compose --project-directory ./ci down \ No newline at end of file From 3a420d9103a75c41b9aa4f4bac918a66264b38f5 Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Fri, 30 Aug 2024 09:14:06 +0200 Subject: [PATCH 45/57] Changes Workflow --- .github/workflows/basyx_test.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/basyx_test.yml b/.github/workflows/basyx_test.yml index 935a2a2da..29cd25ea6 100644 --- a/.github/workflows/basyx_test.yml +++ b/.github/workflows/basyx_test.yml @@ -39,7 +39,7 @@ jobs: - name: Build BaSyx run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Install BaSyx - run: mvn clean install -f "basyx.aasenvironment/pom.xml" + run: mvn test -f "basyx.aasenvironment/pom.xml" - name: Stop environment if: always() run: docker compose --project-directory ./ci down @@ -59,7 +59,7 @@ jobs: - name: Build BaSyx run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Install BaSyx - run: mvn clean install -f "basyx.aasrepository/pom.xml" + run: mvn test -f "basyx.aasrepository/pom.xml" - name: Stop environment if: always() run: docker compose --project-directory ./ci down @@ -78,7 +78,7 @@ jobs: - name: Build BaSyx run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Install BaSyx - run: mvn clean install -f "basyx.aasservice/pom.xml" + run: mvn test -f "basyx.aasservice/pom.xml" - name: Stop environment if: always() run: docker compose --project-directory ./ci down @@ -98,7 +98,7 @@ jobs: - name: Build BaSyx run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Install BaSyx - run: mvn clean install -f "basyx.submodelrepository/pom.xml" + run: mvn test -f "basyx.submodelrepository/pom.xml" - name: Stop environment if: always() run: docker compose --project-directory ./ci down @@ -118,7 +118,7 @@ jobs: - name: Build BaSyx run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Install BaSyx - run: mvn clean install -f "basyx.submodelservice/pom.xml" + run: mvn test -f "basyx.submodelservice/pom.xml" - name: Stop environment if: always() run: docker compose --project-directory ./ci down @@ -137,7 +137,7 @@ jobs: - name: Build BaSyx run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Install BaSyx - run: mvn clean install -f "basyx.conceptdescriptionrepository/pom.xml" + run: mvn test -f "basyx.conceptdescriptionrepository/pom.xml" - name: Stop environment if: always() run: docker compose --project-directory ./ci down @@ -157,7 +157,7 @@ jobs: - name: Build BaSyx run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Install BaSyx - run: mvn clean install -f "basyx.submodelregistry/pom.xml" + run: mvn test -f "basyx.submodelregistry/pom.xml" - name: Stop environment if: always() run: docker compose --project-directory ./ci down @@ -177,7 +177,7 @@ jobs: - name: Build BaSyx run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Install BaSyx - run: mvn clean install -f "basyx.aasregistry/pom.xml" + run: mvn test -f "basyx.aasregistry/pom.xml" - name: Stop environment if: always() run: docker compose --project-directory ./ci down @@ -197,7 +197,7 @@ jobs: - name: Build BaSyx run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - name: Install BaSyx - run: mvn clean install -f "basyx.aasdiscoveryservice/pom.xml" + run: mvn test -f "basyx.aasdiscoveryservice/pom.xml" - name: Stop environment if: always() run: docker compose --project-directory ./ci down \ No newline at end of file From 72a0de9236a37118528b85aee2e9db873404f2f5 Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Fri, 30 Aug 2024 09:18:13 +0200 Subject: [PATCH 46/57] Adds missing file & Changes Workflow --- .github/workflows/basyx_test.yml | 2 + .github/workflows/docker_test.yml | 26 +++++++------ ...build_start_docker_image_docker_compose.sh | 38 +++++++++++++++++++ 3 files changed, 55 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/scripts/build_start_docker_image_docker_compose.sh diff --git a/.github/workflows/basyx_test.yml b/.github/workflows/basyx_test.yml index 29cd25ea6..db099cfbc 100644 --- a/.github/workflows/basyx_test.yml +++ b/.github/workflows/basyx_test.yml @@ -65,6 +65,7 @@ jobs: run: docker compose --project-directory ./ci down test-basyx-aasservice: runs-on: ubuntu-latest + name: Test BaSyx AAS Service steps: - uses: actions/checkout@v4 - name: Set up JDK 17 @@ -124,6 +125,7 @@ jobs: run: docker compose --project-directory ./ci down test-basyx-conceptdescriptionrepository: runs-on: ubuntu-latest + name: Test BaSyx Concept Description Repository steps: - uses: actions/checkout@v4 - name: Set up JDK 17 diff --git a/.github/workflows/docker_test.yml b/.github/workflows/docker_test.yml index 869ba86f5..074245118 100644 --- a/.github/workflows/docker_test.yml +++ b/.github/workflows/docker_test.yml @@ -28,8 +28,8 @@ env: jobs: build-test-aas-repository: - runs-on: ubuntu-latest + name: Build and Start Docker Image for AAS Repository steps: - uses: actions/checkout@v4 @@ -53,8 +53,8 @@ jobs: run: exit 0 build-test-aas-environment: - runs-on: ubuntu-latest + name: Build and Start Docker Image for AAS Environment steps: - uses: actions/checkout@v4 @@ -79,8 +79,8 @@ jobs: run: exit 0 build-test-concept-description-repository: - runs-on: ubuntu-latest + name: Build and Start Docker Image for Concept Description Repository steps: - uses: actions/checkout@v4 @@ -105,8 +105,8 @@ jobs: run: exit 0 build-test-aas-discovery: - runs-on: ubuntu-latest + name: Build and Start Docker Image for AAS Discovery steps: - uses: actions/checkout@v4 @@ -131,8 +131,8 @@ jobs: run: exit 0 build-test-aasx-fileserver: - runs-on: ubuntu-latest + name: Build and Start Docker Image for AASX File Server steps: - uses: actions/checkout@v4 @@ -157,8 +157,8 @@ jobs: run: exit 0 build-test-submodel-repository: - runs-on: ubuntu-latest + name: Build and Start Docker Image for Submodel Repository steps: - uses: actions/checkout@v4 @@ -184,6 +184,7 @@ jobs: build-test-submodel-service: runs-on: ubuntu-latest + name: Build and Start Docker Image for Submodel Service steps: - uses: actions/checkout@v4 @@ -209,6 +210,7 @@ jobs: build-test-aas-registry-kafka-mem: runs-on: ubuntu-latest + name: Build and Start Docker Image for AAS Registry Kafka Mem steps: - uses: actions/checkout@v4 @@ -234,6 +236,7 @@ jobs: build-test-aas-registry-kafka-mongodb: runs-on: ubuntu-latest + name: Build and Start Docker Image for AAS Registry Kafka MongoDB steps: - uses: actions/checkout@v4 @@ -259,6 +262,7 @@ jobs: build-test-aas-registry-log-mem: runs-on: ubuntu-latest + name: Build and Start Docker Image for AAS Registry Log Mem steps: - uses: actions/checkout@v4 @@ -283,8 +287,8 @@ jobs: run: exit 0 build-test-aas-registry-log-mongodb: - runs-on: ubuntu-latest + name: Build and Start Docker Image for AAS Registry Log MongoDB steps: - uses: actions/checkout@v4 @@ -309,8 +313,8 @@ jobs: run: exit 0 build-test-submodel-registry-kafka-mem: - runs-on: ubuntu-latest + name: Build and Start Docker Image for Submodel Registry Kafka Mem steps: - uses: actions/checkout@v4 @@ -335,8 +339,8 @@ jobs: run: exit 0 build-test-submodel-registry-kafka-mongodb: - runs-on: ubuntu-latest + name: Build and Start Docker Image for Submodel Registry Kafka MongoDB steps: - uses: actions/checkout@v4 @@ -361,8 +365,8 @@ jobs: run: exit 0 build-test-submodel-registry-log-mem: - runs-on: ubuntu-latest + name: Build and Start Docker Image for Submodel Registry Log Mem steps: - uses: actions/checkout@v4 @@ -387,8 +391,8 @@ jobs: run: exit 0 build-test-submodel-registry-log-mongodb: - runs-on: ubuntu-latest + name: Build and Start Docker Image for Submodel Registry Log MongoDB steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/scripts/build_start_docker_image_docker_compose.sh b/.github/workflows/scripts/build_start_docker_image_docker_compose.sh new file mode 100644 index 000000000..7ab8734e0 --- /dev/null +++ b/.github/workflows/scripts/build_start_docker_image_docker_compose.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +# Check if the correct number of arguments are provided +if [ "$#" -ne 3 ]; then + echo "Usage: $0 " + exit 1 +fi + +# Run the Docker container +docker compose -f $1 up -d + +#Check every 5 seconds if the compose is healthy +max_checks=24 # 2 minutes total (120 seconds / 5 seconds per check) +sleep_interval=5 # Interval in seconds between checks +check_count=0 + +# Loop to check health status +while [ $check_count -lt $max_checks ]; do + if [ "$(docker inspect --format='{{.State.Health.Status}}' $(docker ps -q))" == "healthy" ]; then + echo "Compose started successfully and is healthy." + break + else + echo "Waiting for Compose to become healthy..." + check_count=$((check_count + 1)) + sleep $sleep_interval + fi +done + +# If the container is still not healthy after the loop +if [ $check_count -eq $max_checks ]; then + echo "Compose failed to start or is unhealthy after 2 minutes." + docker logs $(docker ps -q) + exit 1 +fi + +# Stop and remove all container +docker compose -f $1 down + From a894fdb56dd989d103b8c4bafe3dc124e197c9e1 Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Fri, 30 Aug 2024 09:21:18 +0200 Subject: [PATCH 47/57] Fixes bug --- .../scripts/build_start_docker_image_docker_compose.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scripts/build_start_docker_image_docker_compose.sh b/.github/workflows/scripts/build_start_docker_image_docker_compose.sh index 7ab8734e0..98df6fe94 100644 --- a/.github/workflows/scripts/build_start_docker_image_docker_compose.sh +++ b/.github/workflows/scripts/build_start_docker_image_docker_compose.sh @@ -1,7 +1,7 @@ #!/bin/bash # Check if the correct number of arguments are provided -if [ "$#" -ne 3 ]; then +if [ "$#" -ne 1 ]; then echo "Usage: $0 " exit 1 fi From d20deffc6a836241f9fa952b7b99b166245a8ac5 Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Fri, 30 Aug 2024 09:28:31 +0200 Subject: [PATCH 48/57] Renames Steps --- .github/workflows/basyx_test.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/basyx_test.yml b/.github/workflows/basyx_test.yml index db099cfbc..b8753f87e 100644 --- a/.github/workflows/basyx_test.yml +++ b/.github/workflows/basyx_test.yml @@ -38,7 +38,7 @@ jobs: run: docker compose --project-directory ./ci up -d --wait - name: Build BaSyx run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - - name: Install BaSyx + - name: Test AAS Environment run: mvn test -f "basyx.aasenvironment/pom.xml" - name: Stop environment if: always() @@ -58,7 +58,7 @@ jobs: run: docker compose --project-directory ./ci up -d --wait - name: Build BaSyx run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - - name: Install BaSyx + - name: Test AAS Repository run: mvn test -f "basyx.aasrepository/pom.xml" - name: Stop environment if: always() @@ -78,7 +78,7 @@ jobs: run: docker compose --project-directory ./ci up -d --wait - name: Build BaSyx run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - - name: Install BaSyx + - name: Test AAS Service run: mvn test -f "basyx.aasservice/pom.xml" - name: Stop environment if: always() @@ -98,7 +98,7 @@ jobs: run: docker compose --project-directory ./ci up -d --wait - name: Build BaSyx run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - - name: Install BaSyx + - name: Test Submodel Repository run: mvn test -f "basyx.submodelrepository/pom.xml" - name: Stop environment if: always() @@ -118,7 +118,7 @@ jobs: run: docker compose --project-directory ./ci up -d --wait - name: Build BaSyx run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - - name: Install BaSyx + - name: Test Submodel Service run: mvn test -f "basyx.submodelservice/pom.xml" - name: Stop environment if: always() @@ -138,7 +138,7 @@ jobs: run: docker compose --project-directory ./ci up -d --wait - name: Build BaSyx run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - - name: Install BaSyx + - name: Test Concept Description Repository run: mvn test -f "basyx.conceptdescriptionrepository/pom.xml" - name: Stop environment if: always() @@ -158,7 +158,7 @@ jobs: run: docker compose --project-directory ./ci up -d --wait - name: Build BaSyx run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - - name: Install BaSyx + - name: Test Submodel Registry run: mvn test -f "basyx.submodelregistry/pom.xml" - name: Stop environment if: always() @@ -178,7 +178,7 @@ jobs: run: docker compose --project-directory ./ci up -d --wait - name: Build BaSyx run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - - name: Install BaSyx + - name: Test AAS Registry run: mvn test -f "basyx.aasregistry/pom.xml" - name: Stop environment if: always() @@ -198,7 +198,7 @@ jobs: run: docker compose --project-directory ./ci up -d --wait - name: Build BaSyx run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} - - name: Install BaSyx + - name: Test AAS Discovery Service run: mvn test -f "basyx.aasdiscoveryservice/pom.xml" - name: Stop environment if: always() From afac0e874ad065855e5ff248b9c51beecd507381 Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Fri, 30 Aug 2024 09:32:16 +0200 Subject: [PATCH 49/57] Fixes bug --- .github/workflows/docker_test.yml | 12 ++++++------ .../build_start_docker_image_docker_compose.sh | 15 +++++++-------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/.github/workflows/docker_test.yml b/.github/workflows/docker_test.yml index 074245118..2e7bb62ec 100644 --- a/.github/workflows/docker_test.yml +++ b/.github/workflows/docker_test.yml @@ -229,7 +229,7 @@ jobs: mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasregistry-service-release-kafka-mem" - name: Test AAS Registry Kafka Mem Docker Image - run: chmod +x ./.github/workflows/scripts/build_start_docker_image_docker_compose.sh && ./.github/workflows/scripts/build_start_docker_image_docker_compose.sh ./ci/test-aas-registry-kafka-mem.yml + run: chmod +x ./.github/workflows/scripts/build_start_docker_image_docker_compose.sh && ./.github/workflows/scripts/build_start_docker_image_docker_compose.sh ./ci/test-aas-registry-kafka-mem.yml test_aas_registry_kafka_mem - name: Clean up run: exit 0 @@ -255,7 +255,7 @@ jobs: mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasregistry-service-release-kafka-mongodb" - name: Test AAS Registry Kafka MongoDB Docker Image - run: chmod +x ./.github/workflows/scripts/build_start_docker_image_docker_compose.sh && ./.github/workflows/scripts/build_start_docker_image_docker_compose.sh ./ci/test-aas-registry-kafka-mongodb.yml + run: chmod +x ./.github/workflows/scripts/build_start_docker_image_docker_compose.sh && ./.github/workflows/scripts/build_start_docker_image_docker_compose.sh ./ci/test-aas-registry-kafka-mongodb.yml test_aas_registry_kafka_mongodb - name: Clean up run: exit 0 @@ -307,7 +307,7 @@ jobs: mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.aasregistry-service-release-log-mongodb" - name: Test AAS Registry Log MongoDB Docker Image - run: chmod +x ./.github/workflows/scripts/build_start_docker_image_docker_compose.sh && ./.github/workflows/scripts/build_start_docker_image_docker_compose.sh ./ci/test-aas-registry-log-mongodb.yml + run: chmod +x ./.github/workflows/scripts/build_start_docker_image_docker_compose.sh && ./.github/workflows/scripts/build_start_docker_image_docker_compose.sh ./ci/test-aas-registry-log-mongodb.yml test_aas_registry_log_mongodb - name: Clean up run: exit 0 @@ -333,7 +333,7 @@ jobs: mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.submodelregistry-service-release-kafka-mem" - name: Test Submodel Registry Kafka Mem Docker Image - run: chmod +x ./.github/workflows/scripts/build_start_docker_image_docker_compose.sh && ./.github/workflows/scripts/build_start_docker_image_docker_compose.sh ./ci/test-submodel-registry-kafka-mem.yml + run: chmod +x ./.github/workflows/scripts/build_start_docker_image_docker_compose.sh && ./.github/workflows/scripts/build_start_docker_image_docker_compose.sh ./ci/test-submodel-registry-kafka-mem.yml test_submodel_registry_kafka_mem - name: Clean up run: exit 0 @@ -359,7 +359,7 @@ jobs: mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.submodelregistry-service-release-kafka-mongodb" - name: Test Submodel Registry Kafka MongoDB Docker Image - run: chmod +x ./.github/workflows/scripts/build_start_docker_image_docker_compose.sh && ./.github/workflows/scripts/build_start_docker_image_docker_compose.sh ./ci/test-submodel-registry-kafka-mongodb.yml + run: chmod +x ./.github/workflows/scripts/build_start_docker_image_docker_compose.sh && ./.github/workflows/scripts/build_start_docker_image_docker_compose.sh ./ci/test-submodel-registry-kafka-mongodb.yml test_submodel_registry_kafka_mongodb - name: Clean up run: exit 0 @@ -411,7 +411,7 @@ jobs: mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.submodelregistry-service-release-log-mongodb" - name: Test Submodel Registry Log MongoDB Docker Image - run: chmod +x ./.github/workflows/scripts/build_start_docker_image_docker_compose.sh && ./.github/workflows/scripts/build_start_docker_image_docker_compose.sh ./ci/test-submodel-registry-log-mongodb.yml + run: chmod +x ./.github/workflows/scripts/build_start_docker_image_docker_compose.sh && ./.github/workflows/scripts/build_start_docker_image_docker_compose.sh ./ci/test-submodel-registry-log-mongodb.yml test_submodel_registry_log_mongodb - name: Clean up run: exit 0 diff --git a/.github/workflows/scripts/build_start_docker_image_docker_compose.sh b/.github/workflows/scripts/build_start_docker_image_docker_compose.sh index 98df6fe94..457897c5f 100644 --- a/.github/workflows/scripts/build_start_docker_image_docker_compose.sh +++ b/.github/workflows/scripts/build_start_docker_image_docker_compose.sh @@ -1,8 +1,8 @@ #!/bin/bash # Check if the correct number of arguments are provided -if [ "$#" -ne 1 ]; then - echo "Usage: $0 " +if [ "$#" -ne 2 ]; then + echo "Usage: $0 " exit 1 fi @@ -16,11 +16,11 @@ check_count=0 # Loop to check health status while [ $check_count -lt $max_checks ]; do - if [ "$(docker inspect --format='{{.State.Health.Status}}' $(docker ps -q))" == "healthy" ]; then - echo "Compose started successfully and is healthy." + if [ "$(docker inspect --format='{{.State.Health.Status}}' $2)" == "healthy" ]; then + echo "$2 started successfully and is healthy." break else - echo "Waiting for Compose to become healthy..." + echo "Waiting for $2 to become healthy..." check_count=$((check_count + 1)) sleep $sleep_interval fi @@ -28,11 +28,10 @@ done # If the container is still not healthy after the loop if [ $check_count -eq $max_checks ]; then - echo "Compose failed to start or is unhealthy after 2 minutes." - docker logs $(docker ps -q) + echo "$2 failed to start or is unhealthy after 2 minutes." + docker logs $2 exit 1 fi - # Stop and remove all container docker compose -f $1 down From 3fa8559cb74c0c60ee19effd1df22230d976389e Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Fri, 30 Aug 2024 09:40:43 +0200 Subject: [PATCH 50/57] Fixes bug --- .github/workflows/docker_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker_test.yml b/.github/workflows/docker_test.yml index 2e7bb62ec..2e5c9d23a 100644 --- a/.github/workflows/docker_test.yml +++ b/.github/workflows/docker_test.yml @@ -203,7 +203,7 @@ jobs: mvn package -DskipTests -Ddocker.namespace=test --pl "org.eclipse.digitaltwin.basyx:basyx.submodelservice.example" - name: Test Submodel Service Docker Image - run: chmod +x ./.github/workflows/scripts/build_start_docker_image.sh && ./.github/workflows/scripts/build_start_docker_image.sh test/submodel-service ${VERSION} test_submodel_service + run: chmod +x ./.github/workflows/scripts/build_start_docker_image.sh && ./.github/workflows/scripts/build_start_docker_image.sh test/standalone_submodel_example ${VERSION} test_submodel_service - name: Clean up run: exit 0 From 9fc131fd4de8bcdd0edde04898ae705f7301af71 Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Fri, 30 Aug 2024 09:47:11 +0200 Subject: [PATCH 51/57] Adds Healthcheck to Submodel Service --- basyx.submodelservice/basyx.submodelservice.example/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/basyx.submodelservice/basyx.submodelservice.example/Dockerfile b/basyx.submodelservice/basyx.submodelservice.example/Dockerfile index 556832735..5ea063eb5 100644 --- a/basyx.submodelservice/basyx.submodelservice.example/Dockerfile +++ b/basyx.submodelservice/basyx.submodelservice.example/Dockerfile @@ -6,4 +6,5 @@ COPY ${JAR_FILE} basyxExecutable.jar COPY src/main/resources/application.properties application.properties ARG PORT=8081 EXPOSE ${PORT} +HEALTHCHECK --interval=30s --timeout=3s --retries=3 --start-period=15s CMD curl --fail http://localhost:${SERVER_PORT}/actuator/health || exit 1 ENTRYPOINT ["java","-jar","basyxExecutable.jar"] From 1d0c700b302861fa4e328e27ac52318003ddd2da Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Fri, 30 Aug 2024 09:52:51 +0200 Subject: [PATCH 52/57] Changes Healthcheck of Submodel Service --- basyx.submodelservice/basyx.submodelservice.example/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/basyx.submodelservice/basyx.submodelservice.example/Dockerfile b/basyx.submodelservice/basyx.submodelservice.example/Dockerfile index 5ea063eb5..1c3e9648d 100644 --- a/basyx.submodelservice/basyx.submodelservice.example/Dockerfile +++ b/basyx.submodelservice/basyx.submodelservice.example/Dockerfile @@ -5,6 +5,7 @@ ARG JAR_FILE=target/*-exec.jar COPY ${JAR_FILE} basyxExecutable.jar COPY src/main/resources/application.properties application.properties ARG PORT=8081 -EXPOSE ${PORT} +ENV SERVER_PORT=${PORT} +EXPOSE ${SERVER_PORT} HEALTHCHECK --interval=30s --timeout=3s --retries=3 --start-period=15s CMD curl --fail http://localhost:${SERVER_PORT}/actuator/health || exit 1 ENTRYPOINT ["java","-jar","basyxExecutable.jar"] From 7b5dc679a9a92d3c3eb813aa71c4142945a3de91 Mon Sep 17 00:00:00 2001 From: FriedJannik Date: Fri, 30 Aug 2024 10:17:42 +0200 Subject: [PATCH 53/57] Changes Step Names to be more readable --- .github/workflows/basyx_test.yml | 18 +++++++++--------- .github/workflows/docker_test.yml | 30 +++++++++++++++--------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/.github/workflows/basyx_test.yml b/.github/workflows/basyx_test.yml index b8753f87e..c406a00bd 100644 --- a/.github/workflows/basyx_test.yml +++ b/.github/workflows/basyx_test.yml @@ -25,7 +25,7 @@ env: jobs: test-basyx-aasenvironment: runs-on: ubuntu-latest - name: Test BaSyx AAS Environment + name: AAS Environment Test steps: - uses: actions/checkout@v4 - name: Set up JDK 17 @@ -45,7 +45,7 @@ jobs: run: docker compose --project-directory ./ci down test-basyx-aasrepository: runs-on: ubuntu-latest - name: Test BaSyx AAS Repository + name: AAS Repository Test steps: - uses: actions/checkout@v4 - name: Set up JDK 17 @@ -65,7 +65,7 @@ jobs: run: docker compose --project-directory ./ci down test-basyx-aasservice: runs-on: ubuntu-latest - name: Test BaSyx AAS Service + name: AAS Service Test steps: - uses: actions/checkout@v4 - name: Set up JDK 17 @@ -85,7 +85,7 @@ jobs: run: docker compose --project-directory ./ci down test-basyx-submodelrepository: runs-on: ubuntu-latest - name: Test BaSyx Submodel Repository + name: Submodel Repository Test steps: - uses: actions/checkout@v4 - name: Set up JDK 17 @@ -105,7 +105,7 @@ jobs: run: docker compose --project-directory ./ci down test-basyx-submodelservice: runs-on: ubuntu-latest - name: Test BaSyx Submodel Service + name: Submodel Service Test steps: - uses: actions/checkout@v4 - name: Set up JDK 17 @@ -125,7 +125,7 @@ jobs: run: docker compose --project-directory ./ci down test-basyx-conceptdescriptionrepository: runs-on: ubuntu-latest - name: Test BaSyx Concept Description Repository + name: Concept Description Repository Test steps: - uses: actions/checkout@v4 - name: Set up JDK 17 @@ -145,7 +145,7 @@ jobs: run: docker compose --project-directory ./ci down test-basyx-submodelregistry: runs-on: ubuntu-latest - name: Test BaSyx Submodel Registry + name: Submodel Registry Test steps: - uses: actions/checkout@v4 - name: Set up JDK 17 @@ -165,7 +165,7 @@ jobs: run: docker compose --project-directory ./ci down test-basyx-aasregistry: runs-on: ubuntu-latest - name: Test BaSyx AAS Registry + name: AAS Registry Test steps: - uses: actions/checkout@v4 - name: Set up JDK 17 @@ -185,7 +185,7 @@ jobs: run: docker compose --project-directory ./ci down test-basyx-aasdiscoveryservice: runs-on: ubuntu-latest - name: Test BaSyx AAS Discovery Service + name: AAS Discovery Service Test steps: - uses: actions/checkout@v4 - name: Set up JDK 17 diff --git a/.github/workflows/docker_test.yml b/.github/workflows/docker_test.yml index 2e5c9d23a..493891620 100644 --- a/.github/workflows/docker_test.yml +++ b/.github/workflows/docker_test.yml @@ -29,7 +29,7 @@ env: jobs: build-test-aas-repository: runs-on: ubuntu-latest - name: Build and Start Docker Image for AAS Repository + name: AAS Repository - Build and Start Docker Image steps: - uses: actions/checkout@v4 @@ -54,7 +54,7 @@ jobs: build-test-aas-environment: runs-on: ubuntu-latest - name: Build and Start Docker Image for AAS Environment + name: AAS Environment - Build and Start Docker Image steps: - uses: actions/checkout@v4 @@ -80,7 +80,7 @@ jobs: build-test-concept-description-repository: runs-on: ubuntu-latest - name: Build and Start Docker Image for Concept Description Repository + name: Concept Description Repository - Build and Start Docker Image steps: - uses: actions/checkout@v4 @@ -106,7 +106,7 @@ jobs: build-test-aas-discovery: runs-on: ubuntu-latest - name: Build and Start Docker Image for AAS Discovery + name: AAS Discovery - Build and Start Docker Image steps: - uses: actions/checkout@v4 @@ -132,7 +132,7 @@ jobs: build-test-aasx-fileserver: runs-on: ubuntu-latest - name: Build and Start Docker Image for AASX File Server + name: AASX File Server - Build and Start Docker Image steps: - uses: actions/checkout@v4 @@ -158,7 +158,7 @@ jobs: build-test-submodel-repository: runs-on: ubuntu-latest - name: Build and Start Docker Image for Submodel Repository + name: Submodel Repository - Build and Start Docker Image steps: - uses: actions/checkout@v4 @@ -184,7 +184,7 @@ jobs: build-test-submodel-service: runs-on: ubuntu-latest - name: Build and Start Docker Image for Submodel Service + name: Submodel Service - Build and Start Docker Image steps: - uses: actions/checkout@v4 @@ -210,7 +210,7 @@ jobs: build-test-aas-registry-kafka-mem: runs-on: ubuntu-latest - name: Build and Start Docker Image for AAS Registry Kafka Mem + name: AAS Registry Kafka Mem - Build and Start Docker Image steps: - uses: actions/checkout@v4 @@ -236,7 +236,7 @@ jobs: build-test-aas-registry-kafka-mongodb: runs-on: ubuntu-latest - name: Build and Start Docker Image for AAS Registry Kafka MongoDB + name: AAS Registry Kafka MongoDB - Build and Start Docker Image steps: - uses: actions/checkout@v4 @@ -262,7 +262,7 @@ jobs: build-test-aas-registry-log-mem: runs-on: ubuntu-latest - name: Build and Start Docker Image for AAS Registry Log Mem + name: AAS Registry Log Mem - Build and Start Docker Image steps: - uses: actions/checkout@v4 @@ -288,7 +288,7 @@ jobs: build-test-aas-registry-log-mongodb: runs-on: ubuntu-latest - name: Build and Start Docker Image for AAS Registry Log MongoDB + name: AAS Registry Log MongoDB - Build and Start Docker Image steps: - uses: actions/checkout@v4 @@ -314,7 +314,7 @@ jobs: build-test-submodel-registry-kafka-mem: runs-on: ubuntu-latest - name: Build and Start Docker Image for Submodel Registry Kafka Mem + name: Submodel Registry Kafka Mem - Build and Start Docker Image steps: - uses: actions/checkout@v4 @@ -340,7 +340,7 @@ jobs: build-test-submodel-registry-kafka-mongodb: runs-on: ubuntu-latest - name: Build and Start Docker Image for Submodel Registry Kafka MongoDB + name: Submodel Registry Kafka MongoDB - Build and Start Docker Image steps: - uses: actions/checkout@v4 @@ -366,7 +366,7 @@ jobs: build-test-submodel-registry-log-mem: runs-on: ubuntu-latest - name: Build and Start Docker Image for Submodel Registry Log Mem + name: Submodel Registry Log Mem - Build and Start Docker Image steps: - uses: actions/checkout@v4 @@ -392,7 +392,7 @@ jobs: build-test-submodel-registry-log-mongodb: runs-on: ubuntu-latest - name: Build and Start Docker Image for Submodel Registry Log MongoDB + name: Submodel Registry Log MongoDB - Build and Start Docker Image steps: - uses: actions/checkout@v4 From de555fa611c2dfd4738a8ea5ae2749e90f53dda8 Mon Sep 17 00:00:00 2001 From: Jannik Fried Date: Mon, 2 Sep 2024 06:17:43 +0200 Subject: [PATCH 54/57] Adds missing Test Renames env Variable --- .github/workflows/basyx_test.yml | 42 +++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/.github/workflows/basyx_test.yml b/.github/workflows/basyx_test.yml index c406a00bd..b6b97392c 100644 --- a/.github/workflows/basyx_test.yml +++ b/.github/workflows/basyx_test.yml @@ -20,9 +20,29 @@ on: - 'NOTICE' env: - MVN_ARGS_BUILD_BASYX_NO_TESTS: -DskipTests -T1C + MVN_ARGS_BUILD_BASYX: -DskipTests -T1C jobs: + test-basyx-common: + runs-on: ubuntu-latest + name: BaSyx Core Test + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + cache: maven + - name: Start environment + run: docker compose --project-directory ./ci up -d --wait + - name: Build BaSyx + run: mvn clean install ${MVN_ARGS_BUILD_BASYX} + - name: Test AAS Environment + run: mvn test -f "basyx.common/pom.xml" + - name: Stop environment + if: always() + run: docker compose --project-directory ./ci down test-basyx-aasenvironment: runs-on: ubuntu-latest name: AAS Environment Test @@ -37,7 +57,7 @@ jobs: - name: Start environment run: docker compose --project-directory ./ci up -d --wait - name: Build BaSyx - run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} + run: mvn clean install ${MVN_ARGS_BUILD_BASYX} - name: Test AAS Environment run: mvn test -f "basyx.aasenvironment/pom.xml" - name: Stop environment @@ -57,7 +77,7 @@ jobs: - name: Start environment run: docker compose --project-directory ./ci up -d --wait - name: Build BaSyx - run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} + run: mvn clean install ${MVN_ARGS_BUILD_BASYX} - name: Test AAS Repository run: mvn test -f "basyx.aasrepository/pom.xml" - name: Stop environment @@ -77,7 +97,7 @@ jobs: - name: Start environment run: docker compose --project-directory ./ci up -d --wait - name: Build BaSyx - run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} + run: mvn clean install ${MVN_ARGS_BUILD_BASYX} - name: Test AAS Service run: mvn test -f "basyx.aasservice/pom.xml" - name: Stop environment @@ -97,7 +117,7 @@ jobs: - name: Start environment run: docker compose --project-directory ./ci up -d --wait - name: Build BaSyx - run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} + run: mvn clean install ${MVN_ARGS_BUILD_BASYX} - name: Test Submodel Repository run: mvn test -f "basyx.submodelrepository/pom.xml" - name: Stop environment @@ -117,7 +137,7 @@ jobs: - name: Start environment run: docker compose --project-directory ./ci up -d --wait - name: Build BaSyx - run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} + run: mvn clean install ${MVN_ARGS_BUILD_BASYX} - name: Test Submodel Service run: mvn test -f "basyx.submodelservice/pom.xml" - name: Stop environment @@ -137,7 +157,7 @@ jobs: - name: Start environment run: docker compose --project-directory ./ci up -d --wait - name: Build BaSyx - run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} + run: mvn clean install ${MVN_ARGS_BUILD_BASYX} - name: Test Concept Description Repository run: mvn test -f "basyx.conceptdescriptionrepository/pom.xml" - name: Stop environment @@ -157,7 +177,7 @@ jobs: - name: Start environment run: docker compose --project-directory ./ci up -d --wait - name: Build BaSyx - run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} + run: mvn clean install ${MVN_ARGS_BUILD_BASYX} - name: Test Submodel Registry run: mvn test -f "basyx.submodelregistry/pom.xml" - name: Stop environment @@ -177,7 +197,7 @@ jobs: - name: Start environment run: docker compose --project-directory ./ci up -d --wait - name: Build BaSyx - run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} + run: mvn clean install ${MVN_ARGS_BUILD_BASYX} - name: Test AAS Registry run: mvn test -f "basyx.aasregistry/pom.xml" - name: Stop environment @@ -197,9 +217,9 @@ jobs: - name: Start environment run: docker compose --project-directory ./ci up -d --wait - name: Build BaSyx - run: mvn clean install ${MVN_ARGS_BUILD_BASYX_NO_TESTS} + run: mvn clean install ${MVN_ARGS_BUILD_BASYX} - name: Test AAS Discovery Service run: mvn test -f "basyx.aasdiscoveryservice/pom.xml" - name: Stop environment if: always() - run: docker compose --project-directory ./ci down \ No newline at end of file + run: docker compose --project-directory ./ci down From 8f8f5841d39abccafa9bca6600761666aa2cc060 Mon Sep 17 00:00:00 2001 From: Jannik Fried Date: Mon, 2 Sep 2024 06:19:58 +0200 Subject: [PATCH 55/57] Adds AASX File Server Tests --- .github/workflows/basyx_test.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/basyx_test.yml b/.github/workflows/basyx_test.yml index b6b97392c..a7028d95e 100644 --- a/.github/workflows/basyx_test.yml +++ b/.github/workflows/basyx_test.yml @@ -43,6 +43,26 @@ jobs: - name: Stop environment if: always() run: docker compose --project-directory ./ci down + test-basyx-aasxfileserver: + runs-on: ubuntu-latest + name: AASX FileServer Test + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + cache: maven + - name: Start environment + run: docker compose --project-directory ./ci up -d --wait + - name: Build BaSyx + run: mvn clean install ${MVN_ARGS_BUILD_BASYX} + - name: Test AAS Environment + run: mvn test -f "basyx.aasxfileserver/pom.xml" + - name: Stop environment + if: always() + run: docker compose --project-directory ./ci down test-basyx-aasenvironment: runs-on: ubuntu-latest name: AAS Environment Test From 366491574d4781a01e637c8ad970a19455267ed7 Mon Sep 17 00:00:00 2001 From: Jannik Fried Date: Mon, 2 Sep 2024 06:29:32 +0200 Subject: [PATCH 56/57] Reverts Cosmetics --- ci/docker-compose.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/ci/docker-compose.yml b/ci/docker-compose.yml index d1c8de165..105487183 100644 --- a/ci/docker-compose.yml +++ b/ci/docker-compose.yml @@ -18,7 +18,6 @@ services: - 27017:27017 networks: - basyx-java-server-sdk - zookeeper: image: confluentinc/cp-zookeeper:7.5.2 environment: @@ -32,7 +31,6 @@ services: start_period: 10s networks: - basyx-java-server-sdk - akhq: image: tchiotludo/akhq:0.24.0 container_name: akhq @@ -50,7 +48,6 @@ services: - kafka networks: - basyx-java-server-sdk - kafka: image: confluentinc/cp-kafka:7.5.2 ports: @@ -73,7 +70,6 @@ services: condition: service_healthy networks: - basyx-java-server-sdk - aas-registry-log-mem: image: eclipsebasyx/aas-registry-log-mem:$BASYX_VERSION container_name: aas-registry-log-mem @@ -84,7 +80,6 @@ services: restart: always networks: - basyx-java-server-sdk - sm-registry-log-mem: image: eclipsebasyx/submodel-registry-log-mem:$BASYX_VERSION container_name: sm-registry-log-mem @@ -95,7 +90,6 @@ services: restart: always networks: - basyx-java-server-sdk - secured-aas-registry-log-mem: image: eclipsebasyx/aas-registry-log-mem:$BASYX_VERSION container_name: secured-aas-registry-log-mem @@ -115,7 +109,6 @@ services: restart: always networks: - basyx-java-server-sdk - secured-sm-registry-log-mem: image: eclipsebasyx/submodel-registry-log-mem:$BASYX_VERSION container_name: secured-sm-registry-log-mem @@ -135,7 +128,6 @@ services: restart: always networks: - basyx-java-server-sdk - keycloak: build: context: ./keycloak @@ -148,7 +140,6 @@ services: - KEYCLOAK_ADMIN_PASSWORD=admin networks: - basyx-java-server-sdk - keycloak-fixed-uri: image: eclipsebasyx/keycloak:0.0.1 build: @@ -167,7 +158,6 @@ services: - ./keycloak/realm:/opt/keycloak/data/import:ro networks: - basyx-java-server-sdk - networks: basyx-java-server-sdk: name: basyx-java-server-sdk From c37f2b151e758a7d3ae4634af0dacc4c340d5d5a Mon Sep 17 00:00:00 2001 From: Jannik Fried Date: Mon, 2 Sep 2024 06:30:27 +0200 Subject: [PATCH 57/57] Reverts docker-compose.yml --- ci/docker-compose.yml | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/ci/docker-compose.yml b/ci/docker-compose.yml index 105487183..ff216c98d 100644 --- a/ci/docker-compose.yml +++ b/ci/docker-compose.yml @@ -18,6 +18,7 @@ services: - 27017:27017 networks: - basyx-java-server-sdk + zookeeper: image: confluentinc/cp-zookeeper:7.5.2 environment: @@ -31,6 +32,7 @@ services: start_period: 10s networks: - basyx-java-server-sdk + akhq: image: tchiotludo/akhq:0.24.0 container_name: akhq @@ -48,6 +50,7 @@ services: - kafka networks: - basyx-java-server-sdk + kafka: image: confluentinc/cp-kafka:7.5.2 ports: @@ -70,6 +73,7 @@ services: condition: service_healthy networks: - basyx-java-server-sdk + aas-registry-log-mem: image: eclipsebasyx/aas-registry-log-mem:$BASYX_VERSION container_name: aas-registry-log-mem @@ -80,6 +84,7 @@ services: restart: always networks: - basyx-java-server-sdk + sm-registry-log-mem: image: eclipsebasyx/submodel-registry-log-mem:$BASYX_VERSION container_name: sm-registry-log-mem @@ -90,6 +95,7 @@ services: restart: always networks: - basyx-java-server-sdk + secured-aas-registry-log-mem: image: eclipsebasyx/aas-registry-log-mem:$BASYX_VERSION container_name: secured-aas-registry-log-mem @@ -109,6 +115,7 @@ services: restart: always networks: - basyx-java-server-sdk + secured-sm-registry-log-mem: image: eclipsebasyx/submodel-registry-log-mem:$BASYX_VERSION container_name: secured-sm-registry-log-mem @@ -128,18 +135,20 @@ services: restart: always networks: - basyx-java-server-sdk + keycloak: - build: - context: ./keycloak - volumes: - - ./keycloak/realm:/opt/jboss/keycloak/imports - ports: - - 9096:8080 - environment: - - KEYCLOAK_ADMIN=admin - - KEYCLOAK_ADMIN_PASSWORD=admin - networks: - - basyx-java-server-sdk + build: + context: ./keycloak + volumes: + - ./keycloak/realm:/opt/jboss/keycloak/imports + ports: + - 9096:8080 + environment: + - KEYCLOAK_ADMIN=admin + - KEYCLOAK_ADMIN_PASSWORD=admin + networks: + - basyx-java-server-sdk + keycloak-fixed-uri: image: eclipsebasyx/keycloak:0.0.1 build: @@ -158,6 +167,7 @@ services: - ./keycloak/realm:/opt/keycloak/data/import:ro networks: - basyx-java-server-sdk + networks: basyx-java-server-sdk: name: basyx-java-server-sdk