Jenkins

Jenkins Python Plugin获取环境变量

久未见 提交于 2020-04-11 13:52:59
Jenkins Python Plugin 官方wiki: https://wiki.jenkins-ci.org/display/JENKINS/Python+Plugin 它使得在构建时可以执行Python脚本(前提:Python必须已经被添加到path环境变量中) 当然,它也也可以使用Jenkins提供的一系列环境变量,如:BUILD_NUMBER BUILD_ID JOB_NAME JENKINS_HOME 等等 具体这些环境变量可以点击如下链接查看详情,http://ip[:port]/jenkins/env-vars.html/ 那么如何使用这些环境变量呢? 以BUILD_NUMBER为例, 在windows batch命令中使用此环境变量,使用%BUILD_NUMBER%即可 在linux shell命令中使用此环境变量,使用${BUILD_NUMBER}即可 而在Python脚本中要使用此环境变量,则需要具体的代码实现,如下: import os print os.getenv("BUILD_NUMBER") 执行此构建,输出结果截图如下: 来源: oschina 链接: https://my.oschina.net/u/1588291/blog/415308

java.io.NotSerializableException Error in Pipeline Scripting

偶尔善良 提交于 2020-04-11 08:21:49
问题 I'm using below code to load a Groovy file and to pass parameter: Pipeline Script in jenkins @NonCPS def ld() { def pck = load '/tmp/Provsioning/e.groovy'; return pck.xmlParseData("${params.hos_nam}"); } node { stage ('Deploying Packages'){ def aby = ld(); } } where ${params.hos_nam} is a build parameter and the installpackage groovy follows as below /tmp/Provsioning/e.groovy public class ReadXMLFile { def xmlParseData(String g){ installPackage(a,b,c); input 'proceed' aemRestart(b); } def

Declarative Pipeline with dynamic matrix axis values

前提是你 提交于 2020-04-11 06:17:43
问题 Hi I am trying to get a Jenknis-Declarative-Pipeline-Job work. The Use-Case should be pretty simple: I want to build multiple Plugins with the same Jenkins-pipeline. To do so I wrote a "JenkinsLibrary" with an interface the Plugins can use for parameters. One of this parameters is the axis-values. The Problem I have is pretty similar to this reddist post. I want to set the "values" of the "axis" of the matrix-build from a variable. I am out of Ideas, is this even possible? So here is my

测试岗位梳理【岗位职责篇】

最后都变了- 提交于 2020-04-10 14:33:20
此篇梳理不够完善,后续有很大优化的地方 1、基本要求 (1)全力配合中心主管、项目经理、产品经理及团队成员完成项目的跟进与发布; (2)每天下午5:00到5:30之间总结当天的测试进度与存在的风险,“品控”群中进行反馈(测试日报)。 2、编写测试用例 根据产品原型或需求文档,与产品经理沟通测试范围、重点,考虑逻辑、数据完整性等要求,策划编写测试用例,设计测试数据及预期结果,做好测试前的准备工作,确保测试目的达成。 3、评审测试用例 (1)完成测试用例后,与主管沟通评审时间; (2)提前在对应的沟通群中发出评审时间点、预计时长、参与人、测试用例; (3)评审结束后,对评审会议中提出的问题及时在用例中进行补充,必要性的在KM 上进行会议内容记录; (4)将最终版用例上传到云盘对应的目录下存档。 4、执行测试 (1)根据测试计划及测试用例,并根据产品特点及测试要求,通过Jenkins自行打包进行测试,及时发现软件缺陷,评估软件的特性与缺陷等级在TAPD中提单跟踪; (2)测试中发现产品未补充的遗漏需求,及时找产品经理进行沟通确认(说明:若产品经理不在座位或请假,优先在TAPD中提单给到产品经理); (3)有关运营需要补充的数据,TAPD 中提单给产品经理,方便我们跟踪问题的处理进度。 5 、bug验证 (1)根据测试结果,与开发部门沟通测试情况,督促开发部门解决问题,修复测试中发现的缺陷

trigger jenkins build on tag creation with multibranch pipeline

霸气de小男生 提交于 2020-04-10 14:28:20
问题 I've got a stage in my Jenkinsfile for building from a tag matching a tag name filter: stage('Build Release from Tag') { when { tag '*RELEASE' } In order to get tags to be discovered I've had to add tag discovery and a match for the tag name regex and to my pipeline under Branch sources > GitHub : The pipeline does discover tags that I push which match the filter. And if I click on one to run a build for it then it does run the build stage that matches the tag conditional. But I was expecting

DevOps的工作岗位的要求

允我心安 提交于 2020-04-10 09:50:24
## 为什么需要DevOps 不是每个人都能理解可靠的版本管理和牢固的构建系统的重要性。 也不是任何人能使得软件的发布达到可靠性,可重复性和可审计的高标准。Devops的职责就是将软件的构建和发布的流程自动化并且使它像机器人生产线一样运转,从而精确无误地保证正确的版本在要求的时间运行在规定的服务器上。 - 实现了软件的构建发布部署流程的自动化; - 自动化的流程提高了效率,实现了软件的快速发布; - 自动化的流程避免了人为的失误,提高了软件发布的准确性; - 自动化的流程能够尽早地发现问题,保证了软件功能的持续集成,而没有回退; - 自动化的流程使得软件的发布可靠且可重复; ## DevOps的工作岗位的要求 1. 了解软件开发的整个流程,其中包括source->metrics->compile->test->package->deploy。 2. 广阔的知识面,比如:Linux操作系统,软件开发技能,运维技能,数据库使用,软件架构实现等。 3. 沟通交流能力,需要与开发人员,测试人员,项目管理人员,基础架构维护人员协同工作。 3. 快速地解决问题的能力,扎实的计算机基础,熟练使用Shell,Perl或者Python脚本。 4. 英语读写能力,使用google,stackoverflow,github等提高工作效率。 5. 熟练使用基于web的支持分布式多平台的持续部署平台

Running Jenkins in Docker - Exits immediately

浪尽此生 提交于 2020-04-10 04:16:53
问题 I'm trying to run a Jenkins server with docker. I've built the image, and trying to run it with this command: docker run -p 8080:8080 62a4e44bf4bf The 62a4e44bf4bf is the docker image ID Whenever I run this command, it shuts down immediately. I've tried with this command: docker run -i -t -p 8080:8080 62a4e44bf4bf Which will keep the image running, but I can't seem to access the jenkins from my browser with this ip: localhost:8080 DOCKERFILE: FROM ubuntu:latest #Oracle Java7 install RUN apt

Running Jenkins in Docker - Exits immediately

筅森魡賤 提交于 2020-04-10 04:12:27
问题 I'm trying to run a Jenkins server with docker. I've built the image, and trying to run it with this command: docker run -p 8080:8080 62a4e44bf4bf The 62a4e44bf4bf is the docker image ID Whenever I run this command, it shuts down immediately. I've tried with this command: docker run -i -t -p 8080:8080 62a4e44bf4bf Which will keep the image running, but I can't seem to access the jenkins from my browser with this ip: localhost:8080 DOCKERFILE: FROM ubuntu:latest #Oracle Java7 install RUN apt

Multi branch pipeline with bitbucket build status notifier plugin in jenkins

孤者浪人 提交于 2020-04-10 03:44:53
问题 I have a multi branch pipeline job in my jenkins server and I tried to notify the build status using bitbucket cloud build status notifier plugin. I configured the settings provided in notifier plugin and added the notifier script function in the beginning and end of my Jenkinsfile. Jenkinsfile: node { stage 'Build' bitbucketStatusNotify ( buildState: 'INPROGRESS' ) ....... ....... bitbucketStatusNotify ( buildState: 'SUCESS' ) } When I run the jenkins build it trigger the notifier script and

docker images备份并推送docker hub命令记录

馋奶兔 提交于 2020-04-09 18:02:51
docker commit -p ed58144ddc4c jenkins_jackwalliam 登陆自己的docker hub账号 docker login 给备份打上tag docker tag jenkins_jackwalliam ikbr5kh/ikbr5kh:jenkins_jackwalliam 推送到docker hub docker push ikbr5kh/ikbr5kh:jenkins_jackwalliam 后续该docker 窗口还会安装更新,还需要更新到docker 后续再补充。 来源: oschina 链接: https://my.oschina.net/u/4414570/blog/3226452