diff options
Diffstat (limited to 'doc/Jenkinsfile.example')
| -rw-r--r-- | doc/Jenkinsfile.example | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/doc/Jenkinsfile.example b/doc/Jenkinsfile.example new file mode 100644 index 0000000..15d43d0 --- /dev/null +++ b/doc/Jenkinsfile.example @@ -0,0 +1,39 @@ +// Example Jenkinsfile for DooD (Docker-out-of-Docker) builds +// Jenkins spawns a temporary container with the specified image, +// runs the build inside it, and cleans up when done. + +pipeline { + // Each stage can use a different Docker image + agent none + + stages { + stage('Build') { + agent { + docker { image 'node:20' } + } + steps { + sh 'npm install' + sh 'npm run build' + } + } + + stage('Test') { + agent { + docker { image 'node:20' } + } + steps { + sh 'npm test' + } + } + + // Example: stage with a different image + // stage('Deploy') { + // agent { + // docker { image 'alpine:latest' } + // } + // steps { + // sh 'echo "Deploying..."' + // } + // } + } +} |
