Jenkinsing ABTokenTools

I set up a Jenkins server (on Windows) with MSBuild and a Git server (on FreeBSD) to compile ABTokenTools and deploy them to my web site automatically.

It turned out the only difficult part was the deployment via ssh.

A few hints:

  1. The Jenkins account (mine is DOMAIN\Jenkins$) must have full control in the directory where Jenkins is installed ("C:\Program Files\Jenkins” in my case).
  2. The Jenkins account also needs full control of its profile directory (likely “C:\Users\Jenkins$” or something similar). This is probably the case already.
  3. The Jenkins account furthermore needs read and write access to other directories depending on what Jenkins jobs are supposed to be doing.
  4. If you are using a managed service account to run Jenkins, as you probably should, use psexec -u domain\jenkins$ -p ~ cmd from a ssh session to log into the Jenkins service account, assuming it is called jenkins$. (In an RDP session you should probably add -i to the psexec parameters. If you are running Jenkins as LocalSystem use -s.)
  5. Make use of the -v parameter of scp. It will tell you where scp is stuck.
  6. Make sure the known_hosts file is formatted correctly. You cannot have any questions unanswered when Jenkins runs scp.
  7. Use the -i parameter of scp to use a specific id_rsa secret key file.
  8. Use a batch file command powershell Compress-Archive -DestinationPath myzipfile -Path myfolderwithmyartefacts to zip the artefacts for deployment.

See the original article on ABTokenTools which I will hopefully update at some point.

Downloads (perhaps occassionally updated):

 © Andrew Brehm 2016