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

Shared Library Version Override Plugin #4069

Closed
c3p0-maif opened this issue Sep 5, 2024 · 20 comments
Closed

Shared Library Version Override Plugin #4069

c3p0-maif opened this issue Sep 5, 2024 · 20 comments
Labels
bot-check-complete Automated hosting checks passed hosting-request Request to host a component in jenkinsci security-audit-done The hosting request code passed the security audit with success

Comments

@c3p0-maif
Copy link
Contributor

Repository URL

https://github.com/c3p0-maif/shared-library-version-override

New Repository Name

shared-library-version-override-plugin

Description

This plugin is an "extension" of the plugin-groovy-lib which allow to override the version of a specific pipeline all over an AbstractFolder.
My use case is to force a group of jobs to run with a beta release of a pipeline library (canary testing).

GitHub users to have commit permission

@c3p0-maif

Jenkins project users to have release permission

cpottiers

Issue tracker

Jira

@c3p0-maif c3p0-maif added the hosting-request Request to host a component in jenkinsci label Sep 5, 2024
@jenkins-cert-app
Copy link
Collaborator

Security audit, information and commands

The security team is auditing all the hosting requests, to ensure a better security by default.

This message informs you that a Jenkins Security Scan was triggered on your repository.
It takes ~10 minutes to complete.

Commands

The bot will parse all comments, and it will check if any line start with a command.

Security team only:

  • /audit-ok => the audit is complete, the hosting can continue 🎉.
  • /audit-skip => the audit is not necessary, the hosting can continue 🎉.
  • /audit-findings => the audit reveals some issues that require corrections ✏️.

Anyone:

  • /request-security-scan => the findings from the Jenkins Security Scan were corrected, this command will re-scan your repository 🔍.
  • /audit-review => the findings from the audit were corrected, this command will ping the security team to review the findings 👀. It's only applicable when the previous audit required changes.

Only one command can be requested per comment.

(automatically generated message, version: 1.29.12)

@jenkins-cert-app jenkins-cert-app added the security-audit-todo The security team needs to audit the hosting request code label Sep 5, 2024
Copy link

github-actions bot commented Sep 5, 2024

Hello from your friendly Jenkins Hosting Checker

It appears you have some issues with your hosting request. Please see the list below and correct all issues marked Required. Your hosting request will not be approved until these issues are corrected. Issues marked with Warning or Info are just recommendations and will not stall the hosting process.

  • ⛔ Required: The following usernames in 'Jenkins project users to have release permission' need to log into Artifactory: cpottiers (reports are re-synced hourly, wait to re-check for a bit after logging in)
  • ⛔ Required: The <groupId> from the pom.xml should be io.jenkins.plugins instead of fr.c3p0.jenkins.plugins

You can re-trigger a check by editing your hosting request or by commenting /hosting re-check

@jenkins-cert-app
Copy link
Collaborator

The Jenkins Security Scan did not find anything dangerous with your plugin, congratulations! 🎉


💡 The Security team recommends that you are setting up the scan in your repository by following our guide.

@jenkins-cert-app jenkins-cert-app added security-audit-done The hosting request code passed the security audit with success and removed security-audit-todo The security team needs to audit the hosting request code labels Sep 5, 2024
@c3p0-maif
Copy link
Contributor Author

/hosting re-check

Copy link

github-actions bot commented Sep 5, 2024

Hello from your friendly Jenkins Hosting Checker

It appears you have some issues with your hosting request. Please see the list below and correct all issues marked Required. Your hosting request will not be approved until these issues are corrected. Issues marked with Warning or Info are just recommendations and will not stall the hosting process.

  • ⛔ Required: The following usernames in 'Jenkins project users to have release permission' need to log into Artifactory: cpottiers (reports are re-synced hourly, wait to re-check for a bit after logging in)

You can re-trigger a check by editing your hosting request or by commenting /hosting re-check

@c3p0-maif
Copy link
Contributor Author

/hosting re-check

Copy link

github-actions bot commented Sep 9, 2024

Hello from your friendly Jenkins Hosting Checker

It appears you have some issues with your hosting request. Please see the list below and correct all issues marked Required. Your hosting request will not be approved until these issues are corrected. Issues marked with Warning or Info are just recommendations and will not stall the hosting process.

  • ⛔ Required: The following usernames in 'Jenkins project users to have release permission' need to log into Artifactory: cpottiers (reports are re-synced hourly, wait to re-check for a bit after logging in)

You can re-trigger a check by editing your hosting request or by commenting /hosting re-check

@c3p0-maif
Copy link
Contributor Author

/hosting re-check

Copy link

github-actions bot commented Sep 9, 2024

Hello from your friendly Jenkins Hosting Checker

It looks like you have everything in order for your hosting request. A member of the Jenkins hosting team will check over things that I am not able to check(code review, README content, etc) and process the request as quickly as possible. Thank you for your patience.

Hosting team members can host this request with /hosting host

@github-actions github-actions bot added bot-check-complete Automated hosting checks passed and removed needs-fix labels Sep 9, 2024
@c3p0-maif c3p0-maif changed the title New plugin : Shared Library Version Override Shared Library Version Override Plugin Sep 11, 2024
Copy link

Hello from your friendly Jenkins Hosting Checker

It looks like you have everything in order for your hosting request. A member of the Jenkins hosting team will check over things that I am not able to check(code review, README content, etc) and process the request as quickly as possible. Thank you for your patience.

Hosting team members can host this request with /hosting host

@c3p0-maif
Copy link
Contributor Author

c3p0-maif commented Sep 17, 2024

Hi, any news ?

@jonesbusy
Copy link
Contributor

Not hosting team here but I would be interested by the plugin. Overriding the version per folder is a must without specifying again the full location of the lib

@timja
Copy link
Member

timja commented Sep 22, 2024

Hi

1. Please update your java package to match the new group id, io.jenkins.plugins.shared_library_version_override
2. Description should be removed from pom.xml https://github.com/c3p0-maif/shared-library-version-override/blob/master/pom.xml#L17
3. Developers element is not used for maintainer information, I recommend it be removed https://github.com/c3p0-maif/shared-library-version-override/blob/master/pom.xml#L28
4. githubRepo should be jenkinsci not c3po.. https://github.com/c3p0-maif/shared-library-version-override/blob/master/pom.xml#L48
5. You can drop the this plugin in the index.jelly and AbstractFolder should not be used in a plugin description as its developer terminology not user facing terminology, Folder should be used I believe https://github.com/c3p0-maif/shared-library-version-override/blob/master/src/main/resources/index.jelly#L3
6. Building with mvn clean install fails currently due to spotless violations.
7. It would be nicer if the libraries could be populated as a drop down rather than the user having to type in a name
8. It only seems to work with global libraries and not libraries declared on a folder? I would expect to be able to override a folder one as well especially in the case of nested folders and thats not clear in the text: Sharable librarys version may be overridden to any pipeline builds running on this folder.

@c3p0-maif
Copy link
Contributor Author

Hi @timja ,
Thanks you for this feedback, I appreciate.

I will quickly have a look on it.

@c3p0-maif
Copy link
Contributor Author

/hosting re-check

Copy link

Hello from your friendly Jenkins Hosting Checker

It looks like you have everything in order for your hosting request. A member of the Jenkins hosting team will check over things that I am not able to check(code review, README content, etc) and process the request as quickly as possible. Thank you for your patience.

Hosting team members can host this request with /hosting host

@c3p0-maif
Copy link
Contributor Author

Hi @timja, I pushed some modifications regards to your review.
All points have been covered I think.

@timja
Copy link
Member

timja commented Sep 24, 2024

Hi @c3p0-maif


  1. The description in index.jelly doesn't make sense to me, what about:

Allows overriding Shared Library versions in folders

I've retested and all looks great, thanks for improving the UI and adding support for folder based libraries.

@timja
Copy link
Member

timja commented Sep 24, 2024

/hosting host

@jenkins-infra-bot
Copy link
Contributor

Hosting request complete, the code has been forked into the jenkinsci project on GitHub as https://github.com/jenkinsci/shared-library-version-override-plugin

A Jira component named [shared-library-version-override-plugin](https://issues.jenkins.io/issues/?jql=project+%3D+JENKINS+AND+component+%3D+ shared-library-version-override-plugin)has also been created with cpottiers as the default assignee for issues.

A pull request has been created against the repository permissions updater to setup release permissions. Additional users can be added by modifying the created file.

Please delete your original repository (if there are no other forks), under 'Danger Zone', so that the jenkinsci organization repository is the definitive source for the code. If there are other forks, please contact GitHub support to make the jenkinsci repo the root of the fork network (mention that Jenkins approval was given in support request 569994). Also, please make sure you properly follow the documentation on documenting your plugin so that your plugin is correctly documented.

You will also need to do the following in order to push changes and release your plugin:

Welcome aboard!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot-check-complete Automated hosting checks passed hosting-request Request to host a component in jenkinsci security-audit-done The hosting request code passed the security audit with success
Projects
None yet
Development

No branches or pull requests

5 participants