From 32d82af845673e03d0cfdef2fd192edf817d1678 Mon Sep 17 00:00:00 2001 From: Enkidu93 Date: Tue, 17 Oct 2023 14:14:16 -0400 Subject: [PATCH 1/5] Place machine in ../tmp relative to serval --- .github/workflows/ci-e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-e2e.yml b/.github/workflows/ci-e2e.yml index eb14cb94..a3474ac6 100644 --- a/.github/workflows/ci-e2e.yml +++ b/.github/workflows/ci-e2e.yml @@ -32,7 +32,7 @@ jobs: dotnet-version: 6.0.x - name: Get Machine - run: cd .. && git clone https://github.com/sillsdev/machine.git && cd machine && dotnet build && cd ../serval && dotnet build + run: cd .. && mkdir tmp && cd tmp && git clone https://github.com/sillsdev/machine.git && cd machine && dotnet build && cd ../../serval && dotnet build - name: Restore dotnet tools run: dotnet tool restore From c73ed45c9a4a2c6af4dc9764eb5b4a56786e188a Mon Sep 17 00:00:00 2001 From: Enkidu93 Date: Wed, 18 Oct 2023 13:16:22 -0400 Subject: [PATCH 2/5] Fixes E2E - don't have adjacent folders #158 --- .github/workflows/ci-e2e.yml | 4 ++-- docker-compose.yml | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci-e2e.yml b/.github/workflows/ci-e2e.yml index a3474ac6..92bee19b 100644 --- a/.github/workflows/ci-e2e.yml +++ b/.github/workflows/ci-e2e.yml @@ -32,7 +32,7 @@ jobs: dotnet-version: 6.0.x - name: Get Machine - run: cd .. && mkdir tmp && cd tmp && git clone https://github.com/sillsdev/machine.git && cd machine && dotnet build && cd ../../serval && dotnet build + run: cd .. && mkdir tmp && cd tmp && git clone https://github.com/sillsdev/machine.git && cd machine && dotnet build && cd ../../serval && dotnet build #separate repos to guarantee failures when grpc or data access is not up to date - name: Restore dotnet tools run: dotnet tool restore @@ -44,7 +44,7 @@ jobs: run: dotnet build --no-restore - name: Start containers - run: docker compose -f "docker-compose.yml" up -d && sleep 20 #allow time for mongo to start up properly + run: export MACHINE_TESTING_DIR="../tmp/machine" && docker compose -f "docker-compose.yml" up -d && sleep 20 #allow time for mongo to start up properly - name: Debug network run: docker ps -a && docker logs --since 10m serval_cntr && docker logs --since 10m echo_cntr && docker logs --since 10m machine-engine-cntr && docker logs --since 10m serval-mongo-1 && docker logs --since 10m machine-job-cntr diff --git a/docker-compose.yml b/docker-compose.yml index 61d8a9a9..d5ac2292 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -77,8 +77,8 @@ services: hostname: machine-engine container_name: machine-engine-cntr build: - context: ../machine - dockerfile: ../machine/dockerfile.development + context: ${MACHINE_TESTING_DIR:-../machine} + dockerfile: ${MACHINE_TESTING_DIR:-../machine}/dockerfile.development environment: - ASPNETCORE_Kestrel__Endpoints__Https__Url=http://*:80 @@ -106,7 +106,7 @@ services: - mongo - serval-api volumes: - - ../machine:/app:ro + - ${MACHINE_TESTING_DIR:-../machine}:/app:ro - ~/.nuget/packages:/root/.nuget/packages:ro - /var/lib/machine:/var/lib/machine - /var/lib/serval:/var/lib/serval @@ -123,8 +123,8 @@ services: hostname: machine-job-server container_name: machine-job-cntr build: - context: ../machine - dockerfile: ../machine/dockerfile.development + context: ${MACHINE_TESTING_DIR:-../machine} + dockerfile: ${MACHINE_TESTING_DIR:-../machine}/dockerfile.development environment: - ASPNETCORE_ConnectionStrings__Hangfire=mongodb://mongo:27017/machine_jobs?replicaSet=myRS - ASPNETCORE_ConnectionStrings__Mongo=mongodb://mongo:27017/machine?replicaSet=myRS @@ -152,7 +152,7 @@ services: - machine-engine - serval-api volumes: - - ../machine:/app:ro + - ${MACHINE_TESTING_DIR:-../machine}:/app:ro - ~/.nuget/packages:/root/.nuget/packages:ro - /var/lib/machine:/var/lib/machine - /var/lib/serval:/var/lib/serval From 921173fff8143faeff363fc4f74beea8ad9262f7 Mon Sep 17 00:00:00 2001 From: Enkidu93 Date: Wed, 18 Oct 2023 13:49:47 -0400 Subject: [PATCH 3/5] Debug directory structure --- .github/workflows/ci-e2e.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-e2e.yml b/.github/workflows/ci-e2e.yml index 92bee19b..ddb8a77a 100644 --- a/.github/workflows/ci-e2e.yml +++ b/.github/workflows/ci-e2e.yml @@ -32,7 +32,7 @@ jobs: dotnet-version: 6.0.x - name: Get Machine - run: cd .. && mkdir tmp && cd tmp && git clone https://github.com/sillsdev/machine.git && cd machine && dotnet build && cd ../../serval && dotnet build #separate repos to guarantee failures when grpc or data access is not up to date + run: cd .. && mkdir machine_testing_dir && cd machine_testing_dir && git clone https://github.com/sillsdev/machine.git && cd machine && dotnet build && cd ../../serval && dotnet build #separate repos to guarantee failures when grpc or data access is not up to date - name: Restore dotnet tools run: dotnet tool restore @@ -44,7 +44,7 @@ jobs: run: dotnet build --no-restore - name: Start containers - run: export MACHINE_TESTING_DIR="../tmp/machine" && docker compose -f "docker-compose.yml" up -d && sleep 20 #allow time for mongo to start up properly + run: tree .. && export MACHINE_TESTING_DIR="../machine_testing_dir/machine" && docker compose -f "docker-compose.yml" up -d && sleep 20 #allow time for mongo to start up properly - name: Debug network run: docker ps -a && docker logs --since 10m serval_cntr && docker logs --since 10m echo_cntr && docker logs --since 10m machine-engine-cntr && docker logs --since 10m serval-mongo-1 && docker logs --since 10m machine-job-cntr From 90481fa068deb53b05ee1598e745a72bae159887 Mon Sep 17 00:00:00 2001 From: Enkidu93 Date: Wed, 18 Oct 2023 14:14:45 -0400 Subject: [PATCH 4/5] Debug commit --- .github/workflows/ci-e2e.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-e2e.yml b/.github/workflows/ci-e2e.yml index ddb8a77a..8123a01f 100644 --- a/.github/workflows/ci-e2e.yml +++ b/.github/workflows/ci-e2e.yml @@ -44,7 +44,7 @@ jobs: run: dotnet build --no-restore - name: Start containers - run: tree .. && export MACHINE_TESTING_DIR="../machine_testing_dir/machine" && docker compose -f "docker-compose.yml" up -d && sleep 20 #allow time for mongo to start up properly + run: export MACHINE_TESTING_DIR="../machine_testing_dir/machine" && docker-compose -f "docker-compose.yml" up -d && sleep 20 #allow time for mongo to start up properly - name: Debug network run: docker ps -a && docker logs --since 10m serval_cntr && docker logs --since 10m echo_cntr && docker logs --since 10m machine-engine-cntr && docker logs --since 10m serval-mongo-1 && docker logs --since 10m machine-job-cntr @@ -61,4 +61,4 @@ jobs: - name: Stop containers if: ${{ success() || failure() }} - run: docker compose down + run: docker-compose down From e54a419c8bb12cbe2dd41f637b5d96d0d4c3031e Mon Sep 17 00:00:00 2001 From: Enkidu93 Date: Wed, 18 Oct 2023 14:41:56 -0400 Subject: [PATCH 5/5] Debug --- .github/workflows/ci-e2e.yml | 13 ++----------- docker-compose.yml | 4 ++-- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci-e2e.yml b/.github/workflows/ci-e2e.yml index 8123a01f..5ca6a437 100644 --- a/.github/workflows/ci-e2e.yml +++ b/.github/workflows/ci-e2e.yml @@ -34,17 +34,8 @@ jobs: - name: Get Machine run: cd .. && mkdir machine_testing_dir && cd machine_testing_dir && git clone https://github.com/sillsdev/machine.git && cd machine && dotnet build && cd ../../serval && dotnet build #separate repos to guarantee failures when grpc or data access is not up to date - - name: Restore dotnet tools - run: dotnet tool restore - - - name: Restore dependencies - run: dotnet restore - - - name: Build - run: dotnet build --no-restore - - name: Start containers - run: export MACHINE_TESTING_DIR="../machine_testing_dir/machine" && docker-compose -f "docker-compose.yml" up -d && sleep 20 #allow time for mongo to start up properly + run: export MACHINE_TESTING_DIR="../machine_testing_dir/machine" && docker compose -f "docker-compose.yml" up -d && sleep 20 #allow time for mongo to start up properly - name: Debug network run: docker ps -a && docker logs --since 10m serval_cntr && docker logs --since 10m echo_cntr && docker logs --since 10m machine-engine-cntr && docker logs --since 10m serval-mongo-1 && docker logs --since 10m machine-job-cntr @@ -61,4 +52,4 @@ jobs: - name: Stop containers if: ${{ success() || failure() }} - run: docker-compose down + run: docker compose down diff --git a/docker-compose.yml b/docker-compose.yml index d5ac2292..c176320f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -78,7 +78,7 @@ services: container_name: machine-engine-cntr build: context: ${MACHINE_TESTING_DIR:-../machine} - dockerfile: ${MACHINE_TESTING_DIR:-../machine}/dockerfile.development + dockerfile: ../machine/dockerfile.development environment: - ASPNETCORE_Kestrel__Endpoints__Https__Url=http://*:80 @@ -124,7 +124,7 @@ services: container_name: machine-job-cntr build: context: ${MACHINE_TESTING_DIR:-../machine} - dockerfile: ${MACHINE_TESTING_DIR:-../machine}/dockerfile.development + dockerfile: ../machine/dockerfile.development environment: - ASPNETCORE_ConnectionStrings__Hangfire=mongodb://mongo:27017/machine_jobs?replicaSet=myRS - ASPNETCORE_ConnectionStrings__Mongo=mongodb://mongo:27017/machine?replicaSet=myRS