Last active
November 3, 2017 02:06
-
-
Save rohancme/d940a7425578c64524332c25096a5c46 to your computer and use it in GitHub Desktop.
A simple Windows Jenkinsfile for the Kubernetes plugin
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
podTemplate(label: 'windows-vs2017', | |
containers: [ | |
containerTemplate(name: 'jnlp', image: '{{REPLACE-WITH-YOUR-CUSTOM-IMAGE}}', | |
envVars:[ | |
containerEnvVar(key: 'HOME', value:'C:\\users\\containeradministrator'), | |
containerEnvVar(key: 'JENKINS_HOME', value: 'G:\\') | |
], | |
workingDir:'C:\\Jenkins\\') | |
], | |
nodeSelector: 'beta.kubernetes.io/os=windows') { | |
node ('windows-vs2017') { | |
bat 'powershell.exe mkdir G:\\repo' | |
dir('G:\\repo\\'){ | |
git branch: "master", credentialsId: "jenkins-windows-test", url: '[email protected]:AzureCATE2E/JenkinsTestWindows.git' | |
stage ('Build'){ | |
bat 'powershell.exe nuget restore' | |
bat 'powershell.exe msbuild' | |
bat 'powershell.exe python3 ../zip_and_upload.py -p . -o myzip' | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment