From 862e29fe04a467f718220a19ce62de68459b95ce Mon Sep 17 00:00:00 2001 From: Liora Milbaum Date: Sat, 16 Mar 2024 15:52:12 +0200 Subject: [PATCH] devcontainer for dev environment setup --- .devcontainer/devcontainer.json | 15 +++++++++++++++ .github/workflows/devcontainer.yml | 18 ++++++++++++++++++ DEVELOPMENT.md | 4 ++++ 3 files changed, 37 insertions(+) create mode 100644 .devcontainer/devcontainer.json create mode 100644 .github/workflows/devcontainer.yml diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000000..270f3f09f17 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,15 @@ +{ + "name": "Tekton pipeline", + "image": "mcr.microsoft.com/vscode/devcontainers/base:ubuntu-22.04", + "features": { + "ghcr.io/devcontainers/features/go:1.3.0": { + "version": "1.22.1" + }, + "ghcr.io/mpriscella/features/kind:1.0.1": { + "version": "0.22.0" + }, + "ghcr.io/devcontainers-contrib/features/pre-commit:2.0.17": { + "version": "3.6.2" + } + } +} diff --git a/.github/workflows/devcontainer.yml b/.github/workflows/devcontainer.yml new file mode 100644 index 00000000000..17175b52bc4 --- /dev/null +++ b/.github/workflows/devcontainer.yml @@ -0,0 +1,18 @@ +name: 'build' + pull_request: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + + - name: Checkout (GitHub) + uses: actions/checkout@v4.1.1 + + - name: Build and run dev container task + uses: devcontainers/ci@v0.3.1900000348 + with: + runCmd: pwd \ No newline at end of file diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index f3992d3e21f..283dc608d25 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -356,6 +356,10 @@ optional: As a convenience, the [Tekton plumbing project](https://github.com/tek --user=$(gcloud config get-value core/account) ``` +#### Using [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers) + +- Follow the instruction for [getting up and running](https://code.visualstudio.com/docs/devcontainers/tutorial) + --- ## Developing and testing