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

fix(shell) Fix target with an SCM to correctly add the changed files by the shell command #343

Merged
merged 1 commit into from
Oct 28, 2021

Conversation

dduportal
Copy link
Contributor

@dduportal dduportal commented Oct 28, 2021

Fix #342

This PR will unblocks jenkinsci/bom#698.

A manual test had been run , resulting in dduportal/bom#2.

Please note that this PR should only result on a patch update (no breaking change, no new feature: only a bugfix)

Test

To test this pull request, you can run the following commands:

# Unit Tests
  cp pkg/plugins/shell
  go test

# End to End
go build -o dist/updatecli
updatecli diff (...) # in your failing context

Additional Information

  • This solution was found with a common brainstomring with @timja and @olblak : thanks folks!
  • Please note that it changes the interface of the scm.Scm type: it is required to allow mock injection during the unit tests (otherwise we could have only used the git/generic method)

…by the shell command

Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
@dduportal dduportal requested a review from olblak October 28, 2021 12:34
@dduportal dduportal added resource-shell Resource of kind Shell target Related to updatecli target bug Something isn't working labels Oct 28, 2021
Copy link
Member

@olblak olblak left a comment

Choose a reason for hiding this comment

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

I am a bit concerned by adding every file without checking their status but we can still improve that later

Copy link
Contributor

@timja timja left a comment

Choose a reason for hiding this comment

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

nice work, fyi @jetersen

@olblak olblak merged commit d6b2924 into updatecli:main Oct 28, 2021
@dduportal dduportal deleted the fix/gh-342 branch October 28, 2021 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resource-shell Resource of kind Shell target Related to updatecli target
Projects
None yet
Development

Successfully merging this pull request may close these issues.

shell plugin: target SCM (and condition SCM) are not working
3 participants