From df8cfa7439db8014f3575cbc5a60e1986975aa92 Mon Sep 17 00:00:00 2001 From: Vincent Shen Date: Thu, 30 May 2024 22:18:36 -0700 Subject: [PATCH] Add gitpod file --- .gitpod.Dockerfile | 14 ++++++++++++++ .gitpod.yml | 10 ++++++++++ 2 files changed, 24 insertions(+) create mode 100644 .gitpod.Dockerfile create mode 100644 .gitpod.yml diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile new file mode 100644 index 000000000..c409df21e --- /dev/null +++ b/.gitpod.Dockerfile @@ -0,0 +1,14 @@ +FROM gitpod/workspace-full + +# Install go +RUN rm -rf $HOME/go $HOME/go-packages + +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 +RUN bash -c "source ~/.bashrc && source ~/.bashrc.d/300-go" + +RUN export CUSTOM_GO_VERSION=$(curl -sSL "https://raw.githubusercontent.com/ComplianceAsCode/compliance-operator/master/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 diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 000000000..6692ad962 --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,10 @@ +image: + file: .gitpod.Dockerfile + +vscode: + extensions: + - golang.go + - premparihar.gotestexplorer + - eamodio.gitlens # cool git extension with a bunch of extra features + +