diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 0f02b16cb860..922c4d224e26 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -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" + } } diff --git a/.devcontainer/pre-build.sh b/.devcontainer/pre-build.sh index cc048baf2252..1b89cb91a514 100755 --- a/.devcontainer/pre-build.sh +++ b/.devcontainer/pre-build.sh @@ -22,5 +22,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