Skip to content

Instantly share code, notes, and snippets.

@chancez
Created September 26, 2017 17:27
Show Gist options
  • Save chancez/4d65118c11af054860f22df76364fa31 to your computer and use it in GitHub Desktop.
Save chancez/4d65118c11af054860f22df76364fa31 to your computer and use it in GitHub Desktop.
def hyperkubeImage = 'quay.io/coreos/hyperkube:v1.7.3_coreos.0'
podTemplate(
cloud: 'kubernetes',
containers: [
containerTemplate(
name: 'docker',
alwaysPullImage: false,
command: 'dockerd-entrypoint.sh',
args: '--storage-driver=overlay',
image: 'docker:dind',
// resourceRequestCpu: '1750m',
// resourceRequestMemory: '1500Mi',
privileged: true,
ttyEnabled: true,
),
containerTemplate(
name: 'apiserver',
alwaysPullImage: true,
command: "/fail",
image: hyperkubeImage,
ttyEnabled: true,
),
],
volumes: [
emptyDirVolume(
mountPath: '/var/lib/docker',
memory: false,
),
],
idleMinutes: 0,
instanceCap: 5,
label: 'tmp-test',
name: 'tmp-test',
) {
node ('tmp-test') {
container('apiserver') {
sh "ps"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment