From 2784c8fa6b04538d0640507695231c85033f84cd Mon Sep 17 00:00:00 2001 From: Kerwin Bryant Date: Wed, 31 Jul 2024 19:28:31 +0800 Subject: [PATCH] Optimize the execution efficiency of Gitpod tasks (#2422) --- .gitpod.Dockerfile | 7 ------- .gitpod.yml | 46 +++++++++++++++++++++++++++++----------------- 2 files changed, 29 insertions(+), 24 deletions(-) delete mode 100644 .gitpod.Dockerfile diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile deleted file mode 100644 index 7bfd3167cc7..00000000000 --- a/.gitpod.Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM gitpod/workspace-full - -USER gitpod - -RUN bash -c ". /home/gitpod/.sdkman/bin/sdkman-init.sh && \ - sdk install java 17.0.12-amzn && \ - sdk default java 17.0.12-amzn" diff --git a/.gitpod.yml b/.gitpod.yml index 84e8df6d67d..c13fbe042c8 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,27 +1,33 @@ -image: - file: .gitpod.Dockerfile tasks: - - name: Setup - init: | - cp -r contrib/ide/vscode .vscode - mvn clean install - cd web-app - yarn install - command: | - gp sync-done setup - exit 0 + - name: Run backend + before: cd manager command: | - gp sync-await setup - - cd manager + gp sync-await setup-backend mvn spring-boot:run + - name: Run frontend + before: cd web-app + command: | + gp sync-await setup-frontend + yarn start --public-host "`gp url 4200`" + 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-await setup + gp sync-done setup-backend + exit 0 - cd web-app - yarn start + - name: Setup frontend + init: | + cd web-app && yarn install + command: | + gp sync-done setup-frontend + exit 0 openMode: split-right vscode: @@ -39,3 +45,9 @@ ports: - port: 4200 name: Hertzbeat onOpen: open-browser + + - port: 1157 + onOpen: ignore + + - port: 1158 + onOpen: ignore