Created
November 28, 2017 23:06
-
-
Save abn/9602a6e6fb176d40901936cd1b51f7df to your computer and use it in GitHub Desktop.
Jenkinsfile: OpenShift podTemplate example
This file contains hidden or 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 currently is restricted on OpenShift Online, however is possible on OSD/OCP clusters | |
// we create a dotnet builder pod using the provided jenkins slave image for executing dotnet commands in | |
podTemplate( | |
label: 'dotnet-build-pod', cloud: 'openshift', | |
containers: [ | |
containerTemplate( | |
name: 'dotnet-build-pod', image: 'registry.access.redhat.com/dotnet/dotnet-20-jenkins-slave-rhel7:latest' | |
) | |
]) { | |
node('dotnet-build-pod-x') { | |
stage('Display .NET Version') { | |
sh """ | |
dotnet --version | |
""" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment