Jenkins代码详见:
https://gitee.com/roclli/pp4-0-custom-exec-env
Jenkinsfile内容为:1
2
3
4
5
6
7
8
9
10
11
12
13
14#!/usr/bing/env groovy
pipeline {
agent {
docker { image 'node:7-alpine' }
}
stages {
stage('Test') {
steps {
sh 'node --version'
}
}
}
}