Skip to content

Commit

Permalink
fix: add testdata to BUILD.yaml & rename variable
Browse files Browse the repository at this point in the history
  • Loading branch information
yaohui-wyh committed Jun 22, 2022
1 parent df113fc commit 89539a3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
1 change: 1 addition & 0 deletions components/ide/jetbrains/image/status/BUILD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ packages:
- name: app
type: go
srcs:
- "testdata/**"
- "**/*.go"
- "go.mod"
- "go.sum"
Expand Down
10 changes: 5 additions & 5 deletions components/ide/jetbrains/image/status/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func main() {
repoRoot := wsInfo.GetCheckoutLocation()
gitpodConfig, err := parseGitpodConfig(repoRoot)
if err != nil {
log.WithError(err).Error("parse .gitpod.yml failed")
log.WithError(err).Error("failed to parse .gitpod.yml")
}
version_2022_1, _ := version.NewVersion("2022.1")
if version_2022_1.LessThanOrEqual(backendVersion) {
Expand Down Expand Up @@ -370,13 +370,13 @@ func updateVMOptions(config *gitpod.GitpodConfig, alias string, content string)
vmoptions = deduplicateVMOption(vmoptions, userVMOptions, filterFunc)
}

// user-defined vmoptions (.gitpod.yml)
// project-defined vmoptions (.gitpod.yml)
if config != nil {
productConfig := getProductConfig(config, alias)
if productConfig != nil {
userVMOptions = strings.Fields(productConfig.VMOptions)
if len(userVMOptions) > 0 {
vmoptions = deduplicateVMOption(vmoptions, userVMOptions, filterFunc)
projectVMOptions := strings.Fields(productConfig.VMOptions)
if len(projectVMOptions) > 0 {
vmoptions = deduplicateVMOption(vmoptions, projectVMOptions, filterFunc)
}
}
}
Expand Down
6 changes: 5 additions & 1 deletion components/ide/jetbrains/image/status/testdata/.gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2022 Gitpod GmbH. All rights reserved.
# Licensed under the GNU Affero General Public License (AGPL).
# See License-AGPL.txt in the project root for license information.

# see https://github.com/gitpod-io/spring-petclinic/blob/master/.gitpod.yml
tasks:
- init: ./mvnw package -DskipTests
Expand All @@ -24,4 +28,4 @@ jetbrains:
version: both
vmoptions: "-Xmx3g"
goland:
vmoptions: "-Xmx4096m -XX:MaxRAMPercentage=75"
vmoptions: "-Xmx4096m -XX:MaxRAMPercentage=75"

0 comments on commit 89539a3

Please sign in to comment.