-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Install jq
in gcb-docker-gcloud image
#34963
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
base: master
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ArkaSaha30 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This commit will install `jq` in gcb-docker-gcloud image so that the utility is available for all cloudbuild.yaml Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com>
5c8115d
to
fc86490
Compare
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.
I'm not sure if this is the right approach.
We want to be able to build locally too, and this image is minimal containing docker-cli (so you can docker run
) and gcloud (so you can upload results to the staging locations).
I don't think we should extend this image.
We could probably docker run
jq in the build? (we should also obtain this via digest)
@@ -32,6 +32,10 @@ WORKDIR /workspace | |||
RUN echo http://dl-cdn.alpinelinux.org/alpine/latest-stable/community >> /etc/apk/repositories && \ | |||
apk --no-cache add curl python3 py-crcmod bash libc6-compat openssh-client git gnupg docker-cli make | |||
|
|||
# Install jq | |||
RUN curl -o /usr/bin/jq -fsSLO https://github.com/jqlang/jq/releases/download/jq-1.8.0/jq-linux-amd64 |
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.
If we do do this, we should at the very least be doing an integrity check (we should be for the others already here but that's not related to this PR), if not pinning the hash outright
Are you suggesting something like this for all uses of
|
Yeah that could work, right? Also means we control the jq version inline for any compat issues. |
This commit will install
jq
ingcb-docker-gcloud
image so that the utility is available for all cloudbuild.yamlFixes: kubernetes/kubernetes#131257
Ref Discussion: kubernetes/kubernetes#131258 (comment)
Built and locally tested: