1. Finished: FAILURE
一般在Windows下安裝Jenkins,默認workspace目錄,在c盤xxx下,之間是有空格的,后期用cmd命令行執行命令會報錯
這時候就需要將目錄的路徑移動一下
如何?
設置電腦的環境變量,JEKNINS_HOME = 比如我為D盤下的新建文件夾,命令Jenkinds
然后到安裝目錄下查找Jenkins.xml文件,將其中的JENKINS_HOME由BASE改為%JENKINS_HOME%
將原先Base下的目錄全部copy到D盤新建目錄下
之后重新打開即可
2.Jenkins 的根 URL 為空,但對於 Jenkins 的很多特色是必需的,例如:郵件通知, PR 狀態更新,以及像BUILD_URL一樣的環境變量。
請在 Jenkins 配置 提供一個准確的值。
3. 手殘誤刪了Jenkins運行的java進程,結果。。。。
用管理員身份啟動cmd
然后進入jenkins目錄。運行 net start jenkins
否則會報系統錯誤5
延伸: net stop jenkins
4. 如何安裝maven插件
進入系統管理 ---- 插件管理 ---- 用頁面自帶的搜索安裝Maven Integration
5. 本地全局工具的配置
使用本地jdk

使用本地maven

只要到本地maven的解壓目錄即可,我這邊新建了一個目錄maven
使用本地git




6. 不顯示中文
這邊分兩種,一種是Jenkins就沒有中文插件,第二種是別人的瀏覽器打開是中文,而你的是英語
第一種的解決辦法,就是下載中文插件,我這邊在安裝的時候自行下載的一個local啥的
第二種,和自己的瀏覽器設置有關,比如我之前的瀏覽器,優先的語言是英文,修改優先的語言為中文即可
7. 更改對應的端口
網上很多教程的更改方式是執行的時候用java -jar jenkins.war --httpPort=8081
windows用msi安裝的,啟動的時候並沒有用jave -jar,就需要去Jenkins安裝目錄下找到xml文件,然后更改其中的port,在重啟一下
<!--
Windows service definition for Jenkins.
To uninstall, run "jenkins.exe stop" to stop the service, then "jenkins.exe uninstall" to uninstall the service.
Both commands don't produce any output if the execution is successful.
-->
<service>
<id>Jenkins</id>
<name>Jenkins</name>
<description>This service runs Jenkins automation server.</description>
<env name="JENKINS_HOME" value="%BASE%"/>
<!--
if you'd like to run Jenkins with a specific version of Java, specify a full path to java.exe.
The following value assumes that you have java in your PATH.
-->
<executable>%BASE%\jre\bin\java</executable>
<arguments>-Xrs -Xmx256m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar "%BASE%\jenkins.war" --httpPort=5118 --webroot="%BASE%\war"</arguments>
<!--
interactive flag causes the empty black Java window to be displayed.
I'm still debugging this.
<interactive />
-->
<logmode>rotate</logmode>
<onfailure action="restart" />
<!--
In the case WinSW gets terminated and leaks the process, we want to abort
these runaway JAR processes on startup to prevent corruption of JENKINS_HOME.
So this extension is enabled by default.
-->
<extensions>
<!-- This is a sample configuration for the RunawayProcessKiller extension. -->
<extension enabled="true"
className="winsw.Plugins.RunawayProcessKiller.RunawayProcessKillerExtension"
id="killOnStartup">
<pidfile>%BASE%\jenkins.pid</pidfile>
<stopTimeout>10000</stopTimeout>
<stopParentFirst>false</stopParentFirst>
</extension>
</extensions>
<!-- See the referenced examples for more options -->
</service>
8. 如果查看密鑰比如地址/var/lib/jenkins/secrets/initialAdminPassword,自己沒有權限
那也沒有關系,可以在log日志中看到生成的密鑰,注意是要找到安裝的日期的log喲

