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

Handle additional plugins / fix plugin handling #2

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

Conversation

jsoref
Copy link

@jsoref jsoref commented Dec 15, 2017

There are a number of (fairly basic) features of Jenkins that we use which aren't handled by convert-to-pipeline-plugin. It'd be nice if it supported them.

  1. While compatibility.md claims that it handles timestamps, it doesn't actually suppress the "unhandled plugin" warning. And in fact, it appears to unconditionally add timestamps.
  2. extendedemail -- I think I have the Jenkinsfile syntax wrong for this one.
  3. Secrets
  • The way timestamp and secrets work, it'd be nice if plugins had the option of being called to wrap a document (with the document) instead of only midstream to a document. -- I'm not trying to fix that today, but it's worth noting.

I created this PR early because I was curious to see if you had an autobuilder and I'd like feedback on the direction.

@jsoref jsoref force-pushed the plugins branch 6 times, most recently from b315598 to 37be863 Compare December 17, 2017 18:27
@ghost
Copy link

ghost commented Dec 20, 2017

Thank you for the pointers in the discussion.
We are currently evaluating the work done in this fork :
https://github.com/daniel-beck/convert-to-pipeline/tree/generic-fallback-support
This might help to answer some of the questions you have or iron out any issues you might have faced so far.
The efforts in that fork cater for several more scenarios than was planned for and most likely make compatibility less effort demanding if not seamless with any plugin that provides pipeline support.
The fork would still require further development and it too is not in a state to seamlessly merge in to the main code.

@stunney
Copy link

stunney commented May 8, 2018

Please fix this conflict and get this merged.

@vimal-infostretch
Copy link
Collaborator

@jsoref Please fix this conflict and update the PR

@jsoref
Copy link
Author

jsoref commented May 14, 2018

@vimal-infostretch: I've updated the PR...

@vimal-infostretch
Copy link
Collaborator

@jsoref after merging the PR locally we got below error. Also need to update the unit test code in the test folder according to your fix.

Error details:
May 16, 2018 11:43:15 AM SEVERE com.infostretch.labs.transformers.Transformer transformJob
Exception occurred in Transformer constructor: com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl cannot be cast to org.w3c.dom.Element

@jsoref jsoref force-pushed the plugins branch 7 times, most recently from 2a234bc to ddba4e9 Compare May 17, 2018 09:23
@vimal-infostretch
Copy link
Collaborator

Hi @jsoref

We found one thing, yesterday when tried to build it, the commit ids were different, but the timestamp is same, only change is that there is Draft prefix in commit message. Can you please help us to understand this behaviour?

  • 16-05-2018 Commit Details
commit c0b8dad90c818d6906ea6e311e57e5ec2a124022
Author: Josh Soref <jsoref@users.noreply.github.com>
Date:   Fri Dec 15 14:47:34 2017 -0500

    Draft: SecretBuildWrapper

commit 0b98e247f7801df3c309a83a72814991c32b332c
Author: Josh Soref <jsoref@users.noreply.github.com>
Date:   Fri Dec 15 13:30:36 2017 -0500

    Draft: ExtendedEmailPublisher

commit 0e50c101dd3025859b54bc5f00fc929da5bb6a59
Author: Josh Soref <jsoref@users.noreply.github.com>
Date:   Fri Dec 15 15:25:47 2017 -0500

    Draft: Improve TimestamperBuildWrapper handling
  • 17-05-2018 Commit Details
commit ddba4e94fb20c290aca6ae061449296ec64f1114
Author: Josh Soref <jsoref@users.noreply.github.com>
Date:   Fri Dec 15 14:47:34 2017 -0500

    SecretBuildWrapper

commit 91aed0bbc3aada1df2a77924fcf9c0acc3c32c07
Author: Josh Soref <jsoref@users.noreply.github.com>
Date:   Fri Dec 15 13:30:36 2017 -0500

    ExtendedEmailPublisher

commit 34a92c3886a15a19444d559d50a6134d512b607a
Author: Josh Soref <jsoref@users.noreply.github.com>
Date:   Fri Dec 15 15:25:47 2017 -0500

    Improve TimestamperBuildWrapper handling

@jsoref jsoref force-pushed the plugins branch 2 times, most recently from fc7662b to 52a2c7c Compare May 17, 2018 14:44
@jsoref
Copy link
Author

jsoref commented May 17, 2018

I do my work using Mercurial (hg), my changes are usually hg commit --amend, hg histedit ..., or hg rebase ... and these actions don't adjust the timestamp. Essentially, the work is deemed to be when the initial work was done.

w/ distributed version control systems (git, hg, ...), timestamps aren't particularly meaningful and shouldn't be relied upon.

I've been slowly iterating on this code, e.g. adding tests / trying to capture test output. When I thought that the code was behaving close to correctly, I removed the Draft label. It turns out that I should have left that label on ExtendedEmailPublisher and SecretBuildWrapper as the tests are not currently showing the code works correctly...

@vimal-infostretch
Copy link
Collaborator

@jsoref we observed that there is one more change you pushed to the PR and hence now pipeline is breaking. Along with it, there is one more issue which we found with your PR changes is that in the latest code changes, timestamp {} block has been removed which was present in the earlier version (1.0) of the plug-in.

can you fix this existing issue and also timestamp issue?

@vimal-infostretch
Copy link
Collaborator

@jsoref need to fix above open issues. Can you fix those and raise a PR?

@rajatrj16
Copy link

This plugin seems to be very useful in my use case
Can you suggest if this plugin still works? I tried it but it does not seem to work and shows white screen if the commit checkbox is selected.
Please acknowledge asap you receive this.

@jsoref
Copy link
Author

jsoref commented Aug 30, 2021

@vimal-infostretch #2 (comment): I'm puzzled, in theory this line should result in timestamps:

https://github.com/jenkinsci/convert-to-pipeline-plugin/pull/2/files#diff-31452445be37f7b4ccdecf79531499c3cc5ec5a37777ecf7da500af1f4a77513R143

Is that not behaving?

@rajatrj16: Asking open source people to respond asap is fairly rude. I happen to generally respond to notifications, which means on average (outside of September), I'll respond w/in a business day, but expecting people to responding isn't generally proper.

@zakcox
Copy link

zakcox commented Dec 16, 2021

Plugin is still broken when selecting commit

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.

5 participants