-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
attempt to use shared scripts for build and remove docker use (#93)
* attempt to use shared scripts * add one custom local script * del * review comments fix github action * missing env var * missing more env vars * nuget config * dotnet build * blackduck error * update * test res folder * test dir2
- Loading branch information
1 parent
f81dbec
commit ae9bb2a
Showing
16 changed files
with
141 additions
and
229 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 = "\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") | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<packageSources> | ||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" /> | ||
</packageSources> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,27 @@ | ||
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 : "[email protected]" | ||
- DOCKER_WORKSPACE : "c:\\Greg" | ||
- NUGETTOOL : "Nuget\\nuget.exe" | ||
- DOCKER_CONTAINER : "buildContainer" | ||
- HARMONY_REPO : "DynamoDS/PackageManagerClient" | ||
- 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" | ||
- NUGET_SOURCES : "nuget.org" | ||
- NUGET_CONFIG : "Config\\nuget.config" | ||
|
||
|
||
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,37 +31,50 @@ 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" | ||
- "pwsh.exe -ExecutionPolicy ByPass -File .\\cicdscripts\\DownloadCICDResources.ps1" | ||
- "pwsh.exe -ExecutionPolicy ByPass -File .\\%COMMON_TOOLS_DIR%\\scripts\\SetupHost.ps1" | ||
- "dotnet build src/gregClient.sln --configuration Release" | ||
ci_test: | ||
tests: | ||
- | ||
scripts: | ||
- dotnet test src/GregClientTests/GregClientTests.csproj --logger:"junit;LogFilePath=testresults\\testresults.xml" | ||
|
||
test_report_dir: GregClientTests\\testresults | ||
test_report_pattern: | ||
format: "junit" | ||
pattern: "*.xml" | ||
|
||
soc2: | ||
harmony: | ||
hidden_email_list: dynamo_ws_access | ||
repository: env.HARMONY_REPO | ||
third_party_lib_paths: | ||
- "bin\\release" | ||
- bin\\Release\\net8.0\\ | ||
|
||
deployment: | ||
- | ||
type: customized | ||
scripts: | ||
- "pwsh.exe -ExecutionPolicy ByPass -File .\\cicdscripts\\ExecuteContainerDeploy.ps1" | ||
- "pwsh.exe -ExecutionPolicy ByPass -File .\\cicdscripts\\PostDeploy.ps1" | ||
|
||
ci_test: | ||
tests: | ||
- | ||
|
||
- | ||
type: sign | ||
files_to_sign: | ||
- "bin\\Release\\net8.0\\greg.dll" | ||
- | ||
type: customized | ||
scripts: | ||
- "dotnet test src/GregClientTests/GregClientTests.csproj --logger:'junit;LogFilePath=testresults\\testresults.xml'" | ||
- "pwsh.exe -ExecutionPolicy ByPass -File .\\cicdscripts\\PublishPackage.ps1 -ReleaseBranches master" | ||
|
||
|
||
|
||
|
||
test_report_dir: TestResults | ||
test_report_pattern: | ||
format: "junit" | ||
pattern: "*.xml" | ||
|
||
|
Oops, something went wrong.