Skip to content

adehad/cross-platform-jenkins-py-dev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Cross Platform Python Development Docker & Jenkins

Context

For reasons outside my control I needed to use Jenkins.

Was surprised that Jenkins required specifying the shell for all terminal commands. Not really looking to do two Jenkinsfiles prefixing with bat vs sh, I created a relatively platform invariant file and the corresponding Dockerfiles.

The agents were both pretty barebones, so you may find that you can offload steps to the agent and avoid the Dockerfile all together. In my case this was a useful exercise to understand more about docker and Jenkins.

Gotchas

  1. Dockerfile.windows runs on Windows Server Core, which needs a specific license on the machine run.

The Windows container feature is only available on Windows Server 2016 (Core and with Desktop Experience), Windows 10 Professional and Enterprise (Anniversary Edition) and later.

See details on: Docker - Windows Server Core

  1. I had enormous troubles with the PATH variable on the unix agent and had to add a workaround. I'm sure there is a better way, and perhaps you won't have this problem.

About

Unix/Windows Dockerfile and Jenkinsfile example (python) configurations

Topics

Resources

License

Stars

Watchers

Forks