From 76cff076cba6e34f715306118ea719448490d9e1 Mon Sep 17 00:00:00 2001 From: kirschm Date: Wed, 21 Feb 2024 17:29:51 -0500 Subject: [PATCH 01/12] attempt to use shared scripts --- CHANGELOG.md | 4 +- cicdscripts/DownloadCICDResources.ps1 | 34 +++++++++++++ pipeline.yml | 58 +++++++++++++++-------- src/AssemblyInfoGenerator/AssemblyInfo.cs | 4 +- src/AssemblyInfoGenerator/AssemblyInfo.tt | 2 +- src/GregClient/GregClient.csproj | 26 +--------- 6 files changed, 78 insertions(+), 50 deletions(-) create mode 100644 cicdscripts/DownloadCICDResources.ps1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 27fb790..56a2dda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ +### 3.0.1 +* switch pipeline.yml scripts to use internal shared scripts ### version 3.0 -* update RestSharp to 109.0.1, this comes with many API breaking changes, some affecting us, see below: +* update RestSharp to 108.0.1, this comes with many API breaking changes, some affecting us, see below: * removal of basic auth - our API no longer makes sense with RestSharp immutable clients. * switch from newtonsoft.json to system.text.json * add unit test project diff --git a/cicdscripts/DownloadCICDResources.ps1 b/cicdscripts/DownloadCICDResources.ps1 new file mode 100644 index 0000000..a8e4a20 --- /dev/null +++ b/cicdscripts/DownloadCICDResources.ps1 @@ -0,0 +1,34 @@ +<# + Purpose: Pull of the source from git +#> +$ErrorActionPreference = "Stop" + +try { + + #Redirecting GIT output + $env:GIT_REDIRECT_STDERR = '2>&1' + + if ([string]::IsNullOrWhiteSpace($env:URL_REPO_TOOLS) -or [string]::IsNullOrWhiteSpace($env:BRANCH_TOOLS)) + { + throw "The tool repository parameters had not been set properly" + } + else + { + $JUser = "$env:GITADSK_USERNAME" + $JPassword = [System.Web.HttpUtility]::UrlEncode("$env:GITADSK_PASSWORD") + + $GitUrl = "https://" + "$JUser" + ":" + "$JPassword" + "@$env:URL_REPO_TOOLS" + + git clone -b $env:BRANCH_TOOLS "$GitUrl" "$env:WORKSPACE\$env:COMMON_TOOLS_DIR" + + if($LASTEXITCODE -ne 0) + { + throw "The download of the tools failed" + } + } + +} +catch { + Write-Host $error[0] + throw $LASTEXITCODE +} \ No newline at end of file diff --git a/pipeline.yml b/pipeline.yml index 364a840..3a38bf7 100644 --- a/pipeline.yml +++ b/pipeline.yml @@ -1,18 +1,20 @@ version: 0.1.1 env: - - JENKINS_NODE_WIN: "DynamoDockerWin" + - JENKINS_NODE_WIN: "Dynamo_Win_Perf" - SLACK_QUANTUM_BUILD_CHANNEL : "#dynamo-jenkinsbuild" - SLACK_QUANTUM_BUILD_CREDENTIAL_ID : "slack-notify-token" - MAIL_QUANTUM_BUILD_RECIPIENT : "dynamo.dev@autodesk.com" - - DOCKER_WORKSPACE : "c:\\Greg" - NUGETTOOL : "Nuget\\nuget.exe" - - DOCKER_CONTAINER : "buildContainer" - - HARMONY_REPO : "DynamoDS/PackageManagerClient" + - URL_REPO_TOOLS : "git.autodesk.com/Dynamo/CICDResources.git" + - BRANCH_TOOLS : "master" + check_changelog_updated_on_pr: true pipeline_os: "Windows" force_slack_notification : true language: csharp +use_garasign: true + schedule: cron_schedule: "once_a_week" @@ -22,28 +24,20 @@ jenkins_creds: type: secretText credentialsId: dynamovisualprogramming_nuget_api_key secretText: APIKEY + - + type: usernamePassword + credentialsId: local-svc_p_ors + username: GITADSK_USERNAME + password: GITADSK_PASSWORD build: - setup_proj_deps : true + solution: src\\GregClient.sln scripts: - - "pwsh.exe -ExecutionPolicy ByPass -File .\\cicdscripts\\SetupHost.ps1" - - "pwsh.exe -ExecutionPolicy ByPass -File .\\cicdscripts\\BuildSolution.ps1" - -soc2: - harmony: - hidden_email_list: dynamo_ws_access - repository: env.HARMONY_REPO - third_party_lib_paths: - - "bin\\release" - -deployment: - - - type: customized - scripts: - - "pwsh.exe -ExecutionPolicy ByPass -File .\\cicdscripts\\ExecuteContainerDeploy.ps1" - - "pwsh.exe -ExecutionPolicy ByPass -File .\\cicdscripts\\PostDeploy.ps1" - + - "pwsh.exe -ExecutionPolicy ByPass -File .\\cicdscripts\\DownloadCICDResources.ps1" + - "pwsh.exe -ExecutionPolicy ByPass -File .\\%COMMON_TOOLS_DIR%\\scripts\\SetupHost.ps1" + - "pwsh.exe -ExecutionPolicy ByPass -File .\\%COMMON_TOOLS_DIR%\\scripts\\BuildSolution.ps1" ci_test: tests: - @@ -55,4 +49,26 @@ ci_test: format: "junit" pattern: "*.xml" +soc2: + harmony: + hidden_email_list: dynamo_ws_access + third_party_lib_paths: + - "bin\\release" + +deployment: + # since the build generates a package, we can't sign the binary without splitting up build/package gen into two steps. + # for now this binary is signed as part of Dynamo core build so signing here is skipped. + #- + # type: sign + # files_to_sign: + + - + type: customized + scripts: + - "pwsh.exe -ExecutionPolicy ByPass -File .\\%COMMON_TOOLS_DIR%\\scripts\\ExecuteContainerDeploy.ps1 -ReleaseBranches master" + + + + + diff --git a/src/AssemblyInfoGenerator/AssemblyInfo.cs b/src/AssemblyInfoGenerator/AssemblyInfo.cs index e00c6f5..6185ab8 100644 --- a/src/AssemblyInfoGenerator/AssemblyInfo.cs +++ b/src/AssemblyInfoGenerator/AssemblyInfo.cs @@ -36,7 +36,7 @@ // to distinguish one build from another. AssemblyFileVersion is specified // in AssemblyVersionInfo.cs so that it can be easily incremented by the // automated build process. -[assembly: AssemblyVersion("3.0.0.2886")] +[assembly: AssemblyVersion("3.0.1.4167")] // By default, the "Product version" shown in the file properties window is @@ -55,4 +55,4 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyFileVersion("3.0.0.2886")] +[assembly: AssemblyFileVersion("3.0.1.4167")] diff --git a/src/AssemblyInfoGenerator/AssemblyInfo.tt b/src/AssemblyInfoGenerator/AssemblyInfo.tt index 9b8de4f..205244a 100644 --- a/src/AssemblyInfoGenerator/AssemblyInfo.tt +++ b/src/AssemblyInfoGenerator/AssemblyInfo.tt @@ -60,7 +60,7 @@ using System.Runtime.InteropServices; <#+ int MajorVersion = 3; int MinorVersion = 0; -int BuildNumber = 0; +int BuildNumber = 1; // The datetime baseline we choose using this algorithm will affect build number and all nuget packages uploaded // Please only change when major or minor version got incremented int RevisionNumber = ((int)(DateTime.UtcNow - new DateTime(2023,1,1)).TotalDays)*10+((int)DateTime.UtcNow.Hour)/3; diff --git a/src/GregClient/GregClient.csproj b/src/GregClient/GregClient.csproj index 874d785..5ae0e66 100644 --- a/src/GregClient/GregClient.csproj +++ b/src/GregClient/GregClient.csproj @@ -5,42 +5,18 @@ Greg Autodesk - 8.0.30703 - 2.0 {644207B4-7E7F-474A-952E-3453960D8A01} Library Properties Greg Greg - net6.0 - 512 - + net8.0 false - false True $(GenerateNuspecDependsOn);ReadPackageVersionFromOutputAssembly logo_square_32x32.png The Dynamo Package Manager .Net Client. - - true - full - false - ..\..\bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - pdbonly - true - ..\..\bin\Release\ - TRACE - prompt - 4 - false - From 442c838092aaf9d05cfb24b65efe0580c927857b Mon Sep 17 00:00:00 2001 From: kirschm Date: Wed, 21 Feb 2024 18:17:27 -0500 Subject: [PATCH 02/12] add one custom local script --- cicdscripts/BuildSolution.ps1 | 46 ---------------------- cicdscripts/ExecuteContainerDeploy.ps1 | 25 ------------ cicdscripts/PostDeploy.ps1 | 18 --------- cicdscripts/ProcessNugetPackage.ps1 | 31 --------------- cicdscripts/PublishPackage.ps1 | 46 ++++++++++++++++++++++ cicdscripts/RestartDockerDesktop.ps1 | 26 ------------ cicdscripts/SetupHost.ps1 | 30 -------------- config/nuget.config | 6 +++ pipeline.yml | 19 ++++----- src/GregClientTests/GregClientTests.csproj | 2 +- 10 files changed, 63 insertions(+), 186 deletions(-) delete mode 100644 cicdscripts/BuildSolution.ps1 delete mode 100644 cicdscripts/ExecuteContainerDeploy.ps1 delete mode 100644 cicdscripts/PostDeploy.ps1 delete mode 100644 cicdscripts/ProcessNugetPackage.ps1 create mode 100644 cicdscripts/PublishPackage.ps1 delete mode 100644 cicdscripts/RestartDockerDesktop.ps1 delete mode 100644 cicdscripts/SetupHost.ps1 create mode 100644 config/nuget.config diff --git a/cicdscripts/BuildSolution.ps1 b/cicdscripts/BuildSolution.ps1 deleted file mode 100644 index 0b1f694..0000000 --- a/cicdscripts/BuildSolution.ps1 +++ /dev/null @@ -1,46 +0,0 @@ -<# -Date: 07/02/2020 -Purpose: To build Greg inside a windows docker container -#> -$ErrorActionPreference = "Stop" - -$errorMessage = "The build was not successful, check for errors" -$dockerImage = "artifactory.dev.adskengineer.net/dynamo/desktop/buildtools/2022:1.2.3" - -#Clear Nuget Cache -&"$env:WORKSPACE\$env:COMMON_TOOLS_DIR\$env:NUGETTOOL" locals all -clear - -try { - # Stop container - docker stop $env:DOCKER_CONTAINER - - # Remove the previous container so that we start with a fresh container - docker rm $env:DOCKER_CONTAINER - - # One time pull of the docker image - docker pull $dockerImage - - # Creating the container - docker run -m 8GB -d -t --mount type=bind,source=$env:WORKSPACE,target=$env:DOCKER_WORKSPACE --name $env:DOCKER_CONTAINER $dockerImage - - # Restore Nuget packages Greg solution - docker exec $env:DOCKER_CONTAINER $env:DOCKER_WORKSPACE\$env:COMMON_TOOLS_DIR\$env:NUGETTOOL restore $env:DOCKER_WORKSPACE\src\GregClient.sln - - # Build Greg solution - docker exec $env:DOCKER_CONTAINER msbuild -restore $env:DOCKER_WORKSPACE\src\GregClient.sln /property:Configuration=Release - - if($LASTEXITCODE -ne 0) { - throw $errorMessage - } -} -catch { - if($error[0].Exception.Message -eq $errorMessage){ - Invoke-Expression -Command "$env:WORKSPACE\cicdscripts\PostDeploy.ps1" - } - else { - Invoke-Expression -Command "$env:WORKSPACE\cicdscripts\RestartDockerDesktop.ps1" - } - - Write-Host $error[0] - throw $LASTEXITCODE -} diff --git a/cicdscripts/ExecuteContainerDeploy.ps1 b/cicdscripts/ExecuteContainerDeploy.ps1 deleted file mode 100644 index 7fb4006..0000000 --- a/cicdscripts/ExecuteContainerDeploy.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -<# -Date: 07/02/2020 -Purpose: To build Greg inside a windows docker container -#> -$ErrorActionPreference = "Stop" - -try { - docker exec $env:DOCKER_CONTAINER powershell -command "$env:DOCKER_WORKSPACE\cicdscripts\ProcessNugetPackage.ps1" -Workspace $env:DOCKER_WORKSPACE -NugetPath $env:DOCKER_WORKSPACE\$env:COMMON_TOOLS_DIR\$env:NUGETTOOL -ApiKey $env:APIKEY - - if($LASTEXITCODE -ne 0) { - throw "Package/Publish of the nuget package failed" - } -} -catch { - - if($error[0].Exception.Message -eq $errorMessage){ - Invoke-Expression -Command "$env:WORKSPACE\cicdscripts\PostDeploy.ps1" - } - else { - Invoke-Expression -Command "$env:WORKSPACE\cicdscripts\RestartDockerDesktop.ps1" - } - - Write-Host $error[0] - throw $LASTEXITCODE -} diff --git a/cicdscripts/PostDeploy.ps1 b/cicdscripts/PostDeploy.ps1 deleted file mode 100644 index add38c4..0000000 --- a/cicdscripts/PostDeploy.ps1 +++ /dev/null @@ -1,18 +0,0 @@ -<# - Date: 07/04/2019 - Purpose: Post Build Script of Dynamo -#> -$ErrorActionPreference = "Stop" - -try { - docker container stop $env:DOCKER_CONTAINER - docker container rm $env:DOCKER_CONTAINER -} -catch { - Invoke-Expression -Command "$env:WORKSPACE\cicdscripts\RestartDockerDesktop.ps1" - Write-Host $error[0] - throw $LASTEXITCODE -} -finally { - docker container prune -f -} diff --git a/cicdscripts/ProcessNugetPackage.ps1 b/cicdscripts/ProcessNugetPackage.ps1 deleted file mode 100644 index 6f50f10..0000000 --- a/cicdscripts/ProcessNugetPackage.ps1 +++ /dev/null @@ -1,31 +0,0 @@ -<# -Date: 07/02/2020 -Purpose: To create and publish the Greg nuget package -#> -[CmdletBinding()] -param ( - [Parameter(Mandatory)] - [string] - $Workspace, - [Parameter(Mandatory)] - [string] - $NugetPath, - [Parameter(Mandatory)] - [string] - $ApiKey -) - -$ErrorActionPreference = "Stop" - -$assemblyPath = "$Workspace\bin\Release" - -try { - - $nupkgFile = Get-ChildItem $assemblyPath\*.nupkg -Depth 1 - - & "$NugetPath" push $nupkgFile.FullName -ApiKey $ApiKey -Source nuget.org -} -catch { - Write-Host $error[0] - throw $LASTEXITCODE -} \ No newline at end of file diff --git a/cicdscripts/PublishPackage.ps1 b/cicdscripts/PublishPackage.ps1 new file mode 100644 index 0000000..799a433 --- /dev/null +++ b/cicdscripts/PublishPackage.ps1 @@ -0,0 +1,46 @@ +[CmdletBinding()] +param ( + [Parameter()] + [string[]] + $ReleaseBranches +) + +$ErrorActionPreference = "Stop" + +$regexBranches = @() +foreach ($branch in $ReleaseBranches -split ",") +{ + $regexBranches += "(^" + $branch + "*)" +} +$regex = $regexBranches -join "|" + +Write-Host $env:BRANCH_NAME +Write-Host $regex + +<# +Regex matching release branches +#> +$reBranch = [regex]$regex + +if ($env:BRANCH_NAME -match $reBranch) +{ + try { + + #deploy already built package. + $assemblyPath = "src\GregClient\bin\release" + $nupkgFile = Get-ChildItem $assemblyPath\*.nupkg -Depth 1 + dotnet nuget push $nupkgFile --api-key $env:API_KEY --source $env:NUGET_PUBLISH_SOURCE + + if($LASTEXITCODE -ne 0) { + throw "The package-generation process failed" + } + } + catch { + Write-Host $error[0] + throw $LASTEXITCODE + } +} +else +{ + Write-Host("Deployment is skipped because this is not a release branch") +} \ No newline at end of file diff --git a/cicdscripts/RestartDockerDesktop.ps1 b/cicdscripts/RestartDockerDesktop.ps1 deleted file mode 100644 index c1b697a..0000000 --- a/cicdscripts/RestartDockerDesktop.ps1 +++ /dev/null @@ -1,26 +0,0 @@ -$ErrorActionPreference = "Stop" - -try { - - Write-Host "Looking for docker process" - $processes = Get-Process "*docker desktop*" - if ($processes.Count -gt 0) - { - Write-Host "Docker desktop found" - $processes[0].Kill() - $processes[0].WaitForExit() - } - - Write-Host "Starting again Docker Desktop" - Start-Process "$env:ProgramFiles\Docker\Docker\Docker Desktop.exe" # -Verb RunAs - - Write-Host "Giving some time to Docker desktop" - Start-Sleep -Seconds 30 - - Write-Host "Cleaning the containers that are not started" - docker container prune -f -} -catch { - Write-Host $error[0] - throw $LASTEXITCODE -} \ No newline at end of file diff --git a/cicdscripts/SetupHost.ps1 b/cicdscripts/SetupHost.ps1 deleted file mode 100644 index 4b0f87b..0000000 --- a/cicdscripts/SetupHost.ps1 +++ /dev/null @@ -1,30 +0,0 @@ -<# - Purpose: Setup with the applications needed for the CICD pipeline -#> -$ErrorActionPreference = "Stop" - -#Getting directory names to install the tools -$nugetSubDir = ($env:NUGETTOOL -split "\\")[0] -$elementsPath = ($env:WORKSPACE -split "\\") - -$toolsDir = $elementsPath[0] + '\' + $elementsPath[1] + '\tools' -$nugetDir = "$env:WORKSPACE\$env:COMMON_TOOLS_DIR\$nugetSubDir" - -#Creation of the tools directories -New-Item -Path $nugetDir -ItemType Directory - -#Download of latest version of Nuget -Invoke-WebRequest -Uri "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" -OutFile "$nugetDir\nuget.exe" - -try { - #Instal Python from nuget - &"$env:WORKSPACE\$env:COMMON_TOOLS_DIR\$env:NUGETTOOL" install python -source nuget.org -ExcludeVersion -OutputDirectory $toolsDir - - if($LASTEXITCODE -ne 0) { - throw "Install of Python has failed" - } -} -catch { - Write-Host $error[0] - throw $LASTEXITCODE -} \ No newline at end of file diff --git a/config/nuget.config b/config/nuget.config new file mode 100644 index 0000000..2c70539 --- /dev/null +++ b/config/nuget.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/pipeline.yml b/pipeline.yml index 3a38bf7..a0d1a91 100644 --- a/pipeline.yml +++ b/pipeline.yml @@ -7,6 +7,8 @@ env: - NUGETTOOL : "Nuget\\nuget.exe" - URL_REPO_TOOLS : "git.autodesk.com/Dynamo/CICDResources.git" - BRANCH_TOOLS : "master" + - NUGET_PUBLISH_SOURCE: "https://api.nuget.org/v3/index.json" + check_changelog_updated_on_pr: true @@ -37,7 +39,7 @@ build: scripts: - "pwsh.exe -ExecutionPolicy ByPass -File .\\cicdscripts\\DownloadCICDResources.ps1" - "pwsh.exe -ExecutionPolicy ByPass -File .\\%COMMON_TOOLS_DIR%\\scripts\\SetupHost.ps1" - - "pwsh.exe -ExecutionPolicy ByPass -File .\\%COMMON_TOOLS_DIR%\\scripts\\BuildSolution.ps1" + - "msbuild src\\GregClient.sln /p:Configuration=Release" ci_test: tests: - @@ -53,19 +55,18 @@ soc2: harmony: hidden_email_list: dynamo_ws_access third_party_lib_paths: - - "bin\\release" + - "src\\GregClient\\bin\\Release\\net8.0\\" deployment: - # since the build generates a package, we can't sign the binary without splitting up build/package gen into two steps. - # for now this binary is signed as part of Dynamo core build so signing here is skipped. - #- - # type: sign - # files_to_sign: - + + - + type: sign + files_to_sign: + - "src\\GregClient\\bin\\Release\\net8.0\\greg.dll" - type: customized scripts: - - "pwsh.exe -ExecutionPolicy ByPass -File .\\%COMMON_TOOLS_DIR%\\scripts\\ExecuteContainerDeploy.ps1 -ReleaseBranches master" + - "pwsh.exe -ExecutionPolicy ByPass -File .\\cicdscripts\\scripts\\PublishPackage.ps1 -ReleaseBranches master" diff --git a/src/GregClientTests/GregClientTests.csproj b/src/GregClientTests/GregClientTests.csproj index 756c771..3809c88 100644 --- a/src/GregClientTests/GregClientTests.csproj +++ b/src/GregClientTests/GregClientTests.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 enable enable From c4fe8ed82954fc01a77fc404a9f20e74732dd59e Mon Sep 17 00:00:00 2001 From: kirschm Date: Wed, 21 Feb 2024 18:18:24 -0500 Subject: [PATCH 03/12] del --- config/nuget.config | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 config/nuget.config diff --git a/config/nuget.config b/config/nuget.config deleted file mode 100644 index 2c70539..0000000 --- a/config/nuget.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file From ee1c9da64051f076512d2c2ad66bb69251b3bbdc Mon Sep 17 00:00:00 2001 From: kirschm Date: Thu, 22 Feb 2024 10:32:30 -0500 Subject: [PATCH 04/12] review comments fix github action --- .github/workflows/PackageManagerClientMSbuild.yml | 2 +- cicdscripts/PublishPackage.ps1 | 2 +- pipeline.yml | 6 +++--- src/GregClient/GregClient.csproj | 2 ++ 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/PackageManagerClientMSbuild.yml b/.github/workflows/PackageManagerClientMSbuild.yml index 0de9aa1..a930dbd 100644 --- a/.github/workflows/PackageManagerClientMSbuild.yml +++ b/.github/workflows/PackageManagerClientMSbuild.yml @@ -23,7 +23,7 @@ jobs: - name: Look for PackageManagerClient run: | Write-Output "***Locating PackageManagerClient!***" - if (Test-Path -Path "${{ github.workspace }}\PackageManagerClient\bin\Debug\net6.0\Greg.dll") { + if (Test-Path -Path "${{ github.workspace }}\PackageManagerClient\bin\Debug\net8.0\Greg.dll") { Write-Output "PackageManagerClient exists!" } else { Write-Error "PackageManagerClient was not found!" diff --git a/cicdscripts/PublishPackage.ps1 b/cicdscripts/PublishPackage.ps1 index 799a433..33fc6ff 100644 --- a/cicdscripts/PublishPackage.ps1 +++ b/cicdscripts/PublishPackage.ps1 @@ -27,7 +27,7 @@ if ($env:BRANCH_NAME -match $reBranch) try { #deploy already built package. - $assemblyPath = "src\GregClient\bin\release" + $assemblyPath = "\bin\release" $nupkgFile = Get-ChildItem $assemblyPath\*.nupkg -Depth 1 dotnet nuget push $nupkgFile --api-key $env:API_KEY --source $env:NUGET_PUBLISH_SOURCE diff --git a/pipeline.yml b/pipeline.yml index a0d1a91..c63e569 100644 --- a/pipeline.yml +++ b/pipeline.yml @@ -55,18 +55,18 @@ soc2: harmony: hidden_email_list: dynamo_ws_access third_party_lib_paths: - - "src\\GregClient\\bin\\Release\\net8.0\\" + - "bin\\Release\\net8.0\\" deployment: - type: sign files_to_sign: - - "src\\GregClient\\bin\\Release\\net8.0\\greg.dll" + - "bin\\Release\\net8.0\\greg.dll" - type: customized scripts: - - "pwsh.exe -ExecutionPolicy ByPass -File .\\cicdscripts\\scripts\\PublishPackage.ps1 -ReleaseBranches master" + - "pwsh.exe -ExecutionPolicy ByPass -File .\\cicdscripts\\PublishPackage.ps1 -ReleaseBranches master" diff --git a/src/GregClient/GregClient.csproj b/src/GregClient/GregClient.csproj index 5ae0e66..954ce88 100644 --- a/src/GregClient/GregClient.csproj +++ b/src/GregClient/GregClient.csproj @@ -16,7 +16,9 @@ $(GenerateNuspecDependsOn);ReadPackageVersionFromOutputAssembly logo_square_32x32.png The Dynamo Package Manager .Net Client. + ..\..\bin\$(Configuration)\ + From 54999b1e2290fa2194e409eb3aefb22db60e4a20 Mon Sep 17 00:00:00 2001 From: kirschm Date: Thu, 22 Feb 2024 10:51:21 -0500 Subject: [PATCH 05/12] missing env var --- pipeline.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/pipeline.yml b/pipeline.yml index c63e569..28564ba 100644 --- a/pipeline.yml +++ b/pipeline.yml @@ -8,6 +8,7 @@ env: - URL_REPO_TOOLS : "git.autodesk.com/Dynamo/CICDResources.git" - BRANCH_TOOLS : "master" - NUGET_PUBLISH_SOURCE: "https://api.nuget.org/v3/index.json" + - COMMON_TOOLS_DIR : "CICDResources_shared" From 6109ba01204b0ac0ce0b9bcec898d7e4ffc168dc Mon Sep 17 00:00:00 2001 From: kirschm Date: Thu, 22 Feb 2024 11:08:19 -0500 Subject: [PATCH 06/12] missing more env vars --- pipeline.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pipeline.yml b/pipeline.yml index 28564ba..6957ae7 100644 --- a/pipeline.yml +++ b/pipeline.yml @@ -5,11 +5,13 @@ env: - SLACK_QUANTUM_BUILD_CREDENTIAL_ID : "slack-notify-token" - MAIL_QUANTUM_BUILD_RECIPIENT : "dynamo.dev@autodesk.com" - NUGETTOOL : "Nuget\\nuget.exe" + - NUNITTOOL : "NUnit\\NUnit.ConsoleRunner\\tools\\nunit3-console.exe" - URL_REPO_TOOLS : "git.autodesk.com/Dynamo/CICDResources.git" - BRANCH_TOOLS : "master" - NUGET_PUBLISH_SOURCE: "https://api.nuget.org/v3/index.json" - COMMON_TOOLS_DIR : "CICDResources_shared" - + - DOTCOVERTOOL : "DotCover\\JetBrains.dotCover.CommandLineTools\\tools\\dotCover.exe" + - SONARSCANTOOL : "SonarScannerMsbuild\\dotnet-framework-sonarscanner\\tools\\SonarScanner.MSBuild.exe" check_changelog_updated_on_pr: true From 1ead0fe9a391a38043f45c2d1082ed30d319a456 Mon Sep 17 00:00:00 2001 From: kirschm Date: Thu, 22 Feb 2024 11:55:25 -0500 Subject: [PATCH 07/12] nuget config --- config/nuget.config | 6 ++++++ pipeline.yml | 2 ++ 2 files changed, 8 insertions(+) create mode 100644 config/nuget.config diff --git a/config/nuget.config b/config/nuget.config new file mode 100644 index 0000000..0dc2659 --- /dev/null +++ b/config/nuget.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/pipeline.yml b/pipeline.yml index 6957ae7..77d7166 100644 --- a/pipeline.yml +++ b/pipeline.yml @@ -12,6 +12,8 @@ env: - COMMON_TOOLS_DIR : "CICDResources_shared" - DOTCOVERTOOL : "DotCover\\JetBrains.dotCover.CommandLineTools\\tools\\dotCover.exe" - SONARSCANTOOL : "SonarScannerMsbuild\\dotnet-framework-sonarscanner\\tools\\SonarScanner.MSBuild.exe" + - NUGET_SOURCES : "nuget.org" + - NUGET_CONFIG : "Config\\nuget.config" check_changelog_updated_on_pr: true From 41e1aa7a27a0b3ea185e80954e7d9622bb16c155 Mon Sep 17 00:00:00 2001 From: kirschm Date: Thu, 22 Feb 2024 12:39:13 -0500 Subject: [PATCH 08/12] dotnet build --- pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipeline.yml b/pipeline.yml index 77d7166..a307e3b 100644 --- a/pipeline.yml +++ b/pipeline.yml @@ -44,7 +44,7 @@ build: scripts: - "pwsh.exe -ExecutionPolicy ByPass -File .\\cicdscripts\\DownloadCICDResources.ps1" - "pwsh.exe -ExecutionPolicy ByPass -File .\\%COMMON_TOOLS_DIR%\\scripts\\SetupHost.ps1" - - "msbuild src\\GregClient.sln /p:Configuration=Release" + - "dotnet build src/gregClient.sln --configuration Release" ci_test: tests: - From 1433af4af53100bc8bb106f27c76f45efc115f46 Mon Sep 17 00:00:00 2001 From: kirschm Date: Thu, 22 Feb 2024 12:52:12 -0500 Subject: [PATCH 09/12] blackduck error --- pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipeline.yml b/pipeline.yml index a307e3b..16b9c8d 100644 --- a/pipeline.yml +++ b/pipeline.yml @@ -60,7 +60,7 @@ soc2: harmony: hidden_email_list: dynamo_ws_access third_party_lib_paths: - - "bin\\Release\\net8.0\\" + - bin\\Release\\net8.0\\ deployment: From 6b6197c0df4240bbcdc14238f6362c8d0a4bd5c1 Mon Sep 17 00:00:00 2001 From: kirschm Date: Thu, 22 Feb 2024 12:59:19 -0500 Subject: [PATCH 10/12] update --- pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipeline.yml b/pipeline.yml index 16b9c8d..0b28b02 100644 --- a/pipeline.yml +++ b/pipeline.yml @@ -49,7 +49,7 @@ ci_test: tests: - scripts: - - "dotnet test src/GregClientTests/GregClientTests.csproj --logger:'junit;LogFilePath=testresults\\testresults.xml'" + - dotnet test src/GregClientTests/GregClientTests.csproj --logger:"junit;LogFilePath=testresults\\testresults.xml" test_report_dir: TestResults test_report_pattern: From d30523f11fe14cb3905b7523487d0be4d7056510 Mon Sep 17 00:00:00 2001 From: kirschm Date: Thu, 22 Feb 2024 13:35:33 -0500 Subject: [PATCH 11/12] test res folder --- pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipeline.yml b/pipeline.yml index 0b28b02..3392f46 100644 --- a/pipeline.yml +++ b/pipeline.yml @@ -51,7 +51,7 @@ ci_test: scripts: - dotnet test src/GregClientTests/GregClientTests.csproj --logger:"junit;LogFilePath=testresults\\testresults.xml" - test_report_dir: TestResults + test_report_dir: GregClientTests/TestResults test_report_pattern: format: "junit" pattern: "*.xml" From 330f98d813e8629946de9907f16e6864212093a1 Mon Sep 17 00:00:00 2001 From: kirschm Date: Thu, 22 Feb 2024 14:30:38 -0500 Subject: [PATCH 12/12] test dir2 --- pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipeline.yml b/pipeline.yml index 3392f46..6316a90 100644 --- a/pipeline.yml +++ b/pipeline.yml @@ -51,7 +51,7 @@ ci_test: scripts: - dotnet test src/GregClientTests/GregClientTests.csproj --logger:"junit;LogFilePath=testresults\\testresults.xml" - test_report_dir: GregClientTests/TestResults + test_report_dir: GregClientTests\\testresults test_report_pattern: format: "junit" pattern: "*.xml"