Posts

Showing posts with the label build

Authentication Error while pulling images via docker-maven-plugin

docker-maven-plugin is the great plugin provided by spotify to build docker image during maven build. There is very strange error or behaviour I have seen during the image creation. Plugin expects that image which Dockerfile is pulling needs to be passed with username and password, which should not an essential parameter as most of the images does not need any auth to be downloaded.  You may see this error [INFO] Building image your-application:0.0.3 Step 1 : FROM ubunt:latest [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] your-application..................................... FAILUER [ 3.619 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 39.938 s (Wall Clock) [INFO] Finished at: 2016-06-25T16:26:06+00:00 [INFO] Final Memory: 65M/1216M [INF...

The Rise of the Jenkins CI Butler - by Jonathan McAllister

Author of Mastering Jenkins [Packt Publishing] [ http://www.masteringjenkins.com ] Kohsuke Kowaguchi designed and developed the Hudson automation system from the ground up while he was working at Oracle in 2006.  Primitive inceptions of the Jenkins platform (then known as Hudson) simply aimed to support continuous integration practices and offer a viable replacement for CruiseControl, which was the popular CI solution at the time. The Hudson platform was initially very Java centric with tight coupling to Maven and Java development paradigms. Little did Kohsuke know that his internal Hudson tool would catapult in notoriety, change names (into Jenkins), spin off to become CloudBees and eventually become the most popular modern Continuous Integration and automation orchestration platform in use in modern history. The current Jenkins platform provides an easily consumable unified user interface coupled with a highly scalable distributed automation solution that can build, t...

Maven to gradle Migration

I am not a big fan of gradle but still this time i am taking this topic. Maven pom file is xml based build file and Gradle is groovy based system. There are many logic involve to make one to one comparison of generic features. I would like take some generic logic and try to detail out on converting those from maven pom file to gradle build file. Setup Modules define repositories upload of artifacts to maven repository Profiling jacoco test report use of release plugin

Too many open files

If system throws "too many open files" error or something like following during build/compilation [INFO] java.io.FileNotFoundException: (Too many open files) This means limit to open files for the user or system has been exceeded. You can check the limit by running following command ulimit -a Solution -> open file common-session sudo vi /etc/pam.d/common-session Add following entry in the file session required        pam_limits.so open file limits.conf sudo vi /etc/security/limits.conf make sure both soft and hard limits are set to larger number (as per your need) *                soft    nofile          500240 *                hard    nofile          500240 Logout and login and run command again ullimit -a You will see the new limit number.

Setup Build - SCM System from beginning

This topic is specially for users who are new to the Build, SCM and Release Management and need to understand how can they setup the infrastructure and what are their options. To Build the system to automate the build and deployment process there are few main areas which needs to be covered. Following are our prerequisite. - Source code   - Builds System -  Deployments - QA Automation To describe above here are main ingredients

Maven Tips to optimize build timings

Few Maven Tips and tricks to make Maven builds fast and faster and efficiently. This can help to reduce the build timings drastically and optimize your build timings Run compilation parallel mvn -T 2 clean compile #Above will trigger 2 threads mvn -T 1C clean install #Above will trigger 1 thread per CPU, if you have 2 CPU core then 2 threads will be spawned. #You can even give number in fraction (1.5, 2.5 etc).

Managing open source component

Building any software need lots of efforts including resource, time, money etc. It is really a great pleasure when it goes live or get released. In parallel, fear may come with the doubt of having bugs (even though testing is done). You can fix bugs related to software feature or functionality but the once which can hit badly are Security vulnerability  Licensing risk of open source component. Outdated open source component. Above checks needs to be done during the development phase and ruled out any discrepancy related to security or legal. WhiteSource provides one fine platform to solve such issues without putting much effort by developers, So that they can concentrate on core development instead of spending time on finding these issues which can be easily handled by WhiteSource . WhiteSource is an open source management solution which does Open source licensing and compliance management Open Source security vulnerabilities alerts and management Executive d...

Maven Findbugs error

Maven Findbugs error When you update your java version from 1.7 to 1.8 and if you are using findbugs in your pom You may see following error while running the build. [ERROR] Failed to execute goal org.codehaus.mojo:findbugs-maven-plugin:2.5.3:findbugs (findbugs) on project : Execution findbugs of goal org.codehaus.mojo:findbugs-maven-plugin::findbugs failed: Java returned: 1 -> [Help 1] This is due to the mismatch of recent upgrade to java (1.8) and findbugs version. You will have to upgrade (start using) FindBugs verion 3.0.0 and above. Any findbugs version below 3.0.0 will not work with java 1.8.

Maven compiler error for invalid target java

Maven compiler error for invalid target java Some time you may see following error during maven compilation  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:compile (default-compile) on project metamarket: Fatal error compiling: invalid target release: 1.8 or 1.7 or 1.6 -> [Help 1] This error is because, you system is set to use different version as default and source and target configuration is also set accordingly.

Jenkins Plugin Tips and Tricks - Part 1

Image
In this section I will talk about Tips, Tricks, Troubleshooting of jenkins plugins. Role strategy Plugin This plugin adds a new role-based strategy to ease and fasten users management. You can even define pattern for the job and assign access for those jobs to users. Tip - > While specifying the pattern add the "." before "*", Otherwise pattern will not work. Ex-               test* will not match the job name which starts with test , You will need to add "." like test.* to match the job name starts with test.

Build failing on sonar

With Maven 3+ we may face some issues while running sonar code coverage for the project in surefire plugin. Looks line may be bug in maven or surefire, can't say right now. Here is one of the weird error I have observed Exception in thread "main" java.lang.NoClassDefFoundError: ${surefire/jvm/args} Caused by: java.lang.ClassNotFoundException: ${surefire.jvm.args} at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at