mirror of https://github.com/linkerd/linkerd2.git
dev: v22: Add json5-to-json (#9043)
`json5-to-json` lets us process JSON files like devcontainer.json safely. Also add `just` to the go image. Signed-off-by: Oliver Gould <ver@buoyant.io>
This commit is contained in:
parent
deb49115aa
commit
18716ca206
|
|
@ -112,15 +112,15 @@ RUN for p in \
|
||||||
github.com/uudashr/gopkgs/v2/cmd/gopkgs@latest \
|
github.com/uudashr/gopkgs/v2/cmd/gopkgs@latest \
|
||||||
golang.org/x/tools/gopls@latest \
|
golang.org/x/tools/gopls@latest \
|
||||||
google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2 \
|
google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2 \
|
||||||
google.golang.org/protobuf/cmd/protoc-gen-go@v1.28 \
|
google.golang.org/protobuf/cmd/protoc-gen-go@v1.28.1 \
|
||||||
gotest.tools/gotestsum@v0.4.2 \
|
gotest.tools/gotestsum@v0.4.2 \
|
||||||
; do go install "$p" ; done \
|
; do go install -mod=readonly "$p" ; done \
|
||||||
&& rm -rf /go/pkg/* /go/src/*
|
&& rm -rf /go/pkg/* /go/src/*
|
||||||
COPY bin/scurl /usr/local/bin/scurl
|
COPY bin/scurl /usr/local/bin/scurl
|
||||||
|
COPY --from=protoc /usr/local/bin/protoc /usr/local/bin/
|
||||||
|
COPY --from=just /usr/local/bin/just /usr/local/bin/
|
||||||
ENV PROTOC_NO_VENDOR=1
|
ENV PROTOC_NO_VENDOR=1
|
||||||
ENV PROTOC=/usr/local/bin/protoc
|
ENV PROTOC=/usr/local/bin/protoc
|
||||||
COPY --from=protoc /usr/local/bin/protoc $PROTOC
|
|
||||||
|
|
||||||
##
|
##
|
||||||
## Kubernetes tools
|
## Kubernetes tools
|
||||||
|
|
@ -163,6 +163,9 @@ ARG ACTIONLINT_VERSION=v1.6.15
|
||||||
RUN url="https://github.com/rhysd/actionlint/releases/download/${ACTIONLINT_VERSION}/actionlint_${ACTIONLINT_VERSION#v}_linux_amd64.tar.gz" ; \
|
RUN url="https://github.com/rhysd/actionlint/releases/download/${ACTIONLINT_VERSION}/actionlint_${ACTIONLINT_VERSION#v}_linux_amd64.tar.gz" ; \
|
||||||
scurl "$url" | tar xzvf - -C /usr/local/bin actionlint
|
scurl "$url" | tar xzvf - -C /usr/local/bin actionlint
|
||||||
|
|
||||||
|
FROM docker.io/rust:${RUST_TOOLCHAIN}-slim as json5-to-json
|
||||||
|
RUN cargo install json5-to-json
|
||||||
|
|
||||||
##
|
##
|
||||||
## Tools: Everything needed for a development environment, minus non-root settings.
|
## Tools: Everything needed for a development environment, minus non-root settings.
|
||||||
##
|
##
|
||||||
|
|
@ -170,6 +173,7 @@ RUN url="https://github.com/rhysd/actionlint/releases/download/${ACTIONLINT_VERS
|
||||||
FROM base as tools
|
FROM base as tools
|
||||||
COPY --from=actionlint /usr/local/bin/actionlint /usr/local/bin/
|
COPY --from=actionlint /usr/local/bin/actionlint /usr/local/bin/
|
||||||
COPY --from=checksec /usr/local/bin/checksec /usr/local/bin/che
|
COPY --from=checksec /usr/local/bin/checksec /usr/local/bin/che
|
||||||
|
COPY --from=json5-to-json /usr/local/cargo/bin/json5-to-json /usr/local/bin/
|
||||||
COPY --from=just /usr/local/bin/just /usr/local/bin/
|
COPY --from=just /usr/local/bin/just /usr/local/bin/
|
||||||
COPY --from=k8s /usr/local/bin/helm /usr/local/bin/
|
COPY --from=k8s /usr/local/bin/helm /usr/local/bin/
|
||||||
COPY --from=k8s /usr/local/bin/helm-docs /usr/local/bin/
|
COPY --from=k8s /usr/local/bin/helm-docs /usr/local/bin/
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "linkerd2",
|
"name": "linkerd2",
|
||||||
"image": "ghcr.io/linkerd/dev:v21",
|
"image": "ghcr.io/linkerd/dev:v22",
|
||||||
// "dockerFile": "./Dockerfile",
|
// "dockerFile": "./Dockerfile",
|
||||||
// "context": "..",
|
// "context": "..",
|
||||||
"extensions": [
|
"extensions": [
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ name: Actions
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
|
- .devcontainer/devcontainer.json
|
||||||
- .github/workflows/**
|
- .github/workflows/**
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
|
|
@ -12,7 +13,7 @@ jobs:
|
||||||
actionlint:
|
actionlint:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
container: ghcr.io/linkerd/dev:v21-tools
|
container: ghcr.io/linkerd/dev:v22-tools
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
|
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
|
||||||
- name: Run actionlint
|
- name: Run actionlint
|
||||||
|
|
@ -24,13 +25,15 @@ jobs:
|
||||||
|
|
||||||
devcontainer-versions:
|
devcontainer-versions:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: ghcr.io/linkerd/dev:v21-tools
|
container: ghcr.io/linkerd/dev:v22-tools
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
|
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
|
||||||
- name: Scan workflows for other Devcontainer image versions
|
- name: Scan workflows for other Devcontainer image versions
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
# Strip jsonc comments because `jq` doesn't support them.
|
# Strip jsonc comments because `jq` doesn't support them.
|
||||||
image=$(sed -E '/^\s*\/\/.*/d' .devcontainer/devcontainer.json |jq -Mr .image)
|
image=$(json5-to-json <.devcontainer/devcontainer.json |jq -r '.image')
|
||||||
for f in .github/workflows/* ; do
|
for f in .github/workflows/* ; do
|
||||||
for i in $(yq '.jobs.* | .container.image // .container // "" | match("ghcr.io/linkerd/dev:v[0-9]+").string' < "$f") ; do
|
for i in $(yq '.jobs.* | .container.image // .container // "" | match("ghcr.io/linkerd/dev:v[0-9]+").string' < "$f") ; do
|
||||||
if [ "$i" != "$image" ]; then
|
if [ "$i" != "$image" ]; then
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ jobs:
|
||||||
go-lint:
|
go-lint:
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
container: ghcr.io/linkerd/dev:v21-go
|
container: ghcr.io/linkerd/dev:v22-go
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
|
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
|
||||||
- run: golangci-lint run --verbose --timeout=10m
|
- run: golangci-lint run --verbose --timeout=10m
|
||||||
|
|
@ -24,7 +24,7 @@ jobs:
|
||||||
go-format:
|
go-format:
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
container: ghcr.io/linkerd/dev:v21-go
|
container: ghcr.io/linkerd/dev:v22-go
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
|
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
|
||||||
- run: bin/fmt
|
- run: bin/fmt
|
||||||
|
|
@ -32,7 +32,7 @@ jobs:
|
||||||
go-test:
|
go-test:
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
container: ghcr.io/linkerd/dev:v21-go
|
container: ghcr.io/linkerd/dev:v22-go
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
|
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
|
||||||
- run: go mod download
|
- run: go mod download
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ jobs:
|
||||||
helm-docs-diff:
|
helm-docs-diff:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
container: ghcr.io/linkerd/dev:v21-tools
|
container: ghcr.io/linkerd/dev:v22-tools
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
|
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
|
||||||
- run: bin/helm-docs-diff
|
- run: bin/helm-docs-diff
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ jobs:
|
||||||
proto-diff:
|
proto-diff:
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
container: ghcr.io/linkerd/dev:v21-go
|
container: ghcr.io/linkerd/dev:v22-go
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
|
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
|
||||||
- run: bin/protoc-diff
|
- run: bin/protoc-diff
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ jobs:
|
||||||
fmt:
|
fmt:
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: ghcr.io/linkerd/dev:v21-rust
|
container: ghcr.io/linkerd/dev:v22-rust
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
|
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
|
||||||
- run: just rs-check-fmt
|
- run: just rs-check-fmt
|
||||||
|
|
@ -50,7 +50,7 @@ jobs:
|
||||||
clippy:
|
clippy:
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: ghcr.io/linkerd/dev:v21-rust
|
container: ghcr.io/linkerd/dev:v22-rust
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
|
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
|
||||||
- run: just rs-fetch
|
- run: just rs-fetch
|
||||||
|
|
@ -60,7 +60,7 @@ jobs:
|
||||||
check:
|
check:
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: ghcr.io/linkerd/dev:v21-rust
|
container: ghcr.io/linkerd/dev:v22-rust
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
|
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
|
||||||
- run: just rs-fetch
|
- run: just rs-fetch
|
||||||
|
|
@ -70,7 +70,7 @@ jobs:
|
||||||
name: test
|
name: test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
container: ghcr.io/linkerd/dev:v21-rust
|
container: ghcr.io/linkerd/dev:v22-rust
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
|
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
|
||||||
- run: just rs-fetch
|
- run: just rs-fetch
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ jobs:
|
||||||
shellcheck:
|
shellcheck:
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
container: ghcr.io/linkerd/dev:v21-tools
|
container: ghcr.io/linkerd/dev:v22-tools
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
|
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
|
||||||
- run: bin/shellcheck-all
|
- run: bin/shellcheck-all
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.28.0
|
// protoc-gen-go v1.28.1
|
||||||
// protoc v3.20.0
|
// protoc v3.20.0
|
||||||
// source: common/net.proto
|
// source: common/net.proto
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.28.0
|
// protoc-gen-go v1.28.1
|
||||||
// protoc v3.20.0
|
// protoc v3.20.0
|
||||||
// source: viz.proto
|
// source: viz.proto
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.28.0
|
// protoc-gen-go v1.28.1
|
||||||
// protoc v3.20.0
|
// protoc v3.20.0
|
||||||
// source: viz_tap.proto
|
// source: viz_tap.proto
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue