Jenkins

pass parameter from jenkins parameterized build to windows batch command

Deadly 提交于 2021-02-17 21:26:33
问题 I am starting to use Jenkins, which is a really great tool. We are using parameterized build, we define parameter such as branch name ${Branch} (e.g. dev, release, main etc). In the build config, I can add a windows batch command, is there a way I can pass down these parameters to the batch command? I tried to pass like "%${Branch}%" or "%Branch%", but seems not working. Can anyone help? Many Thanks 回答1: Using Parameterized Build , you need to define parameters. The value of these will be

Jenkins Overall/Read permission

早过忘川 提交于 2021-02-17 21:21:33
问题 When opening my Jenkins in the URL I cant seem to log in it throws out the message "User is missing the Overall/Read permission". I have tried the answer from a similar question but disabling the security does not work. Jenkins continue's to throw out the error. Somebody recommended that I remove the file all together but also failed. Any other solution anybody could supply me with? Posts I have visited already include: Jenkins Wiki 回答1: Edit the /var/lib/jenkins/config.xml file and add you

Jenkins Overall/Read permission

♀尐吖头ヾ 提交于 2021-02-17 21:21:11
问题 When opening my Jenkins in the URL I cant seem to log in it throws out the message "User is missing the Overall/Read permission". I have tried the answer from a similar question but disabling the security does not work. Jenkins continue's to throw out the error. Somebody recommended that I remove the file all together but also failed. Any other solution anybody could supply me with? Posts I have visited already include: Jenkins Wiki 回答1: Edit the /var/lib/jenkins/config.xml file and add you

什么是测试驱动开发及其重要性

你。 提交于 2021-02-17 13:50:45
顾翔老师的《软件测试技术实战设计、工具及管理》网上购买地址: https://item.jd.com/34295655089.html 《基于Django的电子商务网站》网上购买地址: https://item.jd.com/12082665.html 店铺二维码: 来源: https://www.maiyewang.com/ 测试是任何软件开发项目中最重要的步骤之一。如果跳过此过程,则结果可能是灾难性的-对项目和公司而言。但是什么时候应该对软件进行测试?在项目完成后进行测试似乎是合乎逻辑的。但是,经典测试过程的功能是有限的。如果您先编写代码,然后再测试实现,则可能会遇到一些问题,即过度研发,设计偏离,可测试性问题。幸运的是,有一种方法可以应对这些挑战,它被称为–测试驱动开发。 什么是TDD或测试驱动开发? TDD是测试驱动开发的缩写,它指的是设计范例,其中软件组件测试用于指导整个开发过程。要了解TDD的工作原理,首先,最好定义其重要概念之一-单元测试。 什么是软件单元测试?   单元测试 是一种将代码分解成小的独立单元的方法。 单元测试的主要目的是独立评估每个组件的行为,以验证它们是否正常运行。 单元测试通常由开发人员执行,但也可以由质量经理执行。 一些软件开发人员认为单元测试是浪费时间,但是实践表明情况恰恰相反。   在系统测试, 集成测试 和Beta测试阶段,

Jenkins之jenkinsfile基础

有些话、适合烂在心里 提交于 2021-02-17 07:15:32
精华推荐 : 重磅发布 - 自动化框架基础指南pdf 在介绍jenkinsfile前先看下pipeline的概念。 jenkins官方文档:Jenkins Pipeline (or simply "Pipeline") is a suite of plugins which supports implementing and integrating continuous delivery pipelines into Jenkins. 即pipeline是一套jenkins官方提供的插件,它可以用来在jenkins中实现和集成持续交付。 通常情况,大多新手都是在jenkins界面下直接写pipeline,甚至还未尝试写pipline,一般大家这样写的: 笔者在工作中则是利用jenkinsfile来写,将所有的pipeline代码化,并托管在git上做版本管理。 从而实现像写代码一样,高度定制、封装pipeline,以提升pipeline的可用性、可维护性。 这也是笔者推荐大家掌握的姿势:代码化你的pipeline 下面我们看下jenkinsfile的基本介绍,后续持续的把pipeline系列写下去,使用jenkinsfile的好处有哪些? 可以对pipeline代码进行评审/迭代 可以对pipeline代码进行审计跟踪 pipeline中的单一可信数据源

Jenkins高级用法

天大地大妈咪最大 提交于 2021-02-17 06:54:51
##系列目录 1.Jenkins 安装 2.Jenkins 集群 3.Jenkins 持续集成 - ASP.NET Core 持续集成(Docker&自由风格&Jenkinsfile) 4.Jenkins 高级用法 - Pipeline 安装 5.Jenkins 高级用法 - Jenkinsfile 介绍及实战经验 6.Jenkins 高级用法 - Blue Ocean 使用 7.Jenkins 高级用法 - 根据 git commit 控制构建过程 8.Jenkins 高级用法 - 微服务DevOps实战(ASP.NET Core) 常见问题: 1.Jenkins 时区设置 2.Jenkins 无法捕获构建脚本错误问题 一.什么是 Jenkinsfile Jenkinsfile 是 Jenkins 2.x 核心特性 Pipeline 的脚本,由Groovy语言实现。Jenkinsfile一般是放在项目根目录,随项目一起受源代码管理软件控制,无需像创建“自由风格"(Jenkins FreeStyle)项目一样,每次可能需要拷贝很多设置到新项目,提供了一些直接的好处: Pipeline上的代码审查/迭代 Pipeline的审计跟踪 Pipeline的唯一真实来源,可以由项目的多个成员查看和编辑。 Pipeline支持:Declarative(在Pipeline 2.5中引入

Jenkins generate new parameters based on another parameter value

泄露秘密 提交于 2021-02-17 05:01:31
问题 I have a choice parameter called 'Data Center' which has two values DC01 and DC02. If user chooses DC01 I want few other build parameters to show up, if he chooses DC02 I want other parameters to show up. Is there any way to do it? If user chooses DC01, I want two more fields such as 'hostname' and 'IP address' which are just text fields. I have tried using Active Choice Plugin, but I don't think we can generate text field parameters using that. Can anyone help? 回答1: We can generate text

Jenkins generate new parameters based on another parameter value

给你一囗甜甜゛ 提交于 2021-02-17 05:01:22
问题 I have a choice parameter called 'Data Center' which has two values DC01 and DC02. If user chooses DC01 I want few other build parameters to show up, if he chooses DC02 I want other parameters to show up. Is there any way to do it? If user chooses DC01, I want two more fields such as 'hostname' and 'IP address' which are just text fields. I have tried using Active Choice Plugin, but I don't think we can generate text field parameters using that. Can anyone help? 回答1: We can generate text

How can I male groovy on Jenkins mask the output of a variable the same way it does for credentials?

无人久伴 提交于 2021-02-17 03:59:05
问题 Is there a way in groovy on Jenkins to take an arbitrary String variable - say the result of an API call to another service - and make Jenkins mask it in console output as it does automatically for values read in from the Credentials Manager? 回答1: UPDATED SOLUTION: To hide the output of a variable you can use the Mask Password Plugin Here is an exemple: String myPassword = 'toto' node { println "my password is displayed: ${myPassword}" wrap([$class: 'MaskPasswordsBuildWrapper',

python自学第二节课(笔记)

被刻印的时光 ゝ 提交于 2021-02-16 23:20:21
顾翔老师的《软件测试技术实战设计、工具及管理》网上购买地址: https://item.jd.com/34295655089.html 《基于Django的电子商务网站》网上购买地址: https://item.jd.com/12082665.html 店铺二维码: 来源:https://www.testwo.com/ 一. 数据类型 1.字符串 string或str 用引号括起来的文本,例如 '乔乔子' 、'123' 、'hello' 2.整数 integer或int 不带小数点的整数,例如 127 ,48, -8 例如'hello mirror world'、108、''108''分别是:字符串、整数、字符串 3.浮点数 float 带小数点的数字,例如 0.55 ,1.3,-0.8 二. 数据的运用 1.四则运算(和数学运算一样,按照运算优先级口诀,从左到右先算括号里的,括号外的则乘除先于加减) 2.字符串的拼接(只能将字符串与字符串拼接) 例如:我的开机密码是123456,明显看出123456是整数,赋值给number;print()函数里+号是无法拼接非字符串的 正确写法: xinxi='我的开机密码是' number='123456 print (xinxi+number) type()函数的应用 :查询数据的类型 三.数据的转换 1. str()函数