Skip to content

Commit

Permalink
Addition of files to have CI7CD piepline for prod environment (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
alfredo-pozo authored Oct 4, 2020
1 parent 949be40 commit 918b163
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@Library('PSL@master')
@Library('CILibrary@CBP/stable') _

StartPipeline()
29 changes: 29 additions & 0 deletions cicd/DownloadCICDResources.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<#
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
{
git clone -b $env:BRANCH_TOOLS "$env:URL_REPO_TOOLS" "$env:WORKSPACE\$env:COMMON_RESOURCES_DIR"

if($LASTEXITCODE -ne 0)
{
throw "The download of the resources failed"
}
}

}
catch {
Write-Host $error[0]
throw $LASTEXITCODE
}
52 changes: 52 additions & 0 deletions pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
version: 0.1.1
env:
- JENKINS_NODE_WIN: "Dynamo_Win_003"
- SLACK_QUANTUM_BUILD_CHANNEL : "#dynamo-jenkinsbuild"
- SLACK_QUANTUM_BUILD_CREDENTIAL_ID : "slack-notify-token"
- MAIL_QUANTUM_BUILD_RECIPIENT : "[email protected]"
- DOCKER_IMAGE_VERSION : "1.0.7"
- BUCKETNAME : "dictionary.dynamobim.com"
- DISTRIBUTIONID : "E29G935QNLRDFJ"
- DOCKER_WORKSPACE : "C:\\Workspace"
- COMMON_RESOURCES_DIR : "cicdresources"
- DOCKER_CONTAINER : "build-dictionary"
- URL_REPO_TOOLS : "https://github.com/DynamoDS/DynamoDictionary.git"
- BRANCH_TOOLS : "cicdresources"

timeout: 420
check_changelog_updated_on_pr: false
pipeline_os: "Windows"
force_slack_notification : true

schedule:
cron_schedule: "once_a_month"

build:
-
scripts:
- "pwsh.exe -ExecutionPolicy ByPass -File .\\cicd\\DownloadCICDResources.ps1"
- "pwsh.exe -ExecutionPolicy ByPass -File .\\%COMMON_RESOURCES_DIR%\\scripts\\SetupHost.ps1"
- "pwsh.exe -ExecutionPolicy ByPass -File .\\%COMMON_RESOURCES_DIR%\\scripts\\StartContainer.ps1"
- "pwsh.exe -ExecutionPolicy ByPass -File .\\%COMMON_RESOURCES_DIR%\\scripts\\DockerBuild.ps1"

code_analysis:
sonarqube:
skip: true
soc2:
run_on_any_branch : true
white_source:
skip: false
fail_on_audit_failure: true
team: Dynamo
project_name: "DynamoDictionary"
hidden_email_list: dynamo_ws_access
third_party_lib_paths:
- "node_modules"

deployment:
-
type: customized
scripts:
- "pwsh.exe -ExecutionPolicy ByPass -File .\\%COMMON_RESOURCES_DIR%\\scripts\\DockerVaultLogin.ps1"
- "pwsh.exe -ExecutionPolicy ByPass -File .\\%COMMON_RESOURCES_DIR%\\scripts\\DockerDeploy.ps1"
- "pwsh.exe -ExecutionPolicy ByPass -File .\\%COMMON_RESOURCES_DIR%\\scripts\\PostDeploy.ps1"

0 comments on commit 918b163

Please sign in to comment.