From f2c501008c72a9859877a7b3c240440752f33249 Mon Sep 17 00:00:00 2001 From: danjov Date: Wed, 15 Mar 2023 17:35:43 +0100 Subject: [PATCH 1/6] Use specific docfx version Using the latest version as of today. --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 008cf74..5c1ba22 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,8 +11,8 @@ RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - RUN apt-get install -y nodejs mono-complete unzip # Download and unzip latest DocFX release -RUN curl https://github.com/dotnet/docfx/releases/latest/download/docfx.zip -LO --silent --show-error && \ - unzip -o -q docfx.zip +RUN curl https://github.com/dotnet/docfx/releases/download/v2.62.2/docfx-linux-x64-v2.62.2.zip -LO --silent --show-error && \ + unzip -o -q docfx-linux-x64-v2.62.2.zip # Restore dependencies and tools COPY src/EWS.csproj . From 060c83302a807d86422ccba345ca8436ce0c8f5d Mon Sep 17 00:00:00 2001 From: danjov Date: Wed, 15 Mar 2023 18:15:52 +0100 Subject: [PATCH 2/6] Install docfx as global dotnet tool Simplifies version management and tool usage. --- Dockerfile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5c1ba22..98bc4e8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,9 +10,8 @@ SHELL ["/bin/bash", "-c"] RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - RUN apt-get install -y nodejs mono-complete unzip -# Download and unzip latest DocFX release -RUN curl https://github.com/dotnet/docfx/releases/download/v2.62.2/docfx-linux-x64-v2.62.2.zip -LO --silent --show-error && \ - unzip -o -q docfx-linux-x64-v2.62.2.zip +# Install latest DocFX release +RUN dotnet tool update -g docfx # Restore dependencies and tools COPY src/EWS.csproj . @@ -26,13 +25,13 @@ ENV GENERATE_SOURCEMAP=false COPY src/ . RUN dotnet publish "EWS.csproj" \ -c Release \ - -p:VersionPrefix=${VERSION} \ - -p:SourceRevisionId=${REVISION} \ -o ${PUBLISH_DIR} # Build documentation COPY docs/ ./docs/ -RUN mono docfx.exe build -o ${PUBLISH_DIR}/wwwroot/help docs/docfx.json +RUN ls -lah +RUN ls -lah +RUN ~/.dotnet/tools/docfx build -o ${PUBLISH_DIR}/wwwroot/help docs/docfx.json FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS final ENV HOME=/app From 311d6cd6ceb7050e442af5557e5349cd1724a796 Mon Sep 17 00:00:00 2001 From: danjov Date: Wed, 15 Mar 2023 18:28:25 +0100 Subject: [PATCH 3/6] Remove mono dependency --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 98bc4e8..a17d16a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ SHELL ["/bin/bash", "-c"] # Install missing packages RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - -RUN apt-get install -y nodejs mono-complete unzip +RUN apt-get install -y nodejs unzip # Install latest DocFX release RUN dotnet tool update -g docfx From 892a0b8337b3c2dab41f43b646b8053fb338ec77 Mon Sep 17 00:00:00 2001 From: danjov Date: Wed, 15 Mar 2023 18:28:57 +0100 Subject: [PATCH 4/6] Remove debug code --- Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a17d16a..389ad8e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,8 +29,6 @@ RUN dotnet publish "EWS.csproj" \ # Build documentation COPY docs/ ./docs/ -RUN ls -lah -RUN ls -lah RUN ~/.dotnet/tools/docfx build -o ${PUBLISH_DIR}/wwwroot/help docs/docfx.json FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS final From 59fb8b4cf5615b045a61a101a13bc1e5b64b4b57 Mon Sep 17 00:00:00 2001 From: danjov Date: Thu, 16 Mar 2023 14:32:30 +0100 Subject: [PATCH 5/6] Re-add release build properties They were removed due to local testing and debugging purposes. --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 389ad8e..f6b9812 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,6 +25,8 @@ ENV GENERATE_SOURCEMAP=false COPY src/ . RUN dotnet publish "EWS.csproj" \ -c Release \ + -p:VersionPrefix=${VERSION} \ + -p:SourceRevisionId=${REVISION} \ -o ${PUBLISH_DIR} # Build documentation From fa76f4201ebe564e04d60a016435f7e1c924bea2 Mon Sep 17 00:00:00 2001 From: danjov Date: Thu, 16 Mar 2023 18:14:16 +0100 Subject: [PATCH 6/6] Use 127.0.0.1 instead of localhost for polling The issue was caused by a configuration change by webpack. See https://github.com/cypress-io/github-action/issues/534 --- src/ClientApp/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ClientApp/package.json b/src/ClientApp/package.json index 4634293..c4c9a41 100644 --- a/src/ClientApp/package.json +++ b/src/ClientApp/package.json @@ -42,7 +42,7 @@ "prestart": "node aspnetcore-https && node aspnetcore-react", "start": "rimraf ./build && react-scripts start", "build": "react-scripts build", - "test": "start-server-and-test start http-get://localhost:44472 cy:run", + "test": "start-server-and-test start http-get://127.0.0.1:44472 cy:run", "eject": "react-scripts eject", "lint": "eslint ./src/ && eslint ./cypress/", "cy:run": "cypress run",