Created
August 4, 2023 04:24
-
-
Save pingkunga/837913e1e7f08138b53f3e3f3b698547 to your computer and use it in GitHub Desktop.
Example JenkinsFile calls parameterized PowerShell Scripts
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
pipeline { | |
agent { | |
label { | |
label 'jenkins-dotnet' | |
} | |
} | |
environment { | |
BASE_PATH = pwd(); | |
} | |
options { | |
buildDiscarder(logRotator(numToKeepStr: '3', artifactNumToKeepStr: '3')) | |
} | |
stages { | |
stage('GEN BUILD REQUEST') { | |
steps { | |
powershell(returnStdout: true, script: '''.\\WIN_DOTNET_BUILD\\NOTIFY\\BUILD\\GEN_BUILDREQUEST.ps1 $env:NETNOTIFYAPI $env:REDMINEUSERAPIKEY''') | |
} | |
} | |
} | |
post { | |
cleanup { | |
cleanWs(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment