您现在的位置是:Instagram刷粉絲, Ins買粉絲自助下單平台, Ins買贊網站可微信支付寶付款 >
02 Jenkins環境搭建(Windows jenkins環境搭建)
Instagram刷粉絲, Ins買粉絲自助下單平台, Ins買贊網站可微信支付寶付款2024-07-15 04:56:29【】0人已围观
简介接進行構建,代碼自動下載到/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
很赞哦!(89289)
相关文章
- 02 迎新年買粉絲買粉絲文章怎么寫(如何給自己定計劃?)
- 02 進出口貿易公司申請程序(開一家進出口貿易公司需要那些手續?)
- list of channels on youtube tv 2022(播放youtubetv前面幾秒花屏)
- messenger facebook install(messenger怎么登錄facebook) - 副本
- macbook air for youtube videos(為什么我用iPhone播放Youtube視頻,然后用airplay連接到小米盒子的時候;YouTu)
- 02 近代中國海外移民的特點(近代西方早期殖民擴張的特點)
- is tiktok a media(Best TikTok Analytics Tool —— GugeeData)
- modded youtube for pcl2下載(pcl2為什么下不了客戶端)
- 02 進出口貿易代理公司哪家好(中國進出口貿易公司排名)
- iphone手機怎么下載油管視頻(蘋果手機上油管最簡單的辦法)
Instagram刷粉絲, Ins買粉絲自助下單平台, Ins買贊網站可微信支付寶付款的名片
职业:程序员,设计师
现居:吉林通化梅河口市
工作室:小组
Email:[email protected]
热门文章
站长推荐
log in youtube tv account(smartyoutubetv目前還能用嗎)
02 過年適合賣的年貨有哪些(過年賣什么年貨賺錢過年賣哪些年貨能賺錢)
02 進出口貿易公司財務(外貿會計做賬流程,都要交什么稅?)
iphone怎么進youtube(蘋果手機上油管最簡單的辦法)
modded youtube for pcl2聯機(我的世界pcl2啟動器怎么聯機)
log in youtube tv account(smartyoutubetv目前還能用嗎)
02 進出口貿易公司公章圖片(辦理進出口權的流程)
02 運輸條款和貿易條款術語是一樣的嗎(運輸條款和訂艙條款是一樣的意思嗎)