Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reimplemenation with many new features #3

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

mwinter69
Copy link

This reimplementation brings in the following features:

  • python2 and python3 support
  • Python2/3 installation to configure location of python, with auto detect feature
  • inline python scripts
  • use python script from file sytem
  • python options and script arguments

It is backward compatible with the existing python plugin. Old calls of the plugin are translated by default to python 2 inline scripts without any options or arguments. With a marker file in JENKINS_HOME a conversion to python 3 is possible.

This reimplementation solves the following issues:
[JENKINS-7551]
[JENKINS-12483]
[JENKINS-29007]

merge master to private branch
Features:
- Support for python2 and python3
- allow to give a path to a file or enter directly a script
- define options for python
- define arguments for the script
@jenkinsadmin
Copy link
Member

Thank you for this pull request! Please check this document for how the Jenkins project handles pull requests.

@jhasse
Copy link
Member

jhasse commented Apr 12, 2016

It is backward compatible with the existing python plugin. Old calls of the plugin are translated to python 2 inline scripts without any options or arguments.

Unfortunately this will break my build scripts: I'm using the existing Python plugin with Python 3.

if t marker file is present, existing scripts will be converted to python 3
otherwise to python 2
@mwinter69
Copy link
Author

Solved this with a marker file. Put the file python3CompytibilityMarker in JENKINS_HOME and they are converted to python 3

@jhasse
Copy link
Member

jhasse commented Apr 13, 2016

I'd rather not have to create a file in my JENKINS_HOME. Also some people won't know about this when updating the plugin.

I think the right approach would be to change wantedVersion from an int to a String and set it to "" for old calls of the plugin. This way it will use the python executable in the PATH, just like it does now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants