[mapserver-dev] Automated publication of MapServer code coverage

Even Rouault even.rouault at mines-paris.org
Wed Jul 10 07:37:24 PDT 2013

Le mardi 09 juillet 2013 00:08:51, Even Rouault a écrit :
> Le lundi 08 juillet 2013 20:08:18, Jeff McKenna a écrit :
> > Let me know if you need help with the .org part....to be honest I'm not
> > fully understanding how we would do all this yet...but it could be
> > linked somehow from http://www.mapserver.org/development/

ok, some update.

I've changed the script to upload the result in a github repository : 


The HTML pages can be seen at :


Compared to the FTP repository, the advantage is that you gain revision on the 
coverage itself (not sure that it will be of much use, but who knows)...

The step of that update is in line with what I described previously :

1) generate a specific ssh key :
ssk-keygen -t rsa -f ~/.ssh/id_rsa-msautotest-coverage-results \
-C https://github.com/rouault/msautotest-coverage-results
2) create the github repository
3) attach a *deploy key* to it : paste the content of the public key generated 
(~/.ssh/id_rsa-msautotest-coverage-results.pub) in the "settings" page of the 
repository (not the account)
4) base64-encode the private key :
base64 ~/.ssh/id_rsa-msautotest-coverage-results ~/.ssh/id_rsa-msautotest-
5) create secured environmenet variables (one per line in id_rsa-msautotest-
coverage-results_base64) with the following python script :

import os
f = open('/home/even/.ssh/id_rsa-msautotest-coverage-results_base64')
i = 0
for l in f.readlines():
    l = l.strip()
    # indicate with -r the Travis account that will run
    os.system('sh -c "travis encrypt -r rouault/mapserver id_rsa_%02d=%s > 
out.txt 2>/dev/null"' % (i, l))
    f2 = open('out.txt')
    secured = f2.read().strip()
    print('     - secure: %s' % secured)
    i = i + 1

6) copy & paste the output of the script in .travis.yml

Here it is. The 
script will then reconstruct the private ssh key from the secured 
environmenent variables and then do a git push in the msautotest-coverage-
results repository with the update of the coverage HTML pages. (the commit 
message will link to the mapserver commit that triggered the build)

I believe that such a setup is quite secure. If the ssh key got compromised, 
the impact would be limited to commits in the msautotest-coverage-results 
repository, but shouldn't propagate elsewhere.


Geospatial professional services
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20130710/86283ebd/attachment.html>

More information about the mapserver-dev mailing list