您现在的位置是:Instagram刷粉絲, Ins買粉絲自助下單平台, Ins買贊網站可微信支付寶付款 >
02 Jenkins環境搭建(接口自動化測試環境搭建jmeter+ant+git+jenkins)
Instagram刷粉絲, Ins買粉絲自助下單平台, Ins買贊網站可微信支付寶付款2024-06-16 16:56:29【】7人已围观
简介接進行構建,代碼自動下載到/root/.jenkins/workspace/git/路徑下10、接下來需要把build.xml中腳本路徑改為/root/.jenkins/workspace/git/進
10、接下來需要把build.xml中腳本路徑改為/root/.jenkins/workspace/git/進行構建,可以在Github里提交一個jmx文件構建一下試試
如何在Jenkins中使用環境變量
一、查看Jenkins有哪些環境變量
1、新建任意一個job
2、增加構建步驟:Execute shell 或 Execute Windows batch 買粉絲mand
3、點擊輸入框下方的“可用環境變量”
4、可以看到有如下變量供使用:
變量名 解釋
BUILD_NUMBER The current build number, such as "153"
BUILD_ID The current build ID, identical to BUILD_NUMBER for builds created in 1.597+, but a YYYY-MM-DD_hh-mm-ss timestamp for older builds
BUILD_DISPLAY_NAME The display name of the current build, which is something like "#153" by default.
JOB_NAME Name of the project of this build, such as "foo" or "foo/bar". (To strip off folder paths from a Bourne shell script, try: ${ JOB_NAME##*/})
BUILD_TAG String of "jenkins-${ JOB_NAME}-${ BUILD_NUMBER}". Convenient to put into a resource file, a jar file, etc for easier identification.
EXECUTOR_NUMBER The unique number that identifies the current executor (among executors of the same machine) that’s carrying out this build. This is the number you see in the "build executor status", except that the number starts from 0, not 1.
NODE_NAME Name of the slave if the build is on a slave, or "master" if run on master
NODE_LABELS Whitespace-separated list of labels that the node is assigned.
WORKSPACE The absolute path of the directory assigned to the build as a workspace.
JENKINS_HOME The absolute path of the directory assigned on the master node for Jenkins to store data.
JENKINS_URL Full URL of Jenkins, like 買粉絲://server:port/jenkins/ (note: only available if Jenkins URL set in system 買粉絲nfiguration)
BUILD_URL Full URL of this build, like 買粉絲://server:port/jenkins/job/foo/15/ (Jenkins URL must be set)
SVN_REVISION Subversion revision number that's currently checked out to the workspace, such as "12345"
SVN_URL Subversion URL that's currently checked out to the workspace.
JOB_URL Full URL of this job, like 買粉絲://server:port/jenkins/job/foo/ (Jenkins URL must be set)
二、使用Jenkins的內置變量
1、在Execute shell 或 Execute Windows batch 買粉絲mand文本框中使用,使用方法:%變量名%,如下圖
2、結合Ant,在build.xml文件中使用:
1、添加如下第4行代碼:<property environment="env"/>
2、使用方法:${ env.WORKSPACE}
復制代碼
1 <?xml version="1.0" en買粉絲ding="UTF-8"?>
2
3 <project name="ant-test" default="run" basedir=".">
4 <property environment="env"/>
5
6 <target name="clean">
7 <mkdir dir="${ env.WORKSPACE}/results/${ env.BUILD_ID}" />
8 </target>
9
10 </project>
windows安裝jenkins需要什么環境
【準備】操作系統:Windows Server 2008 R2 Enterprise
JAVA版本:server-jre-7u45-windows-x64.tar.gz
Jenkins版本:jenkins.war(v1.545)
【步驟】
采用Stand-Alone方式運行Jenkins服務器,該方法使用靈活方便,不需要系統安裝JDK,對于喜歡綠色的同學會比較傾向于該方式
本次演練示例以Jenkins服務器的運行目錄為“D:\CIServer”
1)解壓server-jre-7u45-windows-x64.tar.gz到當前目錄;
2)拷貝jenkins.war到當前目錄;
3)采用Windows批處理腳本的方式來快速運行Jenkins服務器(下面詳細解讀);
至此,“D:\CIServer”目錄下目前僅存在如下文件:
【關鍵解讀】
該方法的主要知識點在于如何編寫快速啟動Jenkins服務器的Windows批處理腳本,這里貼出主要實現代碼:
rem 設置Jenkins服務器運行目錄
set DIRNAME=.
if "%OS%" == "Windows_NT" set DIRNAME=%~dp0%
rem 設置JAVA虛擬機環境
if "%JAVA_HOME%" == "" set JAVA_HOME=%DIRNAME%\jdk1.7.0_45
set JAVA=%JAVA_HOME%\bin\java
set HOME=%DIRNAME%
set LOGDIR=log
set LOGFILE=%DIRNAME%\%LOGDIR%\jenkins.log
cd /d %HOME%
rem 第一次啟動創建Jenkins日志目錄
if not exist %LOGFILE% mkdir %LOGDIR%
rem 啟動Jenkins服務器并指定端口信息、運行時目錄和日志文件
set JENKINS_HOME=%HOME%/.jenkins
"%JAVA%" -D%JENKINS_HOME% -Xmx512m -jar jenkins.war --買粉絲Port=80 --logfile=%LOGFILE%
【效果展示】
1、Jenkins服務器運行效果,出現“Jenkins is fully up and running”表示Jenkins服務器啟動成功:
2、使用web瀏覽器進行登陸。
Jenkins 環境變量
BRANCH_NAME For a multibranch project, this will be set to the name of the branch being built, for example in case you wish to deploy to proction from master but not from feature branches; if 買粉絲rresponding to some kind of change request, the name is generally arbitrary (refer to CHANGE_ID and CHANGE_TARGET).
BRANCH_IS_PRIMARY For a multibranch project, if the SCM source reports that the branch being built is a primary branch, this will be set to "true"; else unset. Some SCM sources may report more than one branch as a primary branch while others may not supply this information.
CHANGE_ID For a multibranch project 買粉絲rrespo
很赞哦!(6353)
相关文章
- 01 浙江大學國際貿易專業研究生分數線(女生適合學習的專業有什么?)
- 01 浙江大華海外待遇(浙江大華研發部的軟件工程師(應屆本科生)待遇怎么樣)
- 03 湖南千采進出口貿易公司特有產品介紹(求 "收百世之闕文,采千載之遺韻。謝朝華於已披,啟夕秀於未振"譯文,感謝!)
- 03 湖南城旺物資貿易有限公司(消費參考丨“限塑令”下,一個可能存在的千億市場)
- 01 浙江德有貿易有限公司(貿易公司簡介范文)
- 01 浙江國心貿易有限公司(紹興亦心貿易有限公司怎么樣?)
- 03 湖南省農產品出口貿易結語(地理標志的調研)
- 01 浙江杭州網紅公寓(杭州麗晶國際酒店公寓在哪里呢?)
- 01 浙江宏厚貿易有限公司(帶開關的插座用在哪里)
- 03 演講比賽買粉絲買粉絲推文(李笑來寫作課:輸出倒逼輸入)
Instagram刷粉絲, Ins買粉絲自助下單平台, Ins買贊網站可微信支付寶付款的名片
职业:程序员,设计师
现居:黑龙江省牡丹江西安区
工作室:小组
Email:[email protected]
热门文章
站长推荐
01 浙江醫院買粉絲怎么看不了檢查報告(鉬靶怎么讀報告多久拿(乳腺檢查報告最全講解))
03 湖北省匯貿合進出口貿易有限公司(湖北鑫泰擔保有限公司怎么樣?)
01 浙江浦江常鴻貿易有限公司(浙江常貿易有限公司是真的嗎)
03 湖南海外旅游產品特點(中國海外旅游市場中國大陸出境旅游市場分析)
03 湖南能德貿易有限公司(500 萬元/集,騰訊 2 個億拿下陳道明、靳東主演新劇《無間》,唐德影視能否借此翻身?)
01 浙江大學國際貿易專業分數線是多少(2011年浙江大學的錄取分數線是多少)
01 浙江濟海貿易發展有限公司人力資源電話(云南濟海貿易有限公司怎么樣?)
01 浙江海外高層次人才創新園附近地鐵(300萬投資是買什么房子合適?)