Automating NMQC builds

Dear @hinerm
I want to put my project NMQC as jenkins job, but all my efforts are wrong, can you put me in the right direction, maybe i need a username there

@BishopWolf - yes, you do need an account to create Jenkins jobs. We don’t have good user-rights management for Jenkins, so traditionally we have just created Jenkins jobs for developers as-needed.

@ctrueden and I talked about this briefly and would like to make it easier for external developers to have control over their builds. So today I started a guide on automated deployment with Travis.

I assume you want to deploy Maven artifacts as well, so I went ahead and created an account for you (see PM for credentials).

If you have any problems setting up Travis please discuss here. If you’d like to change anything about your Maven account you can let me know in PM.

@hinerm Can you please provide an example .travis.yml file, my own creation keeps giving me errors, your site may be down, i get a response “The remote host or network may be down. Please try the request again.”

Nevermind, I have build it succesfully in travis site, now i need to integrate the build into imagej maven, I cant manage myself to put a repository inside

Server problems. The wiki is back up now.

The idea is for Travis to deploy the artifact to If you update your .travis.yml as suggested in the guide it should to Maven.

I am currently stuck at point 2
From the command line in your repository, create an encrypted environment variable for your password:
$ travis encrypt MAVEN_PASS=my_maven_password --add env.matrix
I work on Windows and the travis executable is for linux using ruby, I will need only the encrypted string and there shall be a way to generate it using my public key, but i dont know which protocol travis use RSA, SHA, Other?

I have found it, AES-256 and this site will do the job

1 Like

Awesome :slight_smile:

For other options, there are windows instructions for the Travis CI and it looks like Bash on Win10 is here.

It doesnt worked that way, I will try to install ruby and then the travis command line. A small question: the public key is the whole thing or just the string

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.1:deploy (default-deploy) on project NMQC_: Failed to deploy artifacts: Could not transfer artifact sc.fiji:NMQC_:jar:0.1.0-20160413.152747-1 from/to imagej.snapshots (dav: Failed to transfer file: Return code is: 401 -> [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] The command "mvn -U -Pdeploy-to-imagej clean deploy --settings settings.xml" exited with 1. Done. Your build exited with 1.

It looks like your password is not correct - I assume it was not actually encrypted in a way that Travis can decrypt properly.

To encrypt your password, you need to:

  1. obtain the RSA public key created by Travis
  2. Use that public key to encrypt your Maven password, e.g. via a site like this or encryption tool
  3. Use this encrypted string in your .travis.yml, replacing this value

I will add this info to the wiki as well.

Edit: I think this is totally wrong, and that you need the private key to encrypt. I have no idea how to get the private key from Travis, so you need to be using the Travis command line tools.

If you can’t install bash and rubyinstaller isn’t working for you, Cygwin + apt-cyg might work.

I have the key

{“key”:"-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC4GIgqXdPOkehPwITfExrH+NrT\nq3uJlNS0ZWeEd/QCVLayVGTScAzYrJZcC3hw09rHe9fQv0VRtvfGN1O4Zh4Q1cTI\n1DBswD5F68SFxWN/DbPafCmu+wuCEr767iCqw8JwxynChyRYMOcdf22VQz8QUbfb\nCKwHayMOtCC8XiPLBQIDAQAB\n-----END PUBLIC KEY-----\n",“fingerprint”:“75:40:8d:42:77:e0:31:62:f2:93:47:16:51:23:31:ac”}

But I dont know if i must use the whole thing or just the long string inside, I used the last. Also I try to encrypt both

  • mypass
  • MAVEN_PASS=mypass

but both failed, thats why i asked you to provide a final .travis.yml example file in which i will know what to encrypt and where to put it

Ruby istaller server is down ATM, it says


Depending on your location, sometimes the downloads will not work. This is due RubyForge provided mirrors. Until we completely move our releases out of them. please add /noredirect at the end of the URL and try again.

Sorry the inconvenience.

Here is a .travis.yml that has had an encrypted password added to it. But that was done automatically via the command-line tools…

so no “” thing, lets give a try

Not a very helpful message :frowning2: I tried adding /noredirect but couldn’t get the downloads to work.

The rails installer is another possibility for getting ruby on Windows…

Anyway, thank you for being a Windows test case. If you’re able to get something working, let me know and I’ll add it to the docs to help others.

It would be good if in the travis site one could encrypt strings using some key, as in the site I mentioned, that way you doesnt need to install ruby+travis just to get a string you will use once in each project.

1 Like

FYI, since this is causing you so many problems for you on Windows I went ahead and made a Jenkins job for your project.

So, NMQC is in our maven repo.

If you add a Jenkins webhook to your repository then it will build automatically, and you can cut your own releases.

1 Like
choco install ruby

Chocolatey :trophy:

choco install ruby -y

Get-BinRoot is going to be deprecated by v1. Many packages no longer require it since the folders no longer have versions on them.
Using explicit proxy server ‘’.
Attempt to get headers for failed.
Exception calling “GetResponse” with “0” argument(s): “Se excedió el tiempo de espera de la operación”

it seems that server is really down

Makes sense (unfortunately).

I tried that link just now, and am now able to download that installer here. (I did not try it yesterday when you were having problems.) So it seems things are back up now! Either that, or you have an outgoing firewall configuration issue on your end.

hey @ctrueden, i have seen that my jenkins job in doesnt update to 0.2-snapshot, I have pushed a lot of changes since 0.1-snapshot. Is it there something I am missing??

Did you enable the Jenkins Git plugin on your repository?

For the Jenkins URL, just put