Skip to content

Instantly share code, notes, and snippets.

@scoheb
Created May 24, 2018 01:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scoheb/f29d263c240e8880648b920240635ed6 to your computer and use it in GitHub Desktop.
Save scoheb/f29d263c240e8880648b920240635ed6 to your computer and use it in GitHub Desktop.
pipeline {
agent {
kubernetes {
cloud 'openshift'
label 'my-label'
serviceAccount 'jenkins'
defaultContainer 'jnlp'
yaml """
apiVersion: v1
kind: Pod
metadata:
labels:
some-label: my-label
spec:
containers:
- name: jnlp
imagePullPolicy: Always
image: "openshift/jenkins-slave-base-centos7"
tty: true
"""
}
}
stages {
stage("Clone dist-git repo") {
steps {
echo "Hello World"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment