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

Resolve regression where library steps cannot declare a package #297

Merged
merged 3 commits into from
Jun 25, 2022

Conversation

steven-terrana
Copy link

PR Details

fixes #296

Description

PR #286 introduced a regression causing library steps that declare a package name to fail to compile.

We switched from setting the step's base script to a StepWrapperScript via the CompilerConfiguration to instead using the @BaseScript annotation.

This annotation was being added to the step source text by prepending the line of code.

It was this prepending that caused the compilation exception, because the package declaration must come first.

The bug is resolved by instead appending the @BaseScript annotation to the bottom of the step's source text instead.

How Has This Been Tested

unit test confirms bug and fix

Types of Changes

  • Added Unit Testing
  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have added the appropriate label for this PR
  • If necessary, I have updated the documentation accordingly.
  • All new and existing tests passed.

@steven-terrana steven-terrana added the bug Something isn't working label Jun 25, 2022
@steven-terrana steven-terrana merged commit f0ebb8b into jenkinsci:main Jun 25, 2022
@steven-terrana steven-terrana deleted the fix-296 branch June 25, 2022 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: library steps declaring package don't compile
1 participant