-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #639 from grafana/gotjosh/update-mimir-prometheus-…
…37b408c Merge upstream prometheus/prometheus at `37b408c`
- Loading branch information
Showing
92 changed files
with
1,741 additions
and
1,748 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
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 |
---|---|---|
@@ -1,15 +1,33 @@ | ||
FROM gitpod/workspace-full | ||
|
||
# Set Node.js version as an environment variable. | ||
ENV CUSTOM_NODE_VERSION=16 | ||
ENV CUSTOM_GO_VERSION=1.19 | ||
ENV GOPATH=$HOME/go-packages | ||
ENV GOROOT=$HOME/go | ||
ENV PATH=$GOROOT/bin:$GOPATH/bin:$PATH | ||
|
||
# Install and use the specified Node.js version via nvm. | ||
RUN bash -c ". .nvm/nvm.sh && nvm install ${CUSTOM_NODE_VERSION} && nvm use ${CUSTOM_NODE_VERSION} && nvm alias default ${CUSTOM_NODE_VERSION}" | ||
|
||
# Ensure nvm uses the default Node.js version in all new shells. | ||
RUN echo "nvm use default &>/dev/null" >> ~/.bashrc.d/51-nvm-fix | ||
RUN curl -fsSL https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz | tar xzs \ | ||
&& printf '%s\n' 'export GOPATH=/workspace/go' \ | ||
'export PATH=$GOPATH/bin:$PATH' > $HOME/.bashrc.d/300-go | ||
|
||
# Remove any existing Go installation in $HOME path. | ||
RUN rm -rf $HOME/go $HOME/go-packages | ||
|
||
# Export go environment variables. | ||
RUN echo "export GOPATH=/workspace/go" >> ~/.bashrc.d/300-go && \ | ||
echo "export GOBIN=\$GOPATH/bin" >> ~/.bashrc.d/300-go && \ | ||
echo "export GOROOT=${HOME}/go" >> ~/.bashrc.d/300-go && \ | ||
echo "export PATH=\$GOROOT/bin:\$GOBIN:\$PATH" >> ~/.bashrc | ||
|
||
# Reload the environment variables to ensure go environment variables are | ||
# available in subsequent commands. | ||
RUN bash -c "source ~/.bashrc && source ~/.bashrc.d/300-go" | ||
|
||
# Fetch the Go version dynamically from the Prometheus go.mod file and Install Go in $HOME path. | ||
RUN export CUSTOM_GO_VERSION=$(curl -sSL "https://raw.githubusercontent.com/prometheus/prometheus/main/go.mod" | awk '/^go/{print $2".0"}') && \ | ||
curl -fsSL "https://dl.google.com/go/go${CUSTOM_GO_VERSION}.linux-amd64.tar.gz" | \ | ||
tar -xz -C $HOME | ||
|
||
# Fetch the goyacc parser version dynamically from the Prometheus Makefile | ||
# and install it globally in $GOBIN path. | ||
RUN GOYACC_VERSION=$(curl -fsSL "https://raw.githubusercontent.com/prometheus/prometheus/main/Makefile" | awk -F'=' '/GOYACC_VERSION \?=/{gsub(/ /, "", $2); print $2}') && \ | ||
go install "golang.org/x/tools/cmd/goyacc@${GOYACC_VERSION}" |
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
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
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
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
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
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
Oops, something went wrong.