Last active
February 1, 2018 11:04
-
-
Save jorge07/eea4e1ebc8e4f500a68e0b20e33440c1 to your computer and use it in GitHub Desktop.
Jenkinsfile Dind (docker in docker) Nodejs kubernetes pipeline
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( | |
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