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 path to the yq binary #1247

Merged
merged 2 commits into from May 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile.d/helm.mk
Expand Up @@ -127,7 +127,7 @@ helm/schema/crd/vald: \
GOPRIVATE=$(GOPRIVATE) \
go run hack/helm/schema/crd/main.go \
charts/vald/values.yaml > $(TEMP_DIR)/valdrelease-spec.yaml
yq eval-all 'select(fileIndex==0).spec.versions[0].schema.openAPIV3Schema.properties.spec = select(fileIndex==1).spec | select(fileIndex==0)' \
$(BINDIR)/yq eval-all 'select(fileIndex==0).spec.versions[0].schema.openAPIV3Schema.properties.spec = select(fileIndex==1).spec | select(fileIndex==0)' \
$(TEMP_DIR)/valdrelease.yaml $(TEMP_DIR)/valdrelease-spec.yaml > charts/vald-helm-operator/crds/valdrelease.yaml

.PHONY: helm/schema/crd/vald-helm-operator
Expand All @@ -138,5 +138,5 @@ helm/schema/crd/vald-helm-operator: \
GOPRIVATE=$(GOPRIVATE) \
go run hack/helm/schema/crd/main.go \
charts/vald-helm-operator/values.yaml > $(TEMP_DIR)/valdhelmoperatorrelease-spec.yaml
yq eval-all 'select(fileIndex==0).spec.versions[0].schema.openAPIV3Schema.properties.spec = select(fileIndex==1).spec | select(fileIndex==0)' \
$(BINDIR)/yq eval-all 'select(fileIndex==0).spec.versions[0].schema.openAPIV3Schema.properties.spec = select(fileIndex==1).spec | select(fileIndex==0)' \
$(TEMP_DIR)/valdhelmoperatorrelease.yaml $(TEMP_DIR)/valdhelmoperatorrelease-spec.yaml > charts/vald-helm-operator/crds/valdhelmoperatorrelease.yaml
5 changes: 1 addition & 4 deletions dockers/ci/base/Dockerfile
Expand Up @@ -23,7 +23,6 @@ FROM ubuntu:devel AS builder
ARG PROTOBUF_VERSION=3.14.0
ARG GOLANGCI_LINT_VERSION=v1.36.0
ARG REVIEWDOG_VERSION=v0.11.0
ARG YQ_VERSION=4.5.0

LABEL maintainer "${MAINTAINER}"

Expand Down Expand Up @@ -85,6 +84,7 @@ RUN make helm-docs/install
RUN make kind/install
RUN make valdcli/install
RUN make kubelinter/install
RUN make yq/install
Copy link
Contributor

Choose a reason for hiding this comment

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

📝 [hadolint] <DL3059> reported by reviewdog 🐶
Multiple consecutive RUN instructions. Consider consolidation.


RUN make tparse/install

Expand All @@ -96,9 +96,6 @@ RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/i
RUN curl -sSfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh \
| sh -s -- -b $(go env GOPATH)/bin ${REVIEWDOG_VERSION}

RUN curl -Lo /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64 \
&& chmod a+x /usr/local/bin/yq

ENV PATH=$PATH:$GOPATH/bin

RUN rm -rf "${GOPATH}/src/github.com/vdaas/vald/*"