<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                一、Jenkins介紹 ![](https://upload-images.jianshu.io/upload_images/5432753-66f40cb252c5b559.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 二、Jenkins的下載安裝 1、下載地址:[https://jenkins.io/download/](https://jenkins.io/download/)(下載速度極慢),下載Jenkins的war直接丟進tomcat的webapps目錄即可完成部署。 2、.將war包丟進服務器的tomcat/webapps目錄,或者執行nohup ? java? -jar? jenkins.war & 瀏覽器訪問:127.0.0.1:8080/jenkins 3、第一次安裝啟動? 需要解鎖。 ![](https://upload-images.jianshu.io/upload_images/5432753-721975ee8bdc4d6f.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) ![](https://upload-images.jianshu.io/upload_images/5432753-bb76940587b32f77.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 4、推薦插件安裝? 巨慢 ![](https://upload-images.jianshu.io/upload_images/5432753-835683b7ad2dcb88.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 5.創建用戶 ![](https://upload-images.jianshu.io/upload_images/5432753-e40d879a582e29d3.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 6、實例配置 ![](https://upload-images.jianshu.io/upload_images/5432753-beaf6a225e8de3b0.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 7、開始使用 ![](https://upload-images.jianshu.io/upload_images/5432753-e89d23ef0594386a.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 至此、Jenkins的下載安裝,完成,下面對Jenkins進行一系列的配置。 三、Jenkins配置 1、插件安裝 選擇插件管理=》可選插件搜索即可安裝插件 ①\*\*Maven Integration:\*\*新建job時有maven項目可以選擇; ②\*\*Deploy to container:\*\*將war包部署到tomcat所在的服務器上; ③\*\*Publish Over SSH:\*\*通過ssh推送文件,并可以執行shell命令; \*?2.Maven、Git、JDK配置\* 點擊:“系統管理”------>“全局工具配置” ![](https://upload-images.jianshu.io/upload_images/5432753-c7c231d2c4aa03c5.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) ![](https://upload-images.jianshu.io/upload_images/5432753-8d4276f886dce625.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 四、項目打包、發布、運行 1、新建任務 ![](https://upload-images.jianshu.io/upload_images/5432753-f69d3480677f896c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 2、配置任務 準備:1、遠程代碼倉庫 例如:[https://gitee.com/haijun0314/test.git](https://gitee.com/haijun0314/test.git) 2、遠程服務器執行腳本?? /usr/hjmall/apps/start.sh 腳本內容: ``` #!/bin/sh source ~/.bash_profile source /etc/profile export JAVA_HOME=/usr/java/jdk1.8.0_211 export JRE_HOME=$JAVA_HOME/jre export test=hj-test-1.0.jar export test_port=9000 case "$1" in start) ##test echo "--------test? starting--------------" nohup java -jar $test >/dev/null 2>&1 & test_pid=lsof -i:$test\_port|grep "LISTEN"|awk '{print $2}' until [ -n "$test_pid" ] do test_pid=lsof -i:$test\_port|grep "LISTEN"|awk '{print $2}' done echo "test pid is $test_pid" echo "--------test? started-------------" echo "===startAll success===" ;; stop) P_ID=ps -ef | grep -w $test | grep -v "grep" | awk '{print $2}' if [ "$P_ID" == "" ]; then echo "===test process not exists or stop success" else kill -9 $P_ID echo "test killed success" fi echo "===stopAll success===" ;; restart) $0 stop sleep 2 $0 start echo "===restartAll success===" ;; esac exit 0 ``` ![](https://upload-images.jianshu.io/upload_images/5432753-c61a5a72056ce7b4.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) ![](https://upload-images.jianshu.io/upload_images/5432753-2b124594b5cabc03.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) ![](https://upload-images.jianshu.io/upload_images/5432753-2a338bcd19222ef0.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看