-
Notifications
You must be signed in to change notification settings - Fork 526
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move
jsonnetfmt
, jsonnet
, goimports
and others install into `to…
…ols/` (#2869) * Move `jsonnetfmt` and `goimports` install into tools/ This will ensure that the version we are using to compile locally is the same version that we are using in CI. The `goimports` was already included in the tools, and so the CI was redundant. Also not, this moves us from the C jsonnet to the Go jsonnet, which looks to introduce slight formatting changes. * Compile jsonnet * Move tk, jb, and jsonnet also into tools/ * Include tools dependency on additional make targets * Include tools Dockerfile * Include tools image build target * Update tools/go.sum * Tidy up image build * Prepare multi-arch docker image with install script The script is used because not all imports in the tools.go are modules which can be imported. The version of the import is determined by matching the nearest module path and installing the import at the version specified in the go.mod. This will allow updates to the go.mod to direct the versions of the tools installed in the docker image. * Stop ignoring the tools to allow docker build * Include entrypoint * Use TOOLS_CMD for docker execution on a few key make targets * Use my image * Fix variable * Mark workdir as git safe * Update drone to publish a tempo-ci-tools image * Fix --platform for image source and use golang:alpine
- Loading branch information
Showing
18 changed files
with
429 additions
and
57 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,3 @@ example/ | |
integration/ | ||
operations/ | ||
opentelemetry-proto/ | ||
tools/ |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,13 +27,6 @@ jobs: | |
with: | ||
go-version: 1.21.x | ||
|
||
- name: Install jsonnetfmt and goimports | ||
run: | | ||
curl -fSL -o jsonnet.tar.gz https://github.com/google/jsonnet/releases/download/v0.17.0/jsonnet-bin-v0.17.0-linux.tar.gz | ||
tar -xvf jsonnet.tar.gz -C /usr/local/bin/ | ||
chmod a+x /usr/local/bin/jsonnetfmt | ||
go install golang.org/x/tools/cmd/[email protected] | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
|
@@ -210,17 +203,6 @@ jobs: | |
with: | ||
go-version: 1.21.x | ||
|
||
- name: Install jsonnet, jsonnet-bundler & tanka | ||
run: | | ||
curl -fSL -o jsonnet.tar.gz https://github.com/google/jsonnet/releases/download/v0.17.0/jsonnet-bin-v0.17.0-linux.tar.gz | ||
tar -xvf jsonnet.tar.gz -C /usr/local/bin/ | ||
chmod a+x /usr/local/bin/jsonnet | ||
go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/[email protected] | ||
curl -fSL -o /usr/local/bin/tk https://github.com/grafana/tanka/releases/download/v0.19.0/tk-linux-amd64 | ||
chmod a+x /usr/local/bin/tk | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
|
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7112,4 +7112,4 @@ | |
"uid": "a6175b9cc7ec20591890117c39580030", | ||
"version": 1, | ||
"weekStart": "" | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1609,4 +1609,4 @@ | |
"title": "Tempo / Reads", | ||
"uid": "", | ||
"version": 0 | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2428,4 +2428,4 @@ | |
"title": "Tempo / Resources", | ||
"uid": "", | ||
"version": 0 | ||
} | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1178,4 +1178,4 @@ | |
"title": "Tempo / Tenants", | ||
"uid": "", | ||
"version": 0 | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1735,4 +1735,4 @@ | |
"title": "Tempo / Writes", | ||
"uid": "", | ||
"version": 0 | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM --platform=$TARGETPLATFORM golang:alpine | ||
|
||
ARG TARGETOS | ||
ARG TARGETARCH | ||
ENV GOOS=$TARGETOS GOARCH=$TARGETARCH | ||
RUN apk --update add --no-cache make git bash | ||
|
||
WORKDIR /tools | ||
COPY tools /tools | ||
RUN /tools/install.sh | ||
COPY tools/entrypoint.sh /bin/entrypoint.sh | ||
ENTRYPOINT [ "/bin/entrypoint.sh" ] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/sh -eu | ||
|
||
if [ -n "${GITHUB_EMAIL+x}" ]; then | ||
git config --global user.email "${GITHUB_EMAIL}" | ||
fi | ||
|
||
if [ -n "${GITHUB_NAME+x}" ]; then | ||
git config --global user.name "${GITHUB_NAME}" | ||
fi | ||
|
||
git config --global --add safe.directory /tools | ||
|
||
exec "$@" |
Oops, something went wrong.