Jekins windows部署

來源:互聯網
上載者:User

標籤:new   JD   alt   global   item   localhost   CM   rsa   idt   

  

1.安裝jenkins

 進入https://jenkins.io/download/,下載windows安裝包,解壓後運行jenkins.msi進行安裝。

2. 配置jenkins

 (1)開啟http://localhost:8080, 第一次開啟需要解鎖jenkins,根據提示填入密碼即可。

  

 (2)安裝外掛程式:選擇推薦的外掛程式進行安裝Install suggested plugins(包括ant,pipline等外掛程式)

 (3)設定使用者名稱密碼,至此jenkins基本配置完成, 可進入Jenkins管理頁面。

  

3. 配置git

(1)安裝git用戶端,產生git ssh key

 :https://git-scm.com/download/win, 安裝成功後右擊案頭可見Git Bash here,點擊並執行以下命令

cd ~/.ssh       -- 如果檔案不存在則mkdir ~/.sshgit config --global user.email "[email protected]"ssh-keygen -t rsa -C "[email protected]"

 按三次斷行符號,.ssh檔案夾便產生id_rsa和id_rsa.pub兩個檔案。id_rsa中的內容便是私密金鑰,id_rsa.pub中的內容便是公開金鑰。

(2) 在jenkins中配置 git 路徑

在jenkins管理頁面進入 Manage Jenkins  -〉Global Tool Configuration,配置Git和JDK路徑

 (3) 在github上填入公開金鑰:  https://github.com/settings/keys 在SSH keys填入id_rsa.pub的內容

3. 建立jenkins項目

 在jenkins上new item, 然後在項目的configure中配上github的地址,並使用密鑰建立對應的使用者

   

 在jenkins 上點擊buildnow即可

 

Jekins windows部署

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.