Skip to content

Preserve custom PomFile and deployToLocal through var expansion#62

Open
copart-jafloyd wants to merge 15 commits into
jenkinsci:masterfrom
copartit:preserve_pomfile
Open

Preserve custom PomFile and deployToLocal through var expansion#62
copart-jafloyd wants to merge 15 commits into
jenkinsci:masterfrom
copartit:preserve_pomfile

Conversation

@copart-jafloyd

Copy link
Copy Markdown

I tried to use the Pom File setting on an artifact, but it had no effect.

The TokenExpander.expand method is the source of the bug because it does not preserve/copy the user-provided pomFile value. In fixing that, I also noticed that deployToLocal was also not preserved, so I included that as well.

The custom pom file feature was introduced in #43 with 2.0.0, but it looks like the var expansion feature was added after the pomFile feature, so the pomFile was inadvertently missed.

There are no Jira or GitHub issues for this afaik.

Testing done

I just installed and successfully tested this build in my Jenkins instance: https://ci.jenkins.io/job/Plugins/job/repository-connector-plugin/job/PR-61/2/artifact/target/repository-connector.hpi In my test, the custom pom file was deploted correctly.

I added some basic unit tests for TokenExpander. Note that I did not test actual var expansion; I only tested that vars are preserved.

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

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.

1 participant