This is an automated email from the ASF dual-hosted git repository.

xiaoyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shenyu.git


The following commit(s) were added to refs/heads/master by this push:
     new a1c6502b68 Support `Contribute with Gitpod`. (#5610)
a1c6502b68 is described below

commit a1c6502b68413809bde90c4b2c213e337b69f793
Author: Kerwin Bryant <kerwin...@qq.com>
AuthorDate: Thu Aug 8 14:04:15 2024 +0800

    Support `Contribute with Gitpod`. (#5610)
    
    Co-authored-by: xiaoyu <xia...@apache.org>
---
 .devcontainer/devcontainer.json | 38 ++++++++++++++++++++++++++++++
 .gitpod.yml                     | 51 +++++++++++++++++++++++++++++++++++++++++
 .licenserc.yaml                 |  1 +
 README.md                       |  3 +++
 pom.xml                         |  4 +++-
 5 files changed, 96 insertions(+), 1 deletion(-)

diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
new file mode 100644
index 0000000000..0ddefc8232
--- /dev/null
+++ b/.devcontainer/devcontainer.json
@@ -0,0 +1,38 @@
+{
+  "name": "Shenyu DevContainer",
+  "image": "mcr.microsoft.com/devcontainers/base:ubuntu",
+  "features": {
+      "ghcr.io/devcontainers/features/java:1": {
+          "version": "17",
+          "installMaven": "true",
+          "installGradle": "false"
+      },
+      "ghcr.io/devcontainers/features/node:1": {
+          "version": "20"
+      },
+      "ghcr.io/devcontainers/features/git-lfs:1.1.0": {}
+  },
+  "customizations": {
+      "vscode": {
+          "settings": {},
+          // same extensions as Gitpod, should match /.gitpod.yml
+          "extensions": [
+              "vscjava.vscode-java-pack",
+              "editorconfig.editorconfig",
+              "dbaeumer.vscode-eslint",
+              "stylelint.vscode-stylelint",
+              "DavidAnson.vscode-markdownlint",
+              "ms-azuretools.vscode-docker",
+              "cweijan.vscode-database-client2",
+              "GitHub.vscode-pull-request-github"
+          ]
+      }
+  },
+  "portsAttributes": {
+      "8000": {
+          "label": "Shenyu Admin",
+          "onAutoForward": "notify"
+      }
+  },
+  "postCreateCommand": "java -version"
+}
diff --git a/.gitpod.yml b/.gitpod.yml
new file mode 100644
index 0000000000..43008e844a
--- /dev/null
+++ b/.gitpod.yml
@@ -0,0 +1,51 @@
+additionalRepositories:
+    - url: https://github.com/apache/shenyu-dashboard.git
+      checkoutLocation: frontend
+
+tasks:
+
+    - name: Run backend
+      before: cd ./shenyu-admin
+      command: |
+          gp sync-await setup-backend
+          mvn spring-boot:run
+
+    - name: Run frontend
+      before: cd ../frontend
+      command: |
+          gp sync-await setup-frontend && gp ports await 9095
+          npm start
+      openMode: split-right
+
+    - name: Setup backend
+      init: |
+          sdk install java 17.0.11.fx-zulu < /dev/null
+          sdk default java 17.0.11.fx-zulu < /dev/null
+          mvn clean install -DskipTests
+      command: |
+          gp sync-done setup-backend
+          exit 0
+
+    - name: Setup frontend
+      before: cd ../frontend
+      init: |
+          npm install
+      command: |
+          gp sync-done setup-frontend
+          exit 0
+      openMode: split-right
+
+vscode:
+    extensions:
+        - vscjava.vscode-java-pack
+        - editorconfig.editorconfig
+        - dbaeumer.vscode-eslint
+        - stylelint.vscode-stylelint
+        - DavidAnson.vscode-markdownlint
+        - ms-azuretools.vscode-docker
+        - cweijan.vscode-database-client2
+        - GitHub.vscode-pull-request-github
+
+ports:
+    - port: 9095
+      onOpen: ignore
diff --git a/.licenserc.yaml b/.licenserc.yaml
index 283764387c..7d51206dec 100644
--- a/.licenserc.yaml
+++ b/.licenserc.yaml
@@ -39,6 +39,7 @@ header:
     - '**/.gitignore'
     - '**/.gitmodules'
     - '**/.git/**'
+    - '**/.gitpod.yml'
     - '**/.travis.yml'
     - '**/.codecov.yml'
     - '**/.mvn/jvm.config'
diff --git a/README.md b/README.md
index a5b687b248..736ec69ebe 100644
--- a/README.md
+++ b/README.md
@@ -45,6 +45,9 @@
   <a target="_blank" 
href="https://hub.docker.com/r/apache/shenyu-bootstrap/tags";>
     <image src="https://img.shields.io/docker/pulls/apache/shenyu-bootstrap"; 
alt="Docker Pulls"/>
   </a>
+  <a target="_blank" 
href="https://gitpod.io/#https://github.com/apache/shenyu";>
+    <image 
src="https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod&color=green"/>
+  </a>
 </p>
 <br/>
 
diff --git a/pom.xml b/pom.xml
index 9531b12c38..5cbaac0f8c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -396,7 +396,7 @@
                 <artifactId>pagehelper</artifactId>
                 <version>${pagehelper.version}</version>
             </dependency>
-            
+
             <dependency>
                 <groupId>org.springdoc</groupId>
                 <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
@@ -783,6 +783,8 @@
                         
<exclude>**/.mvn/wrapper/maven-wrapper.properties</exclude>
                         <!-- GitHub files -->
                         <exclude>**/.github/**</exclude>
+                        <!-- Gitpod files -->
+                        <exclude>**/.gitpod.yml</exclude>
                         <!-- document files -->
                         <exclude>**/*.md</exclude>
                         <excldue>**/*.MD</excldue>

Reply via email to