Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

devcontainer for dev environment setup #7758

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
devcontainer for dev environment setup
  • Loading branch information
lmilbaum committed Mar 16, 2024
commit b99b0d9ee7c627f8d74b38a7a8848d25042538b9
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/checkout@v4.1.1

- name: Build and run dev container task
uses: devcontainers/ci@v0.3.1900000348
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