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

[JENKINS-43052] Warn in Pipeline build log if a deprecated extension is used #1639

Conversation

MarkEWaite
Copy link
Contributor

[JENKINS-43052] Warn in Pipeline build log if a deprecated extension is used

When extensions created for freestyle projects have a more general purpose replacement in Pipeline, the more general purpose Pipeline step is preferred. This method allows the deprecated extension to suggest the preferred alternative.

When one of those extensions is used in a Pipeline, write a *DEPRECATED warning message to the build log so that the user can eventually remove the use of the deprecated extension from their Pipeline.

The deprecated warning message in the build log does not alter any behavior, it only provides a message for the user.

Suggest alternatives for those cases where a reasonable alternative exists.

Testing done

Tested by running a Pipeline job with one of the deprecated extensions and confirmed that the message was displayed as expected.

Tested by running a freestyle job with the same extension and confirmed that no message was written to the build log.

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

…is used

When extensions created for freestyle projects have a more general
purpose replacement in Pipeline, the more general purpose Pipeline step
is preferred.  This method allows the deprecated extension to suggest
the preferred alternative.

When one of those extensions is used in a Pipeline, write a
***DEPRECATED** warning message to the build log so that the user can
eventually remove the use of the deprecated extension from their Pipeline.

The deprecated warning message in the build log does not alter any
behavior, it only provides a message for the user.

Suggest alternatives for those cases where a reasonable alternative exists.

Tested by running a Pipeline job with one of the deprecated extensions
and confirmed that the message was displayed as expected.

Tested by running a freestyle job with the same extension and confirmed
that no message was written to the build log.
@MarkEWaite MarkEWaite requested a review from a team as a code owner August 19, 2024 03:04
@MarkEWaite MarkEWaite added the rfe Improvement or new feature label Aug 19, 2024
@MarkEWaite MarkEWaite marked this pull request as draft August 19, 2024 03:49
@MarkEWaite MarkEWaite closed this Aug 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rfe Improvement or new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant