random thoughts about computer tech, web technologies, javascript, nodejs, groovy, java, webdev, process automation, jenkins, eclipse, android and stuff that worked for me
Wednesday, September 14, 2011
What's so difficult, dude?
How many times have you asked yourself this question? In the last couple of days I asked this question numerous times.
I'm currently working on some enhancements for a gradle plugin to simplify Flex development. This feels so slow and error prone, even if the task is not really complicated and it's not overly complex. But I'm stuck somewhere in the tools.
First: I'm no expert for IntelliJ! Not yet!
Since I used to work the last 10 years with Eclipse and I was very fluent with keyboard shortcuts, everything feels so different and complicated.
What is the shortcut to open all Implementors of this Interface in IntelliJ? I don't know yet. But this gets better from day to day. I found this nifty functionality triggered by Cmd+Shift+A. This will bring up a Popup window where you can search for an action and it shows the keyboard shortcut.
Second: The other unknown to my equation is gradle itself
It's not always obvious how the things are related and wired together. Don't get me wrong: Gradle is a great tool, but developing a plugin for gradle that does a little bit more than 'Hello Build', and finding the right pieces to use, is not always that easy. What makes it more complicated than necessary, is the fact that my dev env setup is probably not optimal to make this tasks easy.
Having two different projects (gradle and GradleFx) and trying to debug something in the latest gradle snapshot, is not really working for me. For that reason I started to write some unit tests, in order to increase my confidence level about my written code. But this only worked to a certain extend. Now I'm stuck in writing some, IMHO, basic unit tests and I can't do the simplest things without digging too deep into the internals of gradle.
Third: Probably it always too late for writing code.
Let's see what tomorrow brings.
Monday, August 22, 2011
Notable changes in Jenkins OS X installer 1.427
What's new in this release?
There were a lot of changes in the recent versions, but I'm going to mention them here too (since they have never been mentioned anywhere else)- Installation as launch daemon instead of launch agent. If you don't know the difference, here is a good explanation.
- By default Jenkins will be installed as launch daemon, but the user can choose to not install it as launch daemon. In this case only the jenkins.war get's installed. Please start jenkins on your own.
- There is a preference file available to easily tweak the Jenkins program arguments like JENKINS_HOME, prefix, httpPort, etc.
- Documentation with instructions on how to change the arguments by modifying the preference file. The documentation will be installed and is available from /Library/Documentation/Jenkins or you can have sneak peak here.
What's next?
You have ideas for improvement?
Tuesday, July 26, 2011
List all jenkins jobs with a perforce scm configuration
Prerequisites
You need to have a java installation on your machine and java must be available on your PATH. groovy itself is not required to execute the scripts.
I assume that you have Jenkins running on your machine, so that I refer to localhost to access the Jenkins instance.
- If you already have a copy of jenkins-cli.jar on your machine, then skip to step 2. Otherwise open a browser and navigate to this URL http://localhost:8080/cli. Follow the instructions and download the jenkins-cli.jar to a known directory
- Open a terminal or command window and change into the directory where your jenkins-cli.jar is located
- Type java -jar jenkins-cli.jar -s http://localhost:8080 help. This will output a list of all available commands that this jenkins instance provides.
- Okay, now go ahead and save this snippet as listAllProjectsWithPerforceSCM.groovy to the same directory where you previously downloaded the jenkins-cli.jar
- Now enter the following on the command line:
java -jar jenkins-cli.jar -s http://localhost:8080 groovy listAllProjectsWithPerforceSCM.groovy
Job 'Test' uses the following perforce configuration
------------------------------------------------------------------------
P4Port: localhost:1666
P4Client: testbuilder
P4User: testbuilder
P4Password: 0f0kqlwaDeXrEj0PA0z/+IXZM1f8G8QsgBlUgnUv8bbR2bzXLfa3AlrK8xqw==
That's it. There is nothing complicated about this script, but it shows some of the capabilities to automate certain tasks. Take the script as example to play around with it and explore new ways to interact with jenkins.
Thanks for reading this post.
Thursday, July 14, 2011
ConfigSluper, ConfigObject and some stupid bugs
I wrote a script to generate an XML file, that served as input for an existing perl script.
To generate the XML file I used a groovy script which described the dependent components and the revision as well as the platform dependent location in the VCS (which is omitted here).
Processing this file is a pretty straightforward task.
The reason why I'm writing this up, is to tell that I spent a good amount of time, figuring out if there is a bug in the underlying ConfigObject. The ConfigObject is created by ConfigSluper().parse(...) and represents the data in-memory. Since ConfigObject inherits from LinkedHashMap, one can assume (and I really did!), that the semantics are like using a HashMap. But I was wrong! There happens some _magic_, when you do the following:
In my script there was a piece of code that relied on the sub-node count of the Component node. At a certain point, I was really convinced that I found a bug. But that would have been too obvious IMHO, that this kind of misbehavior had slipped through all testcases.
To make a long story short. I did some investigation and found the reason in the implementation of the ConfigObject
You can find the secret (if you will) in line 8. If you access a key in the ConfigObject that doesn't exist, then there will be an empty one created on the fly. This is not really bad, as long as you don't rely on the amount of nodes before and after querying the ConfigObject.
Friday, July 1, 2011
Saturday, May 7, 2011
Thursday, April 28, 2011
Monday, April 25, 2011
Monday, April 18, 2011
Jenkins OSX installer
What does the installer do?
- copies the jenkins.war to /Applications/Jenkins
- create a simple LaunchAgent property file (org.jenkins-ci.plist) and add Jenkins as a service
with a specific JENKINS_HOME location in /Users/Shared/ - start the new Jenkins service after the installation finished
You can find the installer project on github.
Friday, April 15, 2011
What I did last Thursday: Attending the "Continuous Integration Summit" at LinkedIn HQ
Last week I went to down Mountain View to attend the Continuous Integration Summit. The Event was hosted by LinkedIn in their HQ. I think there were about 100 attendees for this event and the demos from LinkedIn employees about their build system was very interesting. jfrog showed some interesting features for a tighter integration between jenkins und artifactory (for build artifact publishing). Kohsuke Kawaguchi (Jenkins) presented the current state of the Jenkins project and what has changed since the fork from hudson happened. Hans Dockter demoed gradle and how it helps to simplify the build process. All together an event that was worth the time spent. I'm looking forward to the next Summit and a much greater audience.
Monday, April 11, 2011
Bike tour through the hills of my new Hometown
Today I did a tour with my bike from Castro Valley to San Ramon. It was a good exercise and finally the hills have not been as steep as I assumed in the beginning. But it was still enough for someone from the flat land in northern Germany. ;-)
After 4,3 mi (7 km) I had some trouble with my back tire: due to little stones and glass on the shoulder, I got a flat tire that I had to replace instantly next to the street. After I changed the tube, my fingers were totally black and full of oil and dirt. Lesson learned: better keep your bike in clean condition, to avoid looking like having the hands of a mine worker. zatter
The google maps track can be found here.
This is shortly before entering San RamonFriday, April 1, 2011
Wednesday, March 30, 2011
What a beautiful day in San Francisco
Tuesday, March 29, 2011
Meetup with Jenkins Developers and Users Meetup Group
I'm going to a Meetup with Jenkins Developers and Users Meetup Group http://meetu.ps/P013
Monday, March 28, 2011
If you think you are tough, then give this guys a chance to rebuild your opinion
Two friends of mine quit their job, and do now what they are really passionate about: Road Cycling!
Beginning of January 2011 they started to cycle around the world, at least that was the plan the last time I talked to them (Esther?). They packed all the necessary stuff and flew from Scotland to New Zealand, where they started their tour. If you are interested in real live adventures and honest stories about beautiful places of this world, you should tune in and follow their blog. I'm really looking forward to meet them here in California.
Saturday, March 26, 2011
Thursday, March 24, 2011
Tuesday, March 22, 2011
Tuesday, March 15, 2011
Untitled
Monday, March 14, 2011
That could have been said by me
"Don’t do anything by half. If you love someone, love them with all your soul. When you go to work, work your ass off. When you hate someone, hate them until it hurts".
Henry Rollins