Skip to content

Commit

Permalink
fix: Make devcontainer able to pre-commit (#11153)
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Clucas <alan@clucas.org>
  • Loading branch information
Joibel authored and terrytangyuan committed Jul 19, 2023
1 parent 5ef42ee commit dcc4f58
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .devcontainer/devcontainer.json
Expand Up @@ -16,4 +16,8 @@
"onCreateCommand": ".devcontainer/pre-build.sh",
"workspaceMount": "source=${localWorkspaceFolder},target=/home/vscode/go/src/github.com/argoproj/argo-workflows,type=bind",
"workspaceFolder": "/home/vscode/go/src/github.com/argoproj/argo-workflows"
"remoteEnv": {
"PATH": "${containerEnv:PATH}:/home/vscode/go/bin",
"GOPATH": "/home/vscode/go"
}
}
7 changes: 7 additions & 0 deletions .devcontainer/pre-build.sh
Expand Up @@ -15,5 +15,12 @@ kubectl cluster-info
# install kit
curl -q https://raw.githubusercontent.com/kitproj/kit/main/install.sh | sh

# install protocol buffer compiler (protoc)
sudo apt update
sudo apt install -y protobuf-compiler

# Make sure go path is owned by vscode
sudo chown -R vscode:vscode /home/vscode/go

# download dependencies and do first-pass compile
CI=1 kit pre-up

0 comments on commit dcc4f58

Please sign in to comment.