-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[image-builder] Fix error when secret is a json #10031
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
Author
/werft run 👍 started the job as gitpod-build-prs-json-key.2 |
princerachit
force-pushed
the
prs/json-key
branch
from
May 16, 2022 07:04
c0644b7
to
ab289f7
Compare
princerachit
force-pushed
the
prs/json-key
branch
from
May 16, 2022 07:07
ab289f7
to
2a0c93b
Compare
Contributor
Author
/werft run 👍 started the job as gitpod-build-prs-json-key.5 |
princerachit
force-pushed
the
prs/json-key
branch
from
May 18, 2022 05:38
0676f48
to
39049b3
Compare
roboquat
added
size/XS
release-note-none
and removed
size/M
do-not-merge/release-note-label-needed
labels
May 18, 2022
princerachit
changed the title
[image-builder] Support json keys
[image-builder] Fix error when secret is a json
May 18, 2022
jenting
approved these changes
May 18, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did not test but code LGTM
roboquat
added
deployed: workspace
Workspace team change is running in production
deployed
Change is completely running in production
labels
May 25, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
deployed: workspace
Workspace team change is running in production
deployed
Change is completely running in production
release-note
size/XS
team: workspace
Issue belongs to the Workspace team
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The credentials from decoded auth string should be split in such a way that the first substring is treated as username and the rest of the string as password/secret. This is in conformance with what we have in image-builder-bob.
Related Issue(s)
Fixes #8938
How to test
Prefer testing in workspace-preview due to known issues (see following
Known Caveats
section)The json key secret is used in GAR/GCR. It allows you to use your service account key as a json key secret for docker login. Read more here.
I am not aware of any other such registry services which accepts a json key as a secret. In any case this PR should solve any issues whether a registry service accepts a json key or a yaml or a plain string.
cat key.json | docker login us-docker.pkg.dev -u _json_key --password-stdin
.gitpod.yml
~/.docker/config
) and copy the auth base64encoded string and use it as per instructions of this PR. Your workspace should start now.Working example
Known Caveats
europe-docker.pkg.dev
andeu.gcr.io
in our pull secrets. If you create a private registry in any of these registries then your image build will fail due to incorrect key.Release Notes
Documentation