当前位置:网站首页>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
边栏推荐
- The usage of slice and the difference between slice and array
- Speculation on the way to realize the smooth drag preview of video editing software
- openlayers 5.0 两种居中方式
- Openlayers 5.0 two centering methods
- 视频理解-Video Understanding
- 数据分析学习目录
- Modify the font size of hint in editext
- MySQL数据库 - 单表查询(三)
- Go three ways to copy files
- Esp8266 - beginner level Chapter 1
猜你喜欢

【webrtc】Add x264 encoder for CEF/Chromium
![[report] Microsoft: application of deep learning methods in speech enhancement](/img/29/2d2addd826359fdb0920e06ebedd29.png)
[report] Microsoft: application of deep learning methods in speech enhancement

OpenHarmony开源开发者成长计划,寻找改变世界的开源新生力!

ArcMap publishing slicing service

Kubernetes入门到精通-KtConnect(全称Kubernetes Toolkit Connect)是一款基于Kubernetes环境用于提高本地测试联调效率的小工具。

NiO related Basics

如何在BNB链上创建BEP-20通证

FFT物理意义: 1024点FFT就是1024个实数,实际进入fft的输入是1024个复数(虚部为0),输出也是1024个复数,有效的数据是前512个复数

OpenHarmony开源开发者成长计划,寻找改变世界的开源新生力!

Openharmony open source developer growth plan, looking for new open source forces that change the world!
随机推荐
RuntimeError: Providing a bool or integral fill value without setting the optional `dtype` or `out`
Modify the font size of hint in editext
Mfcc: Mel frequency cepstrum coefficient calculation of perceived frequency and actual frequency conversion
[报告] Microsoft :Application of deep learning methods in speech enhancement
JS calculation time difference
uIP1.0 主动发送的问题理解
[report] Microsoft: application of deep learning methods in speech enhancement
JS to get the local IP address
No, some people can't do the National Day avatar applet (you can open the traffic master and earn pocket money)
Parsing headless jsonarray arrays
openlayers 5.0 两种居中方式
Pdf reference learning notes
[H264] hevc H264 parsing and frame rate setting of the old version of libvlc
Openlayers 5.0 thermal diagram
精简CUDA教程——CUDA Driver API
Machine learning catalog
Prefer composition to inheritance
JVM的类加载过程
An idea of rendering pipeline based on FBO
Efficient serial port cyclic buffer receiving processing idea and code 2