Jenkins代码详见:
https://gitee.com/roclli/6-setting-env.git
Jenkinsfile内容为:1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21#!/usr/bing/env groovy
pipeline {
agent any
environment {
CC = 'clang'
}
stages {
stage('Example'){
environment {
DEBUG = '-g'
}
steps{
sh 'printenv'
}
}
}
}