当前位置:网站首页>Devops integration - environment variables and building tools of Jenkins service
Devops integration - environment variables and building tools of Jenkins service
2022-04-23 19:30:00 【Lao wa next door】
One 、 environment variable
Environment variables can be seen as pipeline And Jenkins An interactive medium . such as , Can be in pipeline Pass through BUILD_NUMBER The variable knows the current number of builds for the build task . Environment variables can be divided into Jenkins Built in variables and custom variables .
1.1、Jenkins Built-in variables
stay pipeline Execution time ,Jenkins Through a named env Global variable of , take Jenkins The built-in environment variables are exposed .
Default env The properties of can be directly in pipeline I quote ; There are three ways to quote :
- ${env.BUILD_NUMBER} Mode one , Recommended
- $env.BUILD_NUMBER Mode two ,
- ${BUILD_NUMBER} Mode three , It is not recommended to use
Let's briefly introduce some variables that are often used in practical work .
- BUILD_NUMBER: Construction number , Cumulative number .
- BRANCH_NAME: Multiple branches pipeline Project support .
- BUILD_URL: The currently built page URL.
- GIT_BRANCH: adopt git This variable is only available for projects built from the pulled source code .
1.2、 Customize Pipeline environment variable
When pipeline When it gets complicated , We will have the need to define our own environment variables . declarative pipeline Provides environment Instructions , Convenient custom variables .
in addition ,environment Instructions can be in pipeline In the definition of , Represents that the variable scope is the entire pipeline; It can also be in stage In the definition of , Representative variables are only valid at this stage .
If in environment The variables defined in are the same as env Duplicate variable names in , Then the value of the variable with the same name will be overwritten .
1.3、 Custom global environment variables
occasionally , We need to define some global cross pipeline The custom variable for .<
版权声明
本文为[Lao wa next door]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231923218897.html
边栏推荐
- JS calculation time difference
- MySQL数据库 - 数据库和表的基本操作(二)
- 数据分析学习目录
- Grafana 分享带可变参数的链接
- Convert string to JSON
- 点云数据集常用处理
- An idea of rendering pipeline based on FBO
- Kibana reports an error server is not ready yet. Possible causes
- Openharmony open source developer growth plan, looking for new open source forces that change the world!
- Strange passion
猜你喜欢
ESP8266-入门第一篇
Prefer composition to inheritance
2021-2022-2 ACM training team weekly Programming Competition (8) problem solution
优先使用组合而不使用继承
RuntimeError: Providing a bool or integral fill value without setting the optional `dtype` or `out`
The most detailed network counting experiment in history (2) -- rip experiment of layer 3 switch
Command - sudo
Openharmony open source developer growth plan, looking for new open source forces that change the world!
Class loading process of JVM
MySQL lock
随机推荐
MySQL lock
What is a message queue
Zero base to build profit taking away CPS platform official account
First experience of using fluent canvas
filebeat、logstash配置安装
Solve the problem of invalid listview Click
Esp8266 - beginner level Chapter 1
Efficient serial port cyclic buffer receiving processing idea and code 2
Codeforces Round #783 (Div. 2) D题解
Regular expressions for judging positive integers
How to use go code to compile Pb generated by proto file with protoc Compiler Go file
RuntimeError: Providing a bool or integral fill value without setting the optional `dtype` or `out`
Go modules daily use
FFT物理意义: 1024点FFT就是1024个实数,实际进入fft的输入是1024个复数(虚部为0),输出也是1024个复数,有效的数据是前512个复数
MFC获取本机IP(网络通讯时用得多)
Speex Wiener filter and rewriting of hypergeometric distribution
Kubernetes入门到精通-KtConnect(全称Kubernetes Toolkit Connect)是一款基于Kubernetes环境用于提高本地测试联调效率的小工具。
命令-sudo
Executor、ExecutorService、Executors、ThreadPoolExecutor、Future、Runnable、Callable
Hot reload debugging