The Unified and Autonomous Development Platform
fix: Error when inserting variables into trivy cache step (OD-2546)
Robin Shen81d14f1274ab
diff --git a/server-core/src/main/java/io/onedev/server/buildspec/step/SetupCacheStep.java b/server-core/src/main/java/io/onedev/server/buildspec/step/SetupCacheStep.javaindex ade6bea3e1..6ca6f4b0f8 100644--- a/server-core/src/main/java/io/onedev/server/buildspec/step/SetupCacheStep.java+++ b/server-core/src/main/java/io/onedev/server/buildspec/step/SetupCacheStep.java@@ -72,16 +72,11 @@ public class SetupCacheStep extends Step {public void setLoadKeys(List<String> loadKeys) {this.loadKeys = loadKeys;}-- @SuppressWarnings("unused")- private static List<InputSuggestion> suggestVariables(String matchWith) {- return BuildSpec.suggestVariables(matchWith, true, true, false);- }-+@Editable(order=300, name="Cache Paths", description = "For docker aware executors, this path is inside container, " +"and accepts both absolute path and relative path (relative to <a href='https://docs.onedev.io/concepts#job-workspace' target='_blank'>job workspace</a>). " +"For shell related executors which runs on host machine directly, only relative path is accepted")- @Interpolative(variableSuggester="suggestStaticVariables")+ @Interpolative(variableSuggester="suggestVariables")@Size(min=1, max=100)public List<String> getPaths() {return paths;@@ -107,7 +102,7 @@ public class SetupCacheStep extends Step {@Editable(order=425, description = "Optionally specify files relative to cache path to ignore when " +"detect cache changes. Use '**', '*' or '?' for <a href='https://docs.onedev.io/appendix/path-wildcard' target='_blank'>path wildcard match</a>. " +"Multiple files should be separated by space, and single file containing space should be quoted")- @Interpolative(variableSuggester="suggestStaticVariables")+ @Interpolative(variableSuggester="suggestVariables")@ShowCondition("isUploadIfChanged")public String getChangeDetectionExcludes() {return changeDetectionExcludes;@@ -134,7 +129,7 @@ public class SetupCacheStep extends Step {}@SuppressWarnings("unused")- private static List<InputSuggestion> suggestStaticVariables(String matchWith) {+ private static List<InputSuggestion> suggestVariables(String matchWith) {return BuildSpec.suggestVariables(matchWith, true, false, false);}diff --git a/server-ee b/server-eeindex 2b7de662ca..ec8e735f41 160000--- a/server-ee+++ b/server-ee@@ -1 +1 @@-Subproject commit 2b7de662ca1fb90d20c0fb506b15f46dffcfe2b2+Subproject commit ec8e735f41077139831035a8349d5090c9defa9d