Wednesday, October 2, 2013

java.io.IOException: Cannot run program "cmd"

This error is telling you that the "Execute shell" and "Execute Windows batch command" build steps in Jenkins are not the same thing. You cannot run a "Execute Windows batch command" step at a Macintosh.

"Wipe Out Workspace" link in Jenkins.

The node.js error of... Error: Cannot find module 'graceful-fs' ...of which this suggests... "The same also happens on Windows if you install in a custom directory. You have to uninstall and install again under default path." ...may be bested in Jenkins-deploys-to-Windows with ease. At these links at the upper left in Jenkins:

  • Back to Dashboard
  • Status
  • Changes
  • Workspace
  • Build Now
  • Delete Project
  • Configure
  • Set Next Build Number

...the "Workspace" link expands to offer a "Wipe Out Workspace" link which should be your salvation. The node error surfaced for me when I renamed a build. To fix, I:

  1. first went back to the old name, where the build worked anew
  2. clicked "Wipe Out Workspace"
  3. renamed the build back to the name I wanted
  4. clicked "Wipe Out Workspace"

I'm not sure if the first two steps above were unneeded or not. This is just how I approached this problem. graceful-fs is no longer blocking me at any rate.

Tuesday, October 1, 2013

Add label expressions in Jenkins to restrain which servers a build may run upon.

Where you spec the specifications for a build in Jenkins there will be a place to add Label Expressions where you may add a series of string values like so:

nodejs && grunt

 
 

At the home page of Jenkins you should see a list of servers at the lower left. If you click on one and then click "Configure" at the server's summary you will get another configuration screen. Herein there will be a fill-in-the-blank field for "Labels" and here too you may add string values. This time you will just separate the strings with spaces however. Match values at a build configuration's "Label Expressions" up to values here to restrain the possible servers a build may be built upon. Jenkins may randomly run a build on any server in the list without you restraining its choices in this way.

Create web hooks in FogBugz Kiln.

  1. Go to the Settings for a repository.
  2. Click on the "Add, remove, or learn more about web hooks" link. (You need to be a site admin to see this link.)
  3. At the bottom of the list of web hooks which appears click upon the "Create New Web Hook" link.
  4. The "Custom Hook" option seems to merely be made of just a name and a url. Well, you may also check checkboxes for including specific repositories.
  5. This is a way to trigger a Fogbugz plugin to kick off a Jenkins build.

%40 represents an at symbol at the url line!

%20 is a space obviously. A cheat sheet is given here. %23 is a pound sign, %24 is a dollar sign, and %25 is a percent sign.

Monday, September 30, 2013

Call a GRUNT task from the command line.

cd whatever
npm install
grunt foo

 
 

...run from the command line (at a Windows command prompt) would fire off the foo task in this Gruntfile.js file which would in turn fire off the bar, baz, and qux tasks:

module.exports = function(grunt) {
   grunt.initConfig({
      pkg: '<json:package.json>',
      sweet: {
         //whatever
      },
      sour: {
         //whatever
      },
      salty: {
         //whatever
      },
      clean: ["Release"]
   });
   grunt.registerTask('bar', 'sweet');
   grunt.registerTask('baz', 'sour');
   grunt.registerTask('qux', 'salty');
   grunt.registerTask('foo', ['bar', 'baz', 'qux']);
};

 
 

Add user permissions to a Mercurial branch in Fogbugz Kiln.

...at the "Settings" as suggested here.