Skip to content

Instantly share code, notes, and snippets.

@jorge07
Last active February 1, 2018 11:04
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 jorge07/eea4e1ebc8e4f500a68e0b20e33440c1 to your computer and use it in GitHub Desktop.
Save jorge07/eea4e1ebc8e4f500a68e0b20e33440c1 to your computer and use it in GitHub Desktop.
Jenkinsfile Dind (docker in docker) Nodejs kubernetes pipeline
podTemplate(
cloud: 'staging',
label: 'deploy-todo' + BUILD_ID,
containers: [
containerTemplate(
name: 'docker',
image: 'docker:17.12.0-ce-dind',
privileged: true,
ttyEnabled: true
),
containerTemplate(
name: 'node',
image: 'node:7',
ttyEnabled: true
),
],
volumes: [
emptyDirVolume(
memory: false,
mountPath: '/var/lib/docker'
)
]
) {
node('deploy') {
stage('Checkout') {
git url: 'https://github.com/codeship-library/nodejs-express-todoapp', branch: 'master'
}
stage('Install deps') {
container('node') {
sh 'npm install'
}
}
stage('Artifacting') {
container('docker') {
sh 'docker version'
sh 'docker build -t pantumakamadafaka .'
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment