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

Using GroovySample extension point #707

Merged
merged 7 commits into from
Feb 17, 2020
Merged

Conversation

jglick
Copy link
Member

@jglick jglick commented Feb 10, 2020

Downstream of jenkinsci/workflow-cps-plugin#350. Migrated those scripts in examples/ which were self-contained (do not require manual preconfiguration, such as registry credentials or a PVC); were reasonably representative (covering some major use cases); and are compatible with PodSecurityPolicy (so, no Docker).

@jglick jglick requested a review from Vlatombe February 10, 2020 16:29
Copy link
Member

@Vlatombe Vlatombe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok though I feel uneasy with the writeFile gym.

@jglick
Copy link
Member Author

jglick commented Feb 10, 2020

I feel uneasy with … writeFile

It is not great but the alternatives I could think of had worse problems:

  • checking out some repository on GitHub that could change or be deleted at any time
  • using master of some subdirectory of this repo, which could also change out of synch with the plugin JAR
  • using a tag of this repo, which would be tricky to check out and hard to review changes in
  • using the git-server plugin to serve content
  • publishing images to Docker Hub which bundle sources

At least the current approach is 100% self-contained. For purposes of PR review, it would be possible to load the external files from a classpath resource, but the sample script shown to a user would be the same.

pom.xml Outdated Show resolved Hide resolved
@jglick jglick requested a review from Vlatombe February 17, 2020 13:47
@jglick jglick marked this pull request as ready for review February 17, 2020 13:48
@Vlatombe Vlatombe added the feature New features label Feb 17, 2020
@Vlatombe
Copy link
Member

Looks great,
Capture d’écran 2020-02-17 à 14 50 58

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New features
Projects
None yet
3 participants