Skip to content

[JENKINS-73677] Decorate GitClient after adding credentials - #1649

Merged
MarkEWaite merged 2 commits into
jenkinsci:masterfrom
Dohbedoh:JENKINS-73677
Sep 18, 2024
Merged

[JENKINS-73677] Decorate GitClient after adding credentials#1649
MarkEWaite merged 2 commits into
jenkinsci:masterfrom
Dohbedoh:JENKINS-73677

Conversation

@Dohbedoh

@Dohbedoh Dohbedoh commented Aug 28, 2024

Copy link
Copy Markdown
Contributor

JENKINS-73677: Credentials are added to GitClient after the client is decorated by extensions.. A plugin cannot for example override the credentials passed in via a GitSCMExtension (Noticed as part of jenkinsci/bitbucket-branch-source-plugin#867)

Testing done

Tested simple scenario: configured Pipeline from SCM with GitSCM with provided Credentials.

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

@Dohbedoh

Dohbedoh commented Sep 9, 2024

Copy link
Copy Markdown
Contributor Author

@jenkinsci/git-plugin-developers Any chance to get this merged ?

@olamy olamy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

MarkEWaite added a commit to MarkEWaite/docker-lfs that referenced this pull request Sep 18, 2024
[JENKINS-73677] Decorate GitClient after adding credentials

jenkinsci/git-plugin#1649

@MarkEWaite MarkEWaite left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

BOM tests passed with this change. Ready to merge and release

@MarkEWaite
MarkEWaite merged commit 843d48b into jenkinsci:master Sep 18, 2024
@MarkEWaite MarkEWaite added enhancement Improvement or new feature and removed tests Automated test addition or improvement labels Sep 18, 2024
@Dohbedoh
Dohbedoh deleted the JENKINS-73677 branch September 18, 2024 23:06
MarkEWaite added a commit to MarkEWaite/git-plugin that referenced this pull request Sep 20, 2024
MarkEWaite added a commit that referenced this pull request Sep 20, 2024
…1649)"

https://issues.jenkins.io/browse/JENKINS-73797 reports that
Bitbucket branch source plugin multibranch Pipelines are broken by this
change if they use ssh access to the repository.  Rather than disrupt
users by breaking their Pipelines, revert the change and release it so
that we have time to evaluate alternatives and to develop better tests.

This reverts commit 843d48b.
@basil

basil commented Sep 20, 2024

Copy link
Copy Markdown
Member

Appears to have broken Bitbucket Branch Source plugin Multibranch Pipeline jobs if they use SSH access to the repository: JENKINS-73797

nfalco79 added a commit to jenkinsci/bitbucket-branch-source-plugin that referenced this pull request Nov 3, 2024
… Bitbucket is null

Set the credentialsId returned by the authenticator for SCM.
In case of SSH Trait is set git SCM credential to null to re-apply patch jenkinsci/git-plugin#1649
nfalco79 added a commit to jenkinsci/bitbucket-branch-source-plugin that referenced this pull request Nov 3, 2024
… Bitbucket is null (#899)

Set the credentialsId returned by the authenticator for SCM.
In case of SSH Trait is set git SCM credential to null to re-apply patch jenkinsci/git-plugin#1649
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improvement or new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants