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(gitopsUpdateDeployment): take into account branch name when clonning #4811

Merged
merged 4 commits into from
Feb 6, 2024

Conversation

Googlom
Copy link
Member

@Googlom Googlom commented Feb 1, 2024

gitopsUpdateDeployment doesn't take into account branchName parameter when clonning a repo. This leads to a bug when specifying branchName other than default (main or master). In that case git clones default branch and then tries to check out to branchName (which doesn't exist in cloned repo) and then creates that branchName from default branch.

This PR fixes this bug by passing branchName into clone function

@Googlom Googlom requested a review from a team as a code owner February 1, 2024 08:03
@Googlom Googlom requested a review from vstarostin February 1, 2024 08:50
@Googlom
Copy link
Member Author

Googlom commented Feb 5, 2024

/it-go

Copy link
Member

@CCFenner CCFenner left a comment

Choose a reason for hiding this comment

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

👍

Copy link

sonarqubecloud bot commented Feb 6, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@Googlom
Copy link
Member Author

Googlom commented Feb 6, 2024

/it-go

@Googlom Googlom merged commit b4863fe into master Feb 6, 2024
12 checks passed
@Googlom Googlom deleted the fix/gitopsUpdateDeployment branch February 6, 2024 08:33
maxatsap pushed a commit to maxatsap/jenkins-library that referenced this pull request Jul 23, 2024
…ing (SAP#4811)

* use branch when clonning a repo

* fix unit test mocks
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.

3 participants