From f1ca904c98f539ed45a72ac711f977838f0927db Mon Sep 17 00:00:00 2001 From: Matthias Rampke Date: Tue, 9 Mar 2021 20:53:31 +0000 Subject: [PATCH] Fully automate dev setup with Gitpod This commit implements a fully-automated development setup using Gitpod.io, an online IDE for GitLab, GitHub, and Bitbucket that enables Dev-Environments-As-Code. This makes it easy for anyone to get a ready-to-code workspace for any branch, issue or pull request almost instantly with a single click. Similar to prometheus/prometheus#7749. Signed-off-by: Matthias Rampke --- .gitpod.Dockerfile | 6 ++++++ .gitpod.yml | 13 +++++++++++++ CONTRIBUTING.md | 2 ++ 3 files changed, 21 insertions(+) create mode 100644 .gitpod.Dockerfile create mode 100644 .gitpod.yml diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile new file mode 100644 index 0000000..3c7c99c --- /dev/null +++ b/.gitpod.Dockerfile @@ -0,0 +1,6 @@ +FROM gitpod/workspace-full + +RUN sudo apt-get update && \ + sudo apt-get install -y netcat-traditional socat && \ + sudo apt-get clean && \ + sudo rm -rf /var/lib/apt/lists/* \ No newline at end of file diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 0000000..1b8d941 --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,13 @@ +tasks: + - init: go get + command: go build . && ./statsd_exporter + - command: printf 'Try:\n\n\techo "test.gauge:42|g" | socat - TCP:127.0.0.1:9125\n\n' + +ports: + - port: 9102 + onOpen: open-preview + - port: 9125 + onOpen: ignore + +image: + file: .gitpod.Dockerfile \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 40503ed..c52e07f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,3 +16,5 @@ Prometheus uses GitHub to manage reviews of pull requests. and the _Formatting and style_ section of Peter Bourgon's [Go: Best Practices for Production Environments](http://peter.bourgon.org/go-in-production/#formatting-and-style). + +* [![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/prometheus/statsd_exporter)