Skip to content

Commit

Permalink
kubeval: Fix long lines over stdin
Browse files Browse the repository at this point in the history
  • Loading branch information
maxbrunet committed Aug 10, 2020
1 parent fac0846 commit 600aa98
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 16 deletions.
9 changes: 6 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [v0.3.2] - 2020-08-10
### Fixed
- jsonnet: Build from `master` branch for [native Go `std.manifestJsonEx()` implementation](https://github.com/google/go-jsonnet/pull/422)
- jsonnet: Build from `master` branch for [native Go implementation of `std.manifestJsonEx()`](https://github.com/google/go-jsonnet/pull/422)
- kubeval: Build from `master` branch for [long lines over stdin fix](https://github.com/instrumenta/kubeval/pull/220)

## [v0.3.1] - 2020-08-06
### Added
Expand All @@ -30,8 +32,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Initial commit

[Unreleased]: https://github.com/PaytmLabs/docker-kubernetes-ci/compare/v0.3.1...HEAD
[v0.3.1]: https://github.com/PaytmLabs/docker-kubernetes-ci/compare/v0.2.0...v0.3.1
[Unreleased]: https://github.com/PaytmLabs/docker-kubernetes-ci/compare/v0.3.2...HEAD
[v0.3.2]: https://github.com/PaytmLabs/docker-kubernetes-ci/compare/v0.3.1...v0.3.2
[v0.3.1]: https://github.com/PaytmLabs/docker-kubernetes-ci/compare/v0.3.0...v0.3.1
[v0.3.0]: https://github.com/PaytmLabs/docker-kubernetes-ci/compare/v0.2.0...v0.3.0
[v0.2.0]: https://github.com/PaytmLabs/docker-kubernetes-ci/compare/v0.1.0...v0.2.0
[v0.1.0]: https://github.com/PaytmLabs/docker-kubernetes-ci/releases/tag/v0.1.0
Expand Down
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,22 @@ FROM golang:1.14-alpine AS go-builder

# https://github.com/google/go-jsonnet/pull/422
ARG JSONNET_VERSION=0.16.1-0.20200808175936-2e346e53e721
# https://github.com/instrumenta/kubeval/pull/220
ARG KUBEVAL_VERSION=0.0.0-20200515185822-7721cbec724c

ENV GO111MODULE='on'

RUN apk add --no-cache git
RUN go get \
"github.com/google/go-jsonnet/cmd/jsonnet@v${JSONNET_VERSION}" \
"github.com/google/go-jsonnet/cmd/jsonnetfmt@v${JSONNET_VERSION}"
"github.com/google/go-jsonnet/cmd/jsonnetfmt@v${JSONNET_VERSION}" \
"github.com/instrumenta/kubeval@v${KUBEVAL_VERSION}"

FROM alpine

ARG HELM2_VERSION=2.15.2
ARG HELM_VERSION=3.2.2
ARG JB_VERSION=0.4.0
ARG KUBEVAL_VERSION=0.15.0
ARG KUSTOMIZE_VERSION=3.6.1

RUN apk add --no-cache --virtual .builddeps \
Expand All @@ -30,10 +32,8 @@ RUN apk add --no-cache --virtual .builddeps \
| tar -zxvf - -C /usr/local/bin --transform='s#^linux-amd64/helm$#helm2#' linux-amd64/helm \
&& curl -sSfL "https://github.com/jsonnet-bundler/jsonnet-bundler/releases/download/v${JB_VERSION}/jb-linux-amd64" -o /usr/local/bin/jb \
&& chmod +x /usr/local/bin/jb \
&& curl -sSfL "https://github.com/instrumenta/kubeval/releases/download/${KUBEVAL_VERSION}/kubeval-linux-amd64.tar.gz" \
| tar -zxvf - -C /usr/local/bin kubeval \
&& curl -sSfL "https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv${KUSTOMIZE_VERSION}/kustomize_v${KUSTOMIZE_VERSION}_linux_amd64.tar.gz" \
| tar -zxvf - -C /usr/local/bin kustomize \
&& apk del .builddeps

COPY --from=go-builder /go/bin/jsonnet /go/bin/jsonnetfmt /usr/local/bin/
COPY --from=go-builder /go/bin/jsonnet /go/bin/jsonnetfmt /go/bin/kubeval /usr/local/bin/
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@
Docker image to build and validate Kubernetes manifests

```shell
$ docker run --rm paytmcanada/kubernetes-ci:v0.3.1 helm version
$ docker run --rm paytmcanada/kubernetes-ci:v0.3.2 helm version
version.BuildInfo{Version:"v3.2.2", GitCommit:"a6ea66349ae3015618da4f547677a14b9ecc09b3", GitTreeState:"clean", GoVersion:"go1.13.12"}

$ docker run --rm paytmcanada/kubernetes-ci:v0.3.1 helm2 version --client
$ docker run --rm paytmcanada/kubernetes-ci:v0.3.2 helm2 version --client
Client: &version.Version{SemVer:"v2.15.2", GitCommit:"8dce272473e5f2a7bf58ce79bb5c3691db54c96b", GitTreeState:"clean"}

$ docker run --rm paytmcanada/kubernetes-ci:v0.3.1 jb --version
$ docker run --rm paytmcanada/kubernetes-ci:v0.3.2 jb --version
v0.4.0

$ docker run --rm paytmcanada/kubernetes-ci:v0.3.1 jsonnet --version
$ docker run --rm paytmcanada/kubernetes-ci:v0.3.2 jsonnet --version
Jsonnet commandline interpreter v0.16.0

$ docker run --rm paytmcanada/kubernetes-ci:v0.3.1 jsonnetfmt --version
$ docker run --rm paytmcanada/kubernetes-ci:v0.3.2 jsonnetfmt --version
Jsonnet reformatter v0.16.0

$ docker run --rm paytmcanada/kubernetes-ci:v0.3.1 kustomize version
$ docker run --rm paytmcanada/kubernetes-ci:v0.3.2 kustomize version
{Version:kustomize/v3.6.1 GitCommit:c97fa946d576eb6ed559f17f2ac43b3b5a8d5dbd BuildDate:2020-05-27T20:47:35Z GoOs:linux GoArch:amd64}

$ docker run --rm paytmcanada/kubernetes-ci:v0.3.1 kubeval --version
$ docker run --rm paytmcanada/kubernetes-ci:v0.3.2 kubeval --version
Version: 0.15.0
Commit: df50ea7fd4fd202458002a40a6a39ffbb3125bad
Date: 2020-04-14T09:32:29Z
Expand Down
2 changes: 1 addition & 1 deletion test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ readonly HELM2_VERSION=2.15.2
readonly HELM_VERSION=3.2.2
readonly JB_VERSION=0.4.0
readonly JSONNET_VERSION=0.16.0
readonly KUBEVAL_VERSION=0.15.0
readonly KUBEVAL_VERSION=dev
readonly KUSTOMIZE_VERSION=3.6.1

printf ">>> Checking git is installed...\n"
Expand Down

0 comments on commit 600aa98

Please sign in to comment.