当前位置:网站首页>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
边栏推荐
- White screen processing method of fulter startup page
- MySQL数据库 - 连接查询
- 数据分析学习目录
- MySQL syntax collation (5) -- functions, stored procedures and triggers
- Machine learning catalog
- 深度分析数据恢复原理——那些数据可以恢复那些不可以数据恢复软件
- ArcGIS JS API dojoconfig configuration
- How to use go code to compile Pb generated by proto file with protoc Compiler Go file
- JS to get the local IP address
- MySQL数据库 - 单表查询(三)
猜你喜欢
Reflection on the performance of some OpenGL operations in the past
Deep learning -- Summary of Feature Engineering
指针数组与数组指针的区分
Unity创建超写实三维场景的一般步骤
An idea of rendering pipeline based on FBO
OpenHarmony开源开发者成长计划,寻找改变世界的开源新生力!
MySQL syntax collation (4)
【webrtc】Add x264 encoder for CEF/Chromium
The platinum library cannot search the debug process records of some projection devices
@MapperScan与@Mapper
随机推荐
A brief explanation of golang's keyword "competence"
Kubernetes入门到精通-在 Kubernetes 上安装 OpenELB
Matlab 2019 installation of deep learning toolbox model for googlenet network
Openlayers 5.0 thermal diagram
Possible root causes include a too low setting for -Xss and illegal cyclic inheritance dependencies
Build intelligent garbage classification applet based on Zero
Grafana 分享带可变参数的链接
@Analysis of conditional on Web Application
IIS data conversion problem: 16bit to 24bit
Web Security
Command - sudo
Deep learning -- Summary of Feature Engineering
First experience of using fluent canvas
Regular expressions for judging positive integers
Virtual machine performance monitoring and fault handling tools
Common SQL commands
Reflection on the performance of some OpenGL operations in the past
Thoughts on the optimization of examination papers in the examination system
Easy mock local deployment (you need to experience three times in a crowded time. Li Zao will do the same as me. Love is like a festival mock)
MySQL数据库 - 单表查询(二)