From 3db80f7aa7eca4358e40d051e14034bc75080541 Mon Sep 17 00:00:00 2001 From: David Fowler Date: Sat, 1 Feb 2025 13:14:14 -0800 Subject: [PATCH 01/10] Update the pipeline - Always use dev certs - Run docker commands to clean the state --- eng/pipelines/templates/BuildAndTest.yml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/eng/pipelines/templates/BuildAndTest.yml b/eng/pipelines/templates/BuildAndTest.yml index f7f103d828..5dcc7fda2c 100644 --- a/eng/pipelines/templates/BuildAndTest.yml +++ b/eng/pipelines/templates/BuildAndTest.yml @@ -48,18 +48,14 @@ steps: # Non-helix tests are run only on the public pipeline - ${{ if and(eq(parameters.runAsPublic, 'true'), ne(parameters.runHelixTests, 'true')) }}: # non-helix tests - - ${{ if ne(parameters.isWindows, 'true') }}: - - script: mkdir ${{ parameters.repoArtifactsPath }}/devcert-scripts && - cd ${{ parameters.repoArtifactsPath }}/devcert-scripts && - wget https://raw.githubusercontent.com/BorisWilhelms/create-dotnet-devcert/main/scripts/ubuntu-create-dotnet-devcert.sh && - wget https://raw.githubusercontent.com/BorisWilhelms/create-dotnet-devcert/main/scripts/common.sh && - chmod +x ubuntu-create-dotnet-devcert.sh && - ./ubuntu-create-dotnet-devcert.sh - displayName: Install devcerts + - script: dotnet dev-certs https + displayName: Install dev-certs - - ${{ if eq(parameters.isWindows, 'true') }}: - - script: dotnet dev-certs https - displayName: Install dev-certs + - script: | + docker container ls + docker network ls + docker network prune -f + displayName: List Docker containers and networks, and prune networks - script: ${{ parameters.dotnetScript }} dotnet-coverage collect --settings $(Build.SourcesDirectory)/eng/CodeCoverage.config From 9f833b09cab2b00eaac007a022759959f9ecc224 Mon Sep 17 00:00:00 2001 From: David Fowler Date: Sat, 1 Feb 2025 13:24:30 -0800 Subject: [PATCH 02/10] Add dcp logs --- eng/pipelines/templates/BuildAndTest.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eng/pipelines/templates/BuildAndTest.yml b/eng/pipelines/templates/BuildAndTest.yml index 5dcc7fda2c..658955b29d 100644 --- a/eng/pipelines/templates/BuildAndTest.yml +++ b/eng/pipelines/templates/BuildAndTest.yml @@ -67,6 +67,8 @@ steps: DISABLE_PLAYWRIGHT_TESTS: ${{ ne(parameters.isWindows, 'true') }} # https://github.com/dotnet/aspire/issues/5195#issuecomment-2271687822 DOTNET_ASPIRE_DEPENDENCY_CHECK_TIMEOUT: 180 + DCP_DIAGNOSTICS_LOG_LEVEL: debug + DCP_DIAGNOSTICS_LOG_FOLDER: ${{ parameters.repoTestResultsPath }} displayName: Run non-helix tests From ebf1a6014982cdb61d717451cadce53175a79747 Mon Sep 17 00:00:00 2001 From: David Fowler Date: Sat, 1 Feb 2025 13:43:06 -0800 Subject: [PATCH 03/10] Dev certs! --- eng/pipelines/templates/BuildAndTest.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/templates/BuildAndTest.yml b/eng/pipelines/templates/BuildAndTest.yml index 658955b29d..196c18a1ec 100644 --- a/eng/pipelines/templates/BuildAndTest.yml +++ b/eng/pipelines/templates/BuildAndTest.yml @@ -48,8 +48,8 @@ steps: # Non-helix tests are run only on the public pipeline - ${{ if and(eq(parameters.runAsPublic, 'true'), ne(parameters.runHelixTests, 'true')) }}: # non-helix tests - - script: dotnet dev-certs https - displayName: Install dev-certs + - script: dotnet dev-certs https --trust + displayName: Install and Trust dev-certs - script: | docker container ls From 65116d0e97270415445ec9807bca0905c4f12064 Mon Sep 17 00:00:00 2001 From: David Fowler Date: Sat, 1 Feb 2025 16:11:24 -0800 Subject: [PATCH 04/10] sudo? --- eng/pipelines/templates/BuildAndTest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/templates/BuildAndTest.yml b/eng/pipelines/templates/BuildAndTest.yml index 196c18a1ec..dbe34fab9d 100644 --- a/eng/pipelines/templates/BuildAndTest.yml +++ b/eng/pipelines/templates/BuildAndTest.yml @@ -48,7 +48,7 @@ steps: # Non-helix tests are run only on the public pipeline - ${{ if and(eq(parameters.runAsPublic, 'true'), ne(parameters.runHelixTests, 'true')) }}: # non-helix tests - - script: dotnet dev-certs https --trust + - script: sudo dotnet dev-certs https --trust displayName: Install and Trust dev-certs - script: | From 0629fa0020ae2d8e51046f0322a6d1c0ecf0dd0d Mon Sep 17 00:00:00 2001 From: David Fowler Date: Sat, 1 Feb 2025 16:43:06 -0800 Subject: [PATCH 05/10] Sigh --- eng/pipelines/templates/BuildAndTest.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/templates/BuildAndTest.yml b/eng/pipelines/templates/BuildAndTest.yml index dbe34fab9d..6052f6fa3c 100644 --- a/eng/pipelines/templates/BuildAndTest.yml +++ b/eng/pipelines/templates/BuildAndTest.yml @@ -48,8 +48,19 @@ steps: # Non-helix tests are run only on the public pipeline - ${{ if and(eq(parameters.runAsPublic, 'true'), ne(parameters.runHelixTests, 'true')) }}: # non-helix tests - - script: sudo dotnet dev-certs https --trust - displayName: Install and Trust dev-certs + - ${{ if ne(parameters.isWindows, 'true') }}: + - script: mkdir ${{ parameters.repoArtifactsPath }}/devcert-scripts && + cd ${{ parameters.repoArtifactsPath }}/devcert-scripts && + wget https://raw.githubusercontent.com/BorisWilhelms/create-dotnet-devcert/main/scripts/ubuntu-create-dotnet-devcert.sh && + wget https://raw.githubusercontent.com/BorisWilhelms/create-dotnet-devcert/main/scripts/common.sh && + chmod +x ubuntu-create-dotnet-devcert.sh && + ./ubuntu-create-dotnet-devcert.sh + displayName: Install devcerts + + - ${{ if eq(parameters.isWindows, 'true') }}: + - script: dotnet dev-certs https + displayName: Install dev-certs + - script: | docker container ls From 0ef4d35b3b7fc61c356c826f567902a6deac3e3d Mon Sep 17 00:00:00 2001 From: David Fowler Date: Sat, 1 Feb 2025 16:51:14 -0800 Subject: [PATCH 06/10] Update eng/pipelines/templates/BuildAndTest.yml --- eng/pipelines/templates/BuildAndTest.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/eng/pipelines/templates/BuildAndTest.yml b/eng/pipelines/templates/BuildAndTest.yml index 6052f6fa3c..1af9b4d0cf 100644 --- a/eng/pipelines/templates/BuildAndTest.yml +++ b/eng/pipelines/templates/BuildAndTest.yml @@ -61,7 +61,6 @@ steps: - script: dotnet dev-certs https displayName: Install dev-certs - - script: | docker container ls docker network ls From 4d8c8801335a4b22f95986df59bc369fa867daf0 Mon Sep 17 00:00:00 2001 From: David Fowler Date: Sat, 1 Feb 2025 17:51:05 -0800 Subject: [PATCH 07/10] No docker on windows --- eng/pipelines/templates/BuildAndTest.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/pipelines/templates/BuildAndTest.yml b/eng/pipelines/templates/BuildAndTest.yml index 6052f6fa3c..6f75d66dec 100644 --- a/eng/pipelines/templates/BuildAndTest.yml +++ b/eng/pipelines/templates/BuildAndTest.yml @@ -61,12 +61,12 @@ steps: - script: dotnet dev-certs https displayName: Install dev-certs - - - script: | - docker container ls - docker network ls - docker network prune -f - displayName: List Docker containers and networks, and prune networks + - ${{ if ne(parameters.isWindows, 'true') }}: + - script: | + docker container ls + docker network ls + docker network prune -f + displayName: List Docker containers and networks, and prune networks - script: ${{ parameters.dotnetScript }} dotnet-coverage collect --settings $(Build.SourcesDirectory)/eng/CodeCoverage.config From c7392d04e488c7da9d88c504ea7e3f7e7168606b Mon Sep 17 00:00:00 2001 From: David Fowler Date: Sat, 1 Feb 2025 22:44:35 -0800 Subject: [PATCH 08/10] Change the dcp log directory --- eng/pipelines/templates/BuildAndTest.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/eng/pipelines/templates/BuildAndTest.yml b/eng/pipelines/templates/BuildAndTest.yml index 6f75d66dec..e799d19aee 100644 --- a/eng/pipelines/templates/BuildAndTest.yml +++ b/eng/pipelines/templates/BuildAndTest.yml @@ -79,8 +79,7 @@ steps: # https://github.com/dotnet/aspire/issues/5195#issuecomment-2271687822 DOTNET_ASPIRE_DEPENDENCY_CHECK_TIMEOUT: 180 DCP_DIAGNOSTICS_LOG_LEVEL: debug - DCP_DIAGNOSTICS_LOG_FOLDER: ${{ parameters.repoTestResultsPath }} - + DCP_DIAGNOSTICS_LOG_FOLDER: $(Build.ArtifactStagingDirectory)/logs displayName: Run non-helix tests # Helix tests are run only on the public pipeline From 9dc873089f2e00dbfbb3f02e583450e7a545c17c Mon Sep 17 00:00:00 2001 From: David Fowler Date: Sat, 1 Feb 2025 23:27:36 -0800 Subject: [PATCH 09/10] This time? --- eng/pipelines/templates/BuildAndTest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/templates/BuildAndTest.yml b/eng/pipelines/templates/BuildAndTest.yml index e799d19aee..cb6712a49a 100644 --- a/eng/pipelines/templates/BuildAndTest.yml +++ b/eng/pipelines/templates/BuildAndTest.yml @@ -79,7 +79,7 @@ steps: # https://github.com/dotnet/aspire/issues/5195#issuecomment-2271687822 DOTNET_ASPIRE_DEPENDENCY_CHECK_TIMEOUT: 180 DCP_DIAGNOSTICS_LOG_LEVEL: debug - DCP_DIAGNOSTICS_LOG_FOLDER: $(Build.ArtifactStagingDirectory)/logs + DCP_DIAGNOSTICS_LOG_FOLDER: $(Build.ArtifactStagingDirectory)/artifacts/log displayName: Run non-helix tests # Helix tests are run only on the public pipeline From a9a59508a394a370023e6811902ddb9134fc6455 Mon Sep 17 00:00:00 2001 From: David Fowler Date: Sun, 2 Feb 2025 00:21:25 -0800 Subject: [PATCH 10/10] More logs --- eng/pipelines/templates/BuildAndTest.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eng/pipelines/templates/BuildAndTest.yml b/eng/pipelines/templates/BuildAndTest.yml index cb6712a49a..cd97bf376e 100644 --- a/eng/pipelines/templates/BuildAndTest.yml +++ b/eng/pipelines/templates/BuildAndTest.yml @@ -79,7 +79,9 @@ steps: # https://github.com/dotnet/aspire/issues/5195#issuecomment-2271687822 DOTNET_ASPIRE_DEPENDENCY_CHECK_TIMEOUT: 180 DCP_DIAGNOSTICS_LOG_LEVEL: debug - DCP_DIAGNOSTICS_LOG_FOLDER: $(Build.ArtifactStagingDirectory)/artifacts/log + DCP_DIAGNOSTICS_LOG_FOLDER: $(Build.ArtifactStagingDirectory)/artifacts/log/dcp + DCP_SESSION_FOLDER: $(Build.ArtifactStagingDirectory)/artifacts/log/dcp/session + DCP_PRESERVE_EXECUTABLE_LOGS: 1 displayName: Run non-helix tests # Helix tests are run only on the public pipeline