Skip to content

Commit 15768d8

Browse files
authored
[infra] support contribute with Gitpod (apache#2419)
1 parent 2824542 commit 15768d8

File tree

6 files changed

+92
-2
lines changed

6 files changed

+92
-2
lines changed

.devcontainer/devcontainer.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"name": "Hertzbeat DevContainer",
3+
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
4+
"features": {
5+
"ghcr.io/devcontainers/features/java:1": {
6+
"version": "17",
7+
"installMaven": "true",
8+
"installGradle": "false"
9+
},
10+
"ghcr.io/devcontainers/features/node:1": {
11+
"version": "20"
12+
},
13+
"ghcr.io/devcontainers/features/git-lfs:1.1.0": {}
14+
},
15+
"customizations": {
16+
"vscode": {
17+
"settings": {},
18+
// same extensions as Gitpod, should match /.gitpod.yml
19+
"extensions": [
20+
"vscjava.vscode-java-pack",
21+
"editorconfig.editorconfig",
22+
"dbaeumer.vscode-eslint",
23+
"stylelint.vscode-stylelint",
24+
"DavidAnson.vscode-markdownlint",
25+
"ms-azuretools.vscode-docker",
26+
"cweijan.vscode-database-client2",
27+
"GitHub.vscode-pull-request-github"
28+
]
29+
}
30+
},
31+
"portsAttributes": {
32+
"4200": {
33+
"label": "Hertzbeat Web",
34+
"onAutoForward": "notify"
35+
}
36+
},
37+
"postCreateCommand": "java -version"
38+
}

.gitpod.Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM gitpod/workspace-full
2+
3+
USER gitpod
4+
5+
RUN bash -c ". /home/gitpod/.sdkman/bin/sdkman-init.sh && \
6+
sdk install java 17.0.12-amzn && \
7+
sdk default java 17.0.12-amzn"

.gitpod.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
image:
2+
file: .gitpod.Dockerfile
3+
tasks:
4+
- name: Setup
5+
init: |
6+
cp -r contrib/ide/vscode .vscode
7+
mvn clean install
8+
cd web-app
9+
yarn install
10+
command: |
11+
gp sync-done setup
12+
exit 0
13+
- name: Run backend
14+
command: |
15+
gp sync-await setup
16+
17+
cd manager
18+
mvn spring-boot:run
19+
- name: Run frontend
20+
command: |
21+
gp sync-await setup
22+
23+
cd web-app
24+
yarn start
25+
openMode: split-right
26+
27+
vscode:
28+
extensions:
29+
- vscjava.vscode-java-pack
30+
- editorconfig.editorconfig
31+
- dbaeumer.vscode-eslint
32+
- stylelint.vscode-stylelint
33+
- DavidAnson.vscode-markdownlint
34+
- ms-azuretools.vscode-docker
35+
- cweijan.vscode-database-client2
36+
- GitHub.vscode-pull-request-github
37+
38+
ports:
39+
- port: 4200
40+
name: Hertzbeat
41+
onOpen: open-browser

.licenserc.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ header:
6262
- '.stylelintrc'
6363
- '.prettierignore'
6464
- '.prettierrc.js'
65+
- '.gitpod.Dockerfile'
66+
- '.gitpod.yml'
6567
- 'karma.conf.js'
6668
- 'proxy.conf.js'
6769
- '.helmignore'
@@ -92,12 +94,12 @@ header:
9294
- 'web-app/src/style.less'
9395
- 'web-app/src/test.ts'
9496
- 'web-app/src/typings.d.ts'
95-
97+
9698
comment: on-failure
9799

98100
dependency:
99101
files:
100102
- pom.xml
101103
- web-app/package.json
102-
104+
103105

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
[![Docker Pulls](https://img.shields.io/docker/pulls/apache/hertzbeat?style=%20for-the-badge&logo=docker&label=DockerHub%20Download)](https://hub.docker.com/r/apache/hertzbeat)
1919
[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/hertzbeat)](https://artifacthub.io/packages/search?repo=hertzbeat)
2020
[![YouTube Channel Subscribers](https://img.shields.io/youtube/channel/subscribers/UCri75zfWX0GHqJFPENEbLow?logo=youtube&label=YouTube%20Channel)](https://www.youtube.com/channel/UCri75zfWX0GHqJFPENEbLow)
21+
[![Contribute with Gitpod](https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod&color=green)](https://gitpod.io/#https://github.com/apache/hertzbeat)
2122

2223
**Home: [hertzbeat.apache.org](https://hertzbeat.apache.org)**
2324
**Email: <a href="mailto:[email protected]">Mail to `[email protected]`</a> to subscribe mailing lists**

README_CN.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
[![Docker Pulls](https://img.shields.io/docker/pulls/apache/hertzbeat?style=%20for-the-badge&logo=docker&label=DockerHub%20Download)](https://hub.docker.com/r/apache/hertzbeat)
1919
[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/hertzbeat)](https://artifacthub.io/packages/search?repo=hertzbeat)
2020
[![YouTube Channel Subscribers](https://img.shields.io/youtube/channel/subscribers/UCri75zfWX0GHqJFPENEbLow?logo=youtube&label=YouTube%20Channel)](https://www.youtube.com/channel/UCri75zfWX0GHqJFPENEbLow)
21+
[![Contribute with Gitpod](https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod&color=green)](https://gitpod.io/#https://github.com/apache/hertzbeat)
2122

2223

2324
**官网: [hertzbeat.apache.org](https://hertzbeat.apache.org)**

0 commit comments

Comments
 (0)