-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
attempt to use shared scripts for build and remove docker use #93
Merged
Merged
Changes from 3 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
76cff07
attempt to use shared scripts
mjkkirschner 442c838
add one custom local script
mjkkirschner c4fe8ed
del
mjkkirschner ee1c9da
review comments
mjkkirschner 54999b1
missing env var
mjkkirschner 6109ba0
missing more env vars
mjkkirschner 1ead0fe
nuget config
mjkkirschner 41e1aa7
dotnet build
mjkkirschner 1433af4
blackduck error
mjkkirschner 6b6197c
update
mjkkirschner d30523f
test res folder
mjkkirschner 330f98d
test dir2
mjkkirschner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 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 = "src\GregClient\bin\release" | ||
$nupkgFile = Get-ChildItem $assemblyPath\*.nupkg -Depth 1 | ||
mjkkirschner marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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 |
---|---|---|
@@ -1,18 +1,22 @@ | ||
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" | ||
- 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 | ||
pipeline_os: "Windows" | ||
force_slack_notification : true | ||
language: csharp | ||
use_garasign: true | ||
|
||
|
||
schedule: | ||
cron_schedule: "once_a_week" | ||
|
@@ -22,28 +26,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" | ||
- "msbuild src\\GregClient.sln /p:Configuration=Release" | ||
ci_test: | ||
tests: | ||
- | ||
|
@@ -55,4 +51,25 @@ ci_test: | |
format: "junit" | ||
pattern: "*.xml" | ||
|
||
soc2: | ||
harmony: | ||
hidden_email_list: dynamo_ws_access | ||
third_party_lib_paths: | ||
- "src\\GregClient\\bin\\Release\\net8.0\\" | ||
mjkkirschner marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
deployment: | ||
|
||
- | ||
type: sign | ||
files_to_sign: | ||
- "src\\GregClient\\bin\\Release\\net8.0\\greg.dll" | ||
- | ||
type: customized | ||
scripts: | ||
- "pwsh.exe -ExecutionPolicy ByPass -File .\\cicdscripts\\scripts\\PublishPackage.ps1 -ReleaseBranches master" | ||
mjkkirschner marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
|
||
|
||
|
||
|
||
|
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe an improvement for later but I feel we can also move this script to the common CICDResources repo as it seems to be common to projects using the repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I am not sure how we'd do that - this is the script that retrieves the common cicd resources... perhaps we could add something to the CI lib directly?