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/にあるファイルを表示します

root@ubuntu://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/
root@ubuntu://root/.jenkins/workspace/email-service1/target#

jを実行する

root@ubuntu://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.springframework.context.annotation.AnnotationConfigApplicationContext@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.springframework.context.annotation.AnnotationConfigApplicationContext@799d4f69: startup date [Fri Jul 27 20:43:35 CST 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@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

 

おすすめ

転載: blog.csdn.net/name_is_wl/article/details/81253927