Skip to content

Commit

Permalink
devcontainer for dev environment setup
Browse files Browse the repository at this point in the history
  • Loading branch information
lmilbaum committed Mar 16, 2024
1 parent 742292d commit b99b0d9
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "Tekton pipeline",
"image": "mcr.microsoft.com/vscode/devcontainers/go:1.22",
"features": {
"ghcr.io/devcontainers-contrib/features/pre-commit:2.0.17": {
"version": "3.6.2"
}
}
}
20 changes: 20 additions & 0 deletions .github/workflows/devcontainer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: 'devcontainer'

on:
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:

- name: Checkout (GitHub)
uses: actions/[email protected]

- name: Build and run dev container task
uses: devcontainers/[email protected]
with:
runCmd: pre-commit run --all-files
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,7 @@ repos:
language: system
types: [go]
pass_filenames: false
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.0
hooks:
- id: check-github-actions
4 changes: 4 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)
[![Go Report Card](https://goreportcard.com/badge/tektoncd/pipeline)](https://goreportcard.com/report/tektoncd/pipeline)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/4020/badge)](https://bestpractices.coreinfrastructure.org/projects/4020)
[![devcontainer](https://img.shields.io/static/v1?label=devcontainer&message=enabled&logo=visualstudiocode&color=007ACC&logoColor=007ACC)](https://code.visualstudio.com/docs/devcontainers/containers)

The Tekton Pipelines project provides k8s-style resources for declaring
CI/CD-style pipelines.
Expand Down

0 comments on commit b99b0d9

Please sign in to comment.