1. 程式人生 > >jenkins 打包 git 倉庫原始碼

jenkins 打包 git 倉庫原始碼

新建一個任務

配置 

店家立即構建 

Started by user wuli
Building in workspace /root/.jenkins/workspace/email-service1
 > /usr/local/bin/git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > /usr/local/bin/git config remote.origin.url [email protected]:/home/git/repo/service/email-service.git # timeout=10
Fetching upstream changes from 
[email protected]
:/home/git/repo/service/email-service.git > /usr/local/bin/git --version # timeout=10 > /usr/local/bin/git fetch --tags --progress [email protected]:/home/git/repo/service/email-service.git +refs/heads/*:refs/remotes/origin/* > /usr/local/bin/git rev-parse refs/remotes/origin/master^{commit} # timeout=10 > /usr/local/bin/git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10 Checking out Revision 9fa8e3782e151ffd7ac2e7601e74ea7a40253482 (refs/remotes/origin/master) > /usr/local/bin/git config core.sparsecheckout # timeout=10 > /usr/local/bin/git checkout -f 9fa8e3782e151ffd7ac2e7601e74ea7a40253482 Commit message: "ignore Test" > /usr/local/bin/git rev-list --no-walk 9fa8e3782e151ffd7ac2e7601e74ea7a40253482 # timeout=10 [email-service1] $ /usr/maven/apache-maven-3.5.4/bin/mvn -s /usr/maven/apache-maven-3.5.4/conf/settings.xml -gs /usr/maven/apache-maven-3.5.4/conf/settings.xml package [INFO] Scanning for projects... [INFO] [INFO] --------------< com.wl.microservice.email:email-service >--------------- [INFO] Building email-service 1.0-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ email-service --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 5 resources [INFO] Copying 8 resources [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ email-service --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 8 source files to /root/.jenkins/workspace/email-service1/target/classes [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ email-service --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /root/.jenkins/workspace/email-service1/src/test/resources [INFO] [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ email-service --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 1 source file to /root/.jenkins/workspace/email-service1/target/test-classes [INFO] [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ email-service --- [INFO] Surefire report directory: /root/.jenkins/workspace/email-service1/target/surefire-reports ------------------------------------------------------- T E S T S ------------------------------------------------------- Running com.wl.microservice.email.TestSendEmail Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.035 sec Results : Tests run: 1, Failures: 0, Errors: 0, Skipped: 1 [INFO] [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ email-service --- [INFO] Building jar: /root/.jenkins/workspace/email-service1/target/email-service-1.0-SNAPSHOT.jar [INFO] [INFO] --- spring-boot-maven-plugin:1.5.7.RELEASE:repackage (default) @ email-service --- [INFO] Layout: JAR [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 10.999 s [INFO] Finished at: 2018-07-27T20:38:33+08:00 [INFO] ------------------------------------------------------------------------ Sending e-mails to: ***@qq.com Finished: SUCCESS

 構建成功  

檢視 /root/.jenkins/workspace/email-service1/target/中的檔案

[email protected]://root/.jenkins/workspace/email-service1/target# ll
total 47348
drwxr-xr-x 9 root root     4096 Jul 27 20:38 ./
drwxr-xr-x 5 root root     4096 Jul 27 20:38 ../
drwxr-xr-x 5 root root     4096 Jul 27 20:38 classes/
-rw-r--r-- 1 root root 48417253 Jul 27 20:38 email-service-1.0-SNAPSHOT.jar
-rw-r--r-- 1 root root    21568 Jul 27 20:38 email-service-1.0-SNAPSHOT.jar.original
drwxr-xr-x 3 root root     4096 Jul 27 20:38 generated-sources/
drwxr-xr-x 3 root root     4096 Jul 27 20:38 generated-test-sources/
drwxr-xr-x 2 root root     4096 Jul 27 20:38 maven-archiver/
drwxr-xr-x 3 root root     4096 Jul 27 20:38 maven-status/
drwxr-xr-x 2 root root     4096 Jul 27 20:38 surefire-reports/
drwxr-xr-x 3 root root     4096 Jul 27 20:38 test-classes/
[email protected]
://root/.jenkins/workspace/email-service1/target#

執行 j

[email protected]://root/.jenkins/workspace/email-service1/target# java -jar email-service-1.0-SNAPSHOT.jar
2018-07-27 20:43:32.079  INFO 3273 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.spring[email protected]f2a0b8e: startup date [Fri Jul 27 20:43:32 CST 2018]; root of context hierarchy
2018-07-27 20:43:33.327  INFO 3273 --- [           main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2018-07-27 20:43:33.516  INFO 3273 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'configurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$3895ac41] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

2018-07-27 20:43:34,788 INFO (ConfigServicePropertySourceLocator.java:80)- Fetching config from server at: http://localhost:8888
2018-07-27 20:43:35,069 WARN (ConfigServicePropertySourceLocator.java:134)- Could not locate PropertySource: 403 Forbidden
2018-07-27 20:43:35,075 INFO (SpringApplication.java:593)- No active profile set, falling back to default profiles: default
2018-07-27 20:43:35,142 INFO (AbstractApplicationContext.java:583)- Refreshing org.spring[email protected]799d4f69: startup date [Fri Jul 27 20:43:35 CST 2018]; parent: org.spring[email protected]f2a0b8e
2018-07-27 20:43:36,850 INFO (GenericScope.java:263)- BeanFactory id=b48c3e65-3084-31c7-8a8b-745bc3e7dc0a
2018-07-27 20:43:36,914 INFO (AutowiredAnnotationBeanPostProcessor.java:155)- JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2018-07-27 20:43:37,146 INFO (PostProcessorRegistrationDelegate.java:325)- Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$3895ac41] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
=======================================================
=======================================================
2018-07-27 20:43:39,094 INFO (MBeanExporter.java:431)- Registering beans for JMX exposure on startup
2018-07-27 20:43:39,114 INFO (MBeanExporter.java:916)- Bean with name 'configurationPropertiesRebinder' has been autodetected for JMX exposure
2018-07-27 20:43:39,116 INFO (MBeanExporter.java:916)- Bean with name 'refreshScope' has been autodetected for JMX exposure
2018-07-27 20:43:39,118 INFO (MBeanExporter.java:916)- Bean with name 'environmentManager' has been autodetected for JMX exposure
2018-07-27 20:43:39,136 INFO (MBeanExporter.java:678)- Located managed bean 'environmentManager': registering with JMX server as MBean [org.springframework.cloud.context.environment:name=environmentManager,type=EnvironmentManager]
2018-07-27 20:43:39,189 INFO (MBeanExporter.java:678)- Located managed bean 'refreshScope': registering with JMX server as MBean [org.springframework.cloud.context.scope.refresh:name=refreshScope,type=RefreshScope]
2018-07-27 20:43:39,238 INFO (MBeanExporter.java:678)- Located managed bean 'configurationPropertiesRebinder': registering with JMX server as MBean [org.springframework.cloud.context.properties:name=configurationPropertiesRebinder,context=799d4f69,type=ConfigurationPropertiesRebinder]
2018-07-27 20:43:39,460 INFO (StartupInfoLogger.java:57)- Started EmailApplication in 10.941 seconds (JVM running for 12.061)
2018-07-27 20:43:39,467 INFO (EmailApplication.java:31)- =================>>SpringBoot Success

相關推薦

jenkins 打包 git 倉庫原始碼

新建一個任務 配置  店家立即構建  Started by user wuli Building in workspace /root/.jenkins/workspace/email-service1 > /usr/local/bin/

jenkins連線git倉庫認證

jenkins credentials jenkins使用2種認證方式在伺服器git倉庫pull程式碼: 第一種ssh方式,通過ssh的金鑰或者是遠端賬號密碼進行認證。 登陸 jenkins 伺服器,切換到 jenkins 使用者,生成 ssh key,然後把 公鑰新增到 g

DEVOPS05 - Git倉庫Jenkins搭建、應用Jenkins、管理應用伺服器

一、Jenkins基礎 1.1 Jenkins簡介 1.1.1 什麼是Jenkins Jenkins是一款非常流行的CI(持續整合)軟體,用於構建和測試各種專案。 1.1.2 Jenkins特點 可以選擇安裝多種外掛,支援各種SCM(軟體配置管理)工

Jenkins使用Git Parameter外掛打包

一、 下載Git Parameter外掛:     二、 專案配置:     Shell指令碼: #!/bin/bash -lecho $deploy_envcase $deploy_env in deploy) echo "d

Jenkins 動態引數 - 獲取git倉庫分支列表

Jenkins 動態引數 - 獲取git倉庫分支列表 Dynamic Choice Parameter 'git ls-remote --refs [email protected]:AndroidGroup/resp.git' .execute().te

Jenkins+Gradle+Git+Centos 實現android持續整合、打包(超詳細)

這回分享下使用jenkins+gradle給android打包,伺服器環境是centos7.1 首先,對於新伺服器,你可能需要依次安裝jdk 、android sdk 、gradle、jenkins 一、安裝jdk 1、從官方網站下載最新jdk  http://w

Jenkins+Gradle+Git實現安卓自動打包

公司長時間存在開發為測試手動打包的情況,不僅影響平常開發的效率,也給我帶來了很多不必要的痛苦和麻煩,然後就在專案閒餘時間做了一個以jenkins為基礎+gradle+git的自動化打包的平臺。先看下我的GUI介面 配置完環境之後一建化構建: 之後就可

jenkins設定git原始碼管理

1.    首先在GitHub或者gitlab開通賬號test,並且建立一個新的專案。以後所有的專案都要加入到test賬號。 2.在gitlab中右上角選擇profile settings 為自己賬號test建立一個ssh key。這個key是Jenkins伺服器的roo

jenkins下使用git獲取原始碼的配置方法

enkins獲取git上的原始碼會遇到三種情況,我們在這裡會分別介紹一下: 一, jenkins獲取git上public(公有)的專案 這是git上一個public的工程,名字為newtest. 這是在jenkins上對git的配置,需要配置專案的url和憑

Jenkins打包安卓時提示沒同意constraintLayout的license的解決方法

失敗 studio 使用 you 安裝目錄 目錄 nbsp cnblogs bin文件 使用Jenkins打包安卓項目時,報錯並失敗,錯誤信息: You have not accepted the license agreements of the following

Git倉庫

這樣的 保存 -s git 作者 發布 sha-1 變化 通過 內容還未完整,往後學習過程繼續添加... 一.參考他人文章 http://www.cnblogs.com/Josiah-Lin/p/6847973.html (Git詳細教程---多人協作開發) 工作區暫

02_創建Git倉庫,克隆倉庫git add,git commit,git push,git pull,同行沖突,不同行沖突的結局方案,git mergetool的使用

round rom weight art sdn automatic remote then config 1 創建Git資源庫,殘酷文件夾信息 創建git資源庫的命令: git init –bare 倉庫名稱 (當中-bare表示的意思是空的庫的意思)

Jenkins 本地Maven倉庫隔離策略

color 一個 保持 覆蓋 version repo size install 相互 一、概述   如果只使用一個Maven倉庫,很容易會造成擁有相同的GroupID/ArtifactID/Version的JOB,在install時會在本地Maven倉庫相互覆蓋,所以我們

git fork代碼並修改胡提交到自己的git倉庫

添加 detail 成功 開發 嘗試 fetch .com mes -m   最近在參加阿裏天池大數據中間件比賽(毫無頭緒,打醬油中).看參賽要求,需要將官網的git工程clone下來,在此基礎上做修改後提交到自己的倉庫中. 由於以前並沒有使用過git,所以差了比較多的資料

創建局域網內遠程git倉庫,並將本地倉庫push推到遠程倉庫

目錄 html fatal targe images rem url already tle 轉自原文 創建局域網內遠程git倉庫,並將本地倉庫push推到遠程倉庫中 1. 先遠程登錄局域網內服務器 2. 在服務器裏 切換到某個文件夾下, 然後新建一個

把本地git倉庫中的項目引入到碼雲上

blog 無需 idt url eight git倉庫 set 連接 .cn 一、安裝git軟件和TortoiseGit客戶端(git需配置環境變量,但安裝時已經配置好,無需考慮) 二、生成公鑰和私鑰(建立與碼雲的連接) 三、在碼雲上新建項目(建議在組

CentOS7——gitlab本地git倉庫搭建 以及web hook配置

ron pda tran 訪問 visit epo 目前 down style 整個搭建用的都是各種默認設置,所以沒有用到高深的的東西,比較簡單,比較傻瓜式,這篇也僅僅是一個入門。 另外本文具有時效性,瀏覽本文請註意發表時間,為防止過時產生誤導,本文盡量把 “如何得知應該這

gitlab+jenkins+maven+docker持續集成(六)——.Jenkins獲取git tags代碼進行持續集成

gitlab+jenkins+maven+docker持續集成(六)——.jenkins獲取git tags代碼進行持續集成GitFlow的工作流如上圖所示,在開發工作中,不同的代碼分支對應著項目或產品的不同形態,圍繞特定形態的人力投入也不相同。隨著時間的推進,我們在 開發分支 中合並產品的功能實現,產品的功

如何創建一個 Git 倉庫

git倉庫你可以使用一個已存在的目錄作為Git倉庫git initGit 使用 git init 命令來初始化一個 Git 倉庫,Git 的很多命令都需要在 Git 的倉庫中運行,所以 git init 是使用 Git 的第一個命令。在執行完成 git init 命令後,Git 倉庫會生成一個 .git 目錄

Git倉庫創建和文件提交

you glob 一個 oba sgi commit github 分布 3-9 參考質料:廖雪峰的個人網站 Git 什麽是Git:一個分布式版本管理系統; 作用:管理你的歷史文件,文件修改歷史,團隊協作。 Windows下安裝Git: 到鏈接下載安裝包,國內鏡像 雲盤