wakaleo / jenkins-the-definitive-guide-book Goto Github PK
View Code? Open in Web Editor NEWHome Page: http://www.wakaleo.com/books/jenkins-the-definitive-guide
Home Page: http://www.wakaleo.com/books/jenkins-the-definitive-guide
On page 37 of chapter 2 the book says: "In figure 2-29, we have configured Jenkins to list any builds with less than 50% test coverage as "unstable" (indicated by a yellow ball), and notify the team accordingly".
In fact, figure 2-29 does not show the number "50" anywhere. Besides the yellow ball the numbers "75", "75", "80" and "95" are shown, but not "50". And the screenshot doesn't say anything about notifying the team.
This is confusing.
So what is this issue. Why is n't there anything mentioned about it in the book. I am using Max OSX exactly like the author. Can someone help? otherwise I have to say that I am totally disappointed buying this book. It gives you problems right from the start and things do not work properly with Git.
It seems there is a bug either in the book, the game-of-life project, or Jenkins 1.500. As it is hard to track where the bug is caused for a Jenkins beginner, I am posting it here so you can decide.
When enabling cobertura publishing as described on page 37 of chapter 2, using the recommended default path found in both the book's screenshot and the Jenkins GUI (**/target/site/cobertura/coverage.xml), the result is that the cobertura tests works fine but Jenkins does not find the coverage.xml file.
I checked the workspace and actually the file is not there, but Maven says cobertura actually did process files:
[INFO] --- cobertura-maven-plugin:2.5.2:cobertura (default-cli) @ gameoflife-web ---
[INFO] Cobertura 1.9.4.1 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
Cobertura: Loaded information on 2 classes.
Report time: 191ms
[INFO] Cobertura Report generation was successful.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] gameoflife ........................................ SUCCESS [10.518s]
[INFO] gameoflife-build .................................. SUCCESS [0.302s]
[INFO] gameoflife-core ................................... SUCCESS [1.909s]
[INFO] gameoflife-web .................................... SUCCESS [1.780s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15.726s
[INFO] Finished at: Mon Feb 04 17:46:31 CET 2013
[INFO] Final Memory: 16M/39M
[INFO] ------------------------------------------------------------------------
Veröffentliche Javadocs
Zeichne Testergebnisse auf.
[Cobertura] Publishing Cobertura coverage report...
[Cobertura] No coverage results were found using the pattern '**/target/site/cobertura/coverage.xml' relative to '/usr/share/tomcat6/.jenkins/workspace/gameoflife-default'. Did you enter a pattern relative to the correct directory? Did you generate the XML report(s) for Cobertura?
Build step 'Veröffentliche die Cobertura Testabdeckung' changed build result to FAILURE
Finished: FAILURE
There is an inconsistency in the content shown in figures 2-17 and 2-29. To make javadoc publication work, 2-17 must say "clean install" (as you told me). But figure 2-29 says "clean test" when adding the cobertura publishing.
This is confusion. It obviously must still say "clean install", or the book must explain why you changed it to "clean test".
Does that domain still exist?
If not, where are the sample projects?
There's a link that I think is incorrect in the preface under "9. Using Code Examples"
http://www.github.org/wakaleo/jenkins-the-definitive-guide
I think the correct link is:
https://github.com/wakaleo/jenkins-the-definitive-guide-book
Hello,
I managed to build the jenkins-the-definitive-guide.pdf
document using Jenkins.
Unfortunately the generated *.pdf does not contain images, which are instead rendered correctly in the HTML version.
Here are the steps I performed (Jenkins ver 1.609.3 running inside a Docker container using https://github.com/jenkinsci/docker)
Jenkins Dashboard: New Item
Then click "OK"
Configure project
*/master
**/target/*.jar,**/target/jenkins-the-definitive-guide.pdf
Jenkins Dashboard: Project "jenkins-the-definitive-guide" > Build Now
Excerpt from build console:
Started by user anonymous
Building in workspace /var/jenkins_home/jobs/jenkins-the-definitive-guide/workspace
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url https://github.com/wakaleo/jenkins-the-definitive-guide-book.git # timeout=10
Fetching upstream changes from https://github.com/wakaleo/jenkins-the-definitive-guide-book.git
> git --version # timeout=10
> git -c core.askpass=true fetch --tags --progress https://github.com/wakaleo/jenkins-the-definitive-guide-book.git +refs/heads/*:refs/remotes/origin/*
> git rev-parse refs/remotes/origin/master^{commit} # timeout=10
> git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision 884b48cc22593cd353f364961a4a972fc3647e6c (refs/remotes/origin/master)
> git config core.sparsecheckout # timeout=10
> git checkout -f 884b48cc22593cd353f364961a4a972fc3647e6c
> git rev-list 884b48cc22593cd353f364961a4a972fc3647e6c # timeout=10
[workspace] $ /var/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/Maven_3.3.3/bin/mvn package
[INFO] Scanning for projects...
...
Oct 12, 2015 9:56:22 PM org.apache.fop.events.LoggingEventListener processEvent
SEVERE: Image not available. URI: /var/jenkins_home/jobs/jenkins-the-definitive-guide/workspace/hudsonbook-pdf/target/docbook/figs/print/jtdg_0201.pdf. Reason: org.apache.xmlgraphics.image.loader.ImageException: The file format is not supported. No ImagePreloader found for /var/jenkins_home/jobs/jenkins-the-definitive-guide/workspace/hudsonbook-pdf/target/docbook/figs/print/jtdg_0201.pdf (See position 901:311)
Oct 12, 2015 9:56:22 PM org.apache.fop.events.LoggingEventListener processEvent
SEVERE: Image not available. URI: /var/jenkins_home/jobs/jenkins-the-definitive-guide/workspace/hudsonbook-pdf/target/docbook/figs/print/jtdg_0202.pdf. Reason: org.apache.xmlgraphics.image.loader.ImageException: The file format is not supported. No ImagePreloader found for /var/jenkins_home/jobs/jenkins-the-definitive-guide/workspace/hudsonbook-pdf/target/docbook/figs/print/jtdg_0202.pdf (See position 941:311)
Oct 12, 2015 9:56:22 PM org.apache.fop.events.LoggingEventListener processEvent
SEVERE: Image not available. URI: /var/jenkins_home/jobs/jenkins-the-definitive-guide/workspace/hudsonbook-pdf/target/docbook/figs/print/jtdg_0203.pdf. Reason: org.apache.xmlgraphics.image.loader.ImageException: The file format is not supported. No ImagePreloader found for /var/jenkins_home/jobs/jenkins-the-definitive-guide/workspace/hudsonbook-pdf/target/docbook/figs/print/jtdg_0203.pdf (See position 983:311)
...
[INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ hudsonbook-html ---
[INFO] Building jar: /var/jenkins_home/jobs/jenkins-the-definitive-guide/workspace/hudsonbook-html/target/hudsonbook-html-0.0.4-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Continuous Integration with Hudson ................. SUCCESS [ 0.009 s]
[INFO] Continuous Integration with Hudson (Content) ....... SUCCESS [ 12.934 s]
[INFO] Continuous Integration with Hudson (French Content) SUCCESS [ 11.151 s]
[INFO] Continuous Integration with Hudson (Content Chinese) SUCCESS [ 4.004 s]
[INFO] Continuous Integration with Hudson (PDF) ........... SUCCESS [01:57 min]
[INFO] Continuous Integration with Hudson (HTML) .......... SUCCESS [02:03 min]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 04:29 min
[INFO] Finished at: 2015-10-12T21:58:33+00:00
[INFO] Final Memory: 88M/1510M
[INFO] ------------------------------------------------------------------------
Archiving artifacts
Finished: SUCCESS
Any help is really appreciated
Thanks -- Gianpaolo
The book is wrong in Chapter 1. It says one shall configure Jenkins to provide Maven 2.1.1. Actually game-of-life cannot be build using Maven 2, as it complains that it needs at least Maven 3.0.0. This is confusing for people that have not much experience with Maven.
The book wants the user to configure javadoc:javadoc in chapter 1. While Jenkins successfully runs the "compile package" step...
[INFO] ------------------------------------------------------------------------
[INFO] Building gameoflife-core 0.9.67-SNAPSHOT
[INFO] ------------------------------------------------------------------------
...
[INFO] Building jar: /usr/share/tomcat6/.jenkins/workspace/gameoflife-default/gameoflife-core/target/gameoflife-core-0.9.67-SNAPSHOT.jar
...
[INFO] gameoflife ........................................ SUCCESS [3.888s]
[INFO] gameoflife-build .................................. SUCCESS [2.975s]
[INFO] gameoflife-core ................................... SUCCESS [7.369s]
[INFO] gameoflife-web .................................... SUCCESS [6.889s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
...it then fails with "javadoc:javadoc" with the following message:
[INFO] >>> maven-javadoc-plugin:2.9:javadoc (default-cli) @ gameoflife-web >>>
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] gameoflife ........................................ SUCCESS [3.104s]
[INFO] gameoflife-build .................................. SUCCESS [0.056s]
[INFO] gameoflife-core ................................... SUCCESS [1.044s]
[INFO] gameoflife-web .................................... FAILURE [0.786s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.824s
[INFO] Finished at: Sun Feb 03 10:03:39 CET 2013
[INFO] Final Memory: 9M/23M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project gameoflife-web: Could not resolve dependencies for project com.wakaleo.gameoflife:gameoflife-web:war:0.9.67-SNAPSHOT: Could not find artifact com.wakaleo.gameoflife:gameoflife-core:jar:0.9.67-SNAPSHOT -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :gameoflife-web
While I am not a complete Maven beginner, I am now stuck and cannot further follow the tutorial of chapter 1. Please provide instructions how to fix that.
Chapter 2 page 29 says "and dead cells appear as a minus character (-)", also there is a small screenshot showing lots of dashes. In fact, the source code on page 28 (and in github) is using dots, not dashes.
This is not critical, but should be fixed, as it might confuse readers.
I followed the steps described in chapter 1 and 2 to learn about test results. Once I push the "screwed" game of live on the server, git pulls the changes and then turns the ball from blue to red due to the failing tests, just as the book says.
But every other minute it adds one more build, which obviously fails still, as the fix is not pushed to github so far. In fact, meanwhile I have lots of red balls meanwhile due to that.
Is this intended behaviour of your tutorial / Jenkins? The books should tell something about that, since that lots of (useless since unchanged) broken builds scares beginnes (at least: me).
The build job should also generate epub format, which can be read on multiple screen sizes, as apposed to pdf.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.