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

feat(cnbBuild): validate docker credentials #4840

Merged
merged 1 commit into from
Mar 15, 2024
Merged

Conversation

modulo11
Copy link
Member

@modulo11 modulo11 commented Feb 21, 2024

Changes

This change validates that credentials for the target registry (excluding localhost) can be found in the provided secret. If it is not present, it fails the run and exits with a hopefully more descriptive error on what went wrong.

  • Tests
  • Documentation

@modulo11 modulo11 requested a review from a team as a code owner February 21, 2024 07:42
@modulo11
Copy link
Member Author

/it-go

@modulo11 modulo11 force-pushed the validate-credentials branch 6 times, most recently from a6b06e0 to 0c55675 Compare February 22, 2024 07:54
@modulo11
Copy link
Member Author

/it-go

@modulo11 modulo11 force-pushed the validate-credentials branch 2 times, most recently from ff91704 to 7fd2eb2 Compare March 1, 2024 10:28
@modulo11
Copy link
Member Author

modulo11 commented Mar 1, 2024

/it-go

@modulo11 modulo11 force-pushed the validate-credentials branch from 7fd2eb2 to 9e7bde6 Compare March 1, 2024 10:43
@modulo11
Copy link
Member Author

modulo11 commented Mar 1, 2024

/it-go

@modulo11 modulo11 force-pushed the validate-credentials branch from 9e7bde6 to 5bb497a Compare March 1, 2024 12:08
@modulo11
Copy link
Member Author

modulo11 commented Mar 1, 2024

/it-go

@modulo11 modulo11 force-pushed the validate-credentials branch from 5bb497a to bd9afcc Compare March 1, 2024 12:20
@modulo11
Copy link
Member Author

modulo11 commented Mar 1, 2024

/it-go

Copy link
Member

@c0d1ngm0nk3y c0d1ngm0nk3y left a comment

Choose a reason for hiding this comment

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

Could we maybe make ParseDockerConfig and GenerateCnbAuth private and just introduce a cnbutils.GenerateCnbAuthValidFor(config, target) as public to move all this to auth.go? So 'cnbBuild.go' just calls a diffferent method?

WDYT?

@modulo11 modulo11 force-pushed the validate-credentials branch from bd9afcc to 00d7a99 Compare March 15, 2024 09:08
@modulo11
Copy link
Member Author

/it-go

@modulo11 modulo11 force-pushed the validate-credentials branch from 00d7a99 to d0fc485 Compare March 15, 2024 09:26
@modulo11 modulo11 force-pushed the validate-credentials branch from d0fc485 to dd6033e Compare March 15, 2024 09:34
@modulo11
Copy link
Member Author

/it-go

Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@modulo11 modulo11 merged commit df2e976 into master Mar 15, 2024
12 checks passed
@modulo11 modulo11 deleted the validate-credentials branch March 15, 2024 09:44
c0d1ngm0nk3y added a commit that referenced this pull request Mar 25, 2024
Apparently this pr caused some regression.

This reverts commit df2e976.
c0d1ngm0nk3y added a commit that referenced this pull request Mar 25, 2024
Apparently this pr caused some regression.

This reverts commit df2e976.
maxatsap pushed a commit to maxatsap/jenkins-library that referenced this pull request Jul 23, 2024
maxatsap pushed a commit to maxatsap/jenkins-library that referenced this pull request Jul 23, 2024
…4872)

Apparently this pr caused some regression.

This reverts commit df2e976.
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.

2 participants