[TIP] Jenkins CI downloads thousands of clones from my Bitbucket repo :-(

Albert-Jan Roskam fomcl at yahoo.com
Wed Apr 16 12:43:28 PDT 2014



---- Original Message -----

> From: James Chapman <james at uplinkzero.com>
> To: Albert-Jan Roskam <fomcl at yahoo.com>
> Cc: TesttingInPython <testing-in-python at lists.idyll.org>
> Sent: Wednesday, April 16, 2014 3:56 PM
> Subject: Re: [TIP] Jenkins CI downloads thousands of clones from my Bitbucket repo :-(
> 
>T his question will likely be better posed to the Jenkins user mailing list.
> 
> Sounds like something is triggering your job and with each build it's
> likely downloading the sdist file.

Hi, thanks for your reply. The sdist is around 80Mb, and the download counter was going so fas that it was impossible that so many copies were actually being downloaded (every time I hit refresh in my browser it had increased by 5 or 10. My connection is fast but not THAT fast. I think the problem lies with msysGit as it only happened with the Windows slave. Also, I often get EOF errors when pulling the repo (maybe because the repo was created under Linux?) I switched to Gitbucket and pull from there, and I push to Bitbucket once it works. One StackOverflow post suggested that downgrading msysGit might work.
 
> As for the path query, depending on the build step type, you can use a
> / which clever plugins will interpret as \\ on windows, or create a
> dir separator environment variable that you configure under each
> client and then use that environment variable in your build steps.

I found out that I could also enter environment variables, which solves it. And windows also accepts forward slashes (except UNC paths). Pytthon code is not an option here. 
 
> Otherwise you could do something like this:
> ----------------------------------------------------------------
> import platform
> 
> if platform.system() == 'Windows':
>     DIRSEP = "\\"
> else:
>     DIRSEP = "/"
> 
> fileToOpen = "folder1" + DIRSEP + "folder2" + DIRSEP + 

or this:

fileToOpen = os.path.join(folder1, folder2, "file.txt") 


> "file.txt"
> f = open(fileToOpen, "r")
> f.read()
> f.close()
> ----------------------------------------------------------------
> 
> --
> James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20140416/1ac6b1dd/attachment.htm>


More information about the testing-in-python mailing list