当前位置:网站首页>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 platinum library cannot search the debug process records of some projection devices
- Openlayers 5.0 two centering methods
- MySQL syntax collation (5) -- functions, stored procedures and triggers
- Go recursively loops through folders
- 2021-2022-2 ACM集训队每周程序设计竞赛(8)题解
- Pit encountered using camera x_ When onpause, the camera is not released, resulting in a black screen when it comes back
- arcMap 发布切片服务
- Unity创建超写实三维场景的一般步骤
- Deep learning -- Summary of Feature Engineering
- White screen processing method of fulter startup page
猜你喜欢

如何在BNB链上创建BEP-20通证
![[report] Microsoft: application of deep learning methods in speech enhancement](/img/c1/7bffbcecababf8dabf86bd34ab1809.png)
[report] Microsoft: application of deep learning methods in speech enhancement

Command - sudo

精简CUDA教程——CUDA Driver API

Possible root causes include a too low setting for -Xss and illegal cyclic inheritance dependencies

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

Zero base to build profit taking away CPS platform official account

Class loading process of JVM

Using oes texture + glsurfaceview + JNI to realize player picture processing based on OpenGL es

C6748 软件仿真和硬件测试 ---附详细FFT硬件测量时间
随机推荐
Inject Autowired fields into ordinary beans
C6748 软件仿真和硬件测试 ---附详细FFT硬件测量时间
[webrtc] add x264 encoder for CEF / Chromium
First experience of using fluent canvas
MFCC: Mel频率倒谱系数计算感知频率和实际频率转换
Openharmony open source developer growth plan, looking for new open source forces that change the world!
MySQL数据库 - 单表查询(一)
优先使用组合而不使用继承
如何在BNB链上创建BEP-20通证
RuntimeError: Providing a bool or integral fill value without setting the optional `dtype` or `out`
Steps to build a deep learning environment GPU
Openlayers 5.0 loading ArcGIS Server slice service
考试系统进入试卷优化思路
Kibana reports an error server is not ready yet. Possible causes
Is meituan, a profit-making company with zero foundation, hungry? Coupon CPS applet (with source code)
Mfcc: Mel frequency cepstrum coefficient calculation of perceived frequency and actual frequency conversion
goroutine
Some ideas about time-consuming needs assessment
Gossip: on greed
A brief explanation of golang's keyword "competence"