3 | Scriptler allows you to store/edit/execute Groovy scripts on any of the
4 | nodes... no need for copy paste Groovy code anymore. Beside
5 | administer your scripts, Scriptler also provides a way to share scripts
6 | between users via hosted script catalogs on the internet.
7 |
5 | Expands to the return value of the Scriptler script. The script must have the "Permission" box checked. If the script attempts to use the build parameter, it must have the "Restriction" box checked, for the execution to be restricted to the built-in node.
6 |
2 | Execute a scriptler script with a job, this allows the automation of many administration tasks or to provide prepared scripts for privileged users.
3 | Select the script you want to execute during the build. The scripts available are the ones marked by the admin as 'allow for users with RunScripts permission'.
4 |
5 | The parameters can be passed via job params or by creating these in this builder config.
6 |
\
3 | 您还可以通过 POST 到 URL /scriptler/run/<your-script-id> 运行脚本,可选参数包括 node、script(替代脚本文本)、contentType 以及为存储脚本定义的参数。
4 | modificationRequiredApproval=由于您缺少 Overall/RunScripts 权限,您的修改将被放入脚本批准队列。您仍然可以按原样运行脚本。
5 | executiononclient=此执行在代理 JVM 中进行...
6 | SelectionNode=选择节点
7 | ParametersDescription=定义脚本参数
8 | Parameters=参数
9 | ParameterName=名称:
10 | ParameterValue=值:
11 | Run=运行
12 | Result=结果
13 | ScriptNotFound=// 未找到脚本源文件
14 | NotApprovedYet=脚本尚未批准,建议要求管理员批准。
15 | NotApprovedYetButHasRightWarn=脚本尚未批准
16 | NotApprovedYetButHasRightInfo=运行后将自动批准。
17 |
--------------------------------------------------------------------------------
/src/test/resources/JENKINS-13518.json:
--------------------------------------------------------------------------------
1 | {
2 | "":"",
3 | "builder": {
4 | "builderId": "",
5 | "defineParams": false,
6 | "kind": "org.jenkinsci.plugins.scriptler.builder.ScriptlerBuilder",
7 | "parameters": [
8 | {
9 | "name": "",
10 | "value": ""
11 | },
12 | {
13 | "name": "",
14 | "value": ""
15 | }
16 | ],
17 | "scriptlerScriptId": "testOutput.groovy",
18 | "stapler-class": "org.jenkinsci.plugins.scriptler.builder.ScriptlerBuilder"
19 | },
20 | "core:apply": "",
21 | "description": "",
22 | "displayNameOrNull": "",
23 | "name": "test",
24 | "properties": {
25 | "hudson-model-ParametersDefinitionProperty": {},
26 | "org-jenkinsci-plugins-envinject-EnvInjectJobProperty": {},
27 | "stapler-class-bag": "true"
28 | },
29 | "scm": {
30 | "value": "0"
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/test/java/org/jenkinsci/plugins/scriptler/ScriptlerManagementHelper.java:
--------------------------------------------------------------------------------
1 | package org.jenkinsci.plugins.scriptler;
2 |
3 | import hudson.ExtensionList;
4 | import hudson.model.FileParameterValue;
5 | import java.io.IOException;
6 | import java.nio.charset.StandardCharsets;
7 | import java.nio.file.Files;
8 | import java.nio.file.Path;
9 | import org.apache.commons.fileupload2.core.FileItem;
10 |
11 | public final class ScriptlerManagementHelper {
12 |
13 | private ScriptlerManagementHelper() {}
14 |
15 | public static void saveScript(String scriptId, String contents, boolean nonAdministerUsing) throws IOException {
16 | final ScriptlerManagement scriptler = ExtensionList.lookupSingleton(ScriptlerManagement.class);
17 |
18 | Path f = Files.createTempFile("script", "-temp.groovy");
19 | Files.writeString(f, contents, StandardCharsets.UTF_8);
20 | FileItem> fi = new FileParameterValue.FileItemImpl2(f.toFile());
21 | scriptler.saveScript(fi, nonAdministerUsing, scriptId);
22 | Files.delete(f);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/org/jenkinsci/plugins/scriptler/share/ScriptInfoCatalog.java:
--------------------------------------------------------------------------------
1 | package org.jenkinsci.plugins.scriptler.share;
2 |
3 | import hudson.ExtensionList;
4 | import hudson.ExtensionPoint;
5 | import java.util.ArrayList;
6 | import java.util.List;
7 |
8 | public interface ScriptInfoCatalog extends ExtensionPoint {
9 |
10 | @SuppressWarnings({"rawtypes", "unchecked"}) // unfortunate but necessary given ExtensionList's API
11 | static List> all() {
12 | ExtensionList extensions = ExtensionList.lookup(ScriptInfoCatalog.class);
13 | List> typedExtensions = new ArrayList<>();
14 | for (ScriptInfoCatalog catalog : extensions) {
15 | typedExtensions.add(catalog);
16 | }
17 | return typedExtensions;
18 | }
19 |
20 | T getEntryById(String id);
21 |
22 | CatalogInfo getInfo();
23 |
24 | List getEntries();
25 |
26 | String getScriptSource(T scriptInfo);
27 |
28 | String getDisplayName();
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/org/jenkinsci/plugins/scriptler/TransientActionProvider.java:
--------------------------------------------------------------------------------
1 | package org.jenkinsci.plugins.scriptler;
2 |
3 | import edu.umd.cs.findbugs.annotations.NonNull;
4 | import hudson.Extension;
5 | import hudson.model.Action;
6 | import hudson.model.Job;
7 | import java.util.Collection;
8 | import java.util.Collections;
9 | import jenkins.model.TransientActionFactory;
10 |
11 | @Extension
12 | @SuppressWarnings("rawtypes")
13 | public class TransientActionProvider extends TransientActionFactory {
14 | @Override
15 | public Class type() {
16 | return Job.class;
17 | }
18 |
19 | @NonNull
20 | @Override
21 | public Collection extends Action> createFor(@NonNull Job target) {
22 | return Collections.singleton(new ScriptlerManagement() {
23 | @Override
24 | public String getIconFileName() {
25 | return null;
26 | }
27 |
28 | @Override
29 | public String getDisplayName() {
30 | return null;
31 | }
32 | });
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2011-2016 Dominik Bartholdi
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining
6 | a copy of this software and associated documentation files (the
7 | "Software"), to deal in the Software without restriction, including
8 | without limitation the rights to use, copy, modify, merge, publish,
9 | distribute, sublicense, and/or sell copies of the Software, and to
10 | permit persons to whom the Software is furnished to do so, subject
11 | to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be
14 | included in all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
20 | ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
21 | CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 |
--------------------------------------------------------------------------------
/src/test/java/org/jenkinsci/plugins/scriptler/tokenmacro/ScriptlerTokenMacroTest.java:
--------------------------------------------------------------------------------
1 | package org.jenkinsci.plugins.scriptler.tokenmacro;
2 |
3 | import static org.junit.jupiter.api.Assertions.assertEquals;
4 |
5 | import hudson.model.FreeStyleBuild;
6 | import hudson.model.FreeStyleProject;
7 | import hudson.util.StreamTaskListener;
8 | import org.jenkinsci.plugins.scriptler.ScriptlerManagementHelper;
9 | import org.jenkinsci.plugins.tokenmacro.TokenMacro;
10 | import org.junit.jupiter.api.Test;
11 | import org.jvnet.hudson.test.JenkinsRule;
12 | import org.jvnet.hudson.test.junit.jupiter.WithJenkins;
13 |
14 | @WithJenkins
15 | class ScriptlerTokenMacroTest {
16 |
17 | @Test
18 | void testExecutesScript(JenkinsRule j) throws Exception {
19 | ScriptlerManagementHelper.saveScript("dummy.groovy", "return \"hello world ${build.number}\"", true);
20 |
21 | FreeStyleProject p = j.createFreeStyleProject("foo");
22 | FreeStyleBuild b = p.scheduleBuild2(0).get();
23 |
24 | final StreamTaskListener listener = StreamTaskListener.fromStdout();
25 |
26 | assertEquals("hello world 1", TokenMacro.expand(b, listener, "${SCRIPTLER,scriptId=\"dummy.groovy\"}"));
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkinsci/plugins/scriptler/Messages_zh_CN.properties:
--------------------------------------------------------------------------------
1 | display_name=脚本管理器
2 | description=在任何代理或内置节点上存储/编辑/运行脚本。
3 | scriptdirectorytitle=脚本存储位置:
4 | not_groovy_script=这不是一个 Groovy 脚本:{0}
5 | script_loaded_from_directory=此脚本在文件系统中被发现,请描述它!
6 | uploadtext=从本地系统选择要上传的 Groovy 脚本。
7 | node_not_found=节点 [{0}] 未找到!
8 | node_not_online=选定的节点 [{0}] 未在线,因此无法执行脚本!请选择另一个节点或在重试前启动它。
9 | agent_no_channel=代理没有通道
10 | download_failed=从目录 [{1}] 导入脚本 [{0}] 失败。
11 | builder_name=脚本管理器脚本
12 | scriptNotFound=找不到 ID 为 [{0}] 的脚本
13 | scriptNotDefined=脚本管理器未定义脚本,请修复您的配置!
14 | scriptNotUsableInBuildStep=脚本 [{0}] 无法在构建步骤中使用,请检查您的配置。
15 | scriptNotApprovedYet=脚本 [{0}] 尚未批准,请考虑要求管理员批准它。
16 | scriptExecutionFailed=脚本 [{0}] 执行失败
17 | parameterExtractionFailed=从请求中读取参数失败
18 | scriptSourceNotFound=无法加载脚本 [{0}] 的源代码
19 | skipParameter=跳过参数 [{0}],此名称为内部使用,请重命名!
20 | resultPrefix=结果:
21 | no_parameters_defined=此作业未定义任何参数。
22 | tokenmacro_AdminScriptOnly=脚本 [{0}] 存在,但标记为仅供管理员使用,因此不允许在令牌宏中使用。
23 | tokenmacro_ScriptDoesNotExist=找不到 ID 为 [{0}] 的脚本。
24 | permissons_title=脚本管理器
25 | permissons_configure_description=允许配置脚本管理器脚本,允许细粒度调整而不是给每个人 Overall/RunScripts 权限
26 | permissons_runScript_description=允许执行脚本管理器脚本以及插入/修改脚本管理器构建步骤,允许细粒度调整而不是给每个人 Overall/RunScripts 权限
27 |
--------------------------------------------------------------------------------
/src/test/java/org/jenkinsci/plugins/scriptler/ScriptlerPermissionsTests.java:
--------------------------------------------------------------------------------
1 | package org.jenkinsci.plugins.scriptler;
2 |
3 | import static org.junit.jupiter.api.Assertions.assertTrue;
4 |
5 | import hudson.security.SecurityRealm;
6 | import io.jenkins.plugins.casc.misc.ConfiguredWithCode;
7 | import io.jenkins.plugins.casc.misc.JenkinsConfiguredWithCodeRule;
8 | import io.jenkins.plugins.casc.misc.junit.jupiter.WithJenkinsConfiguredWithCode;
9 | import org.junit.jupiter.api.Test;
10 | import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
11 | import org.springframework.security.core.Authentication;
12 |
13 | @WithJenkinsConfiguredWithCode
14 | class ScriptlerPermissionsTests {
15 | @ConfiguredWithCode("/casc.yaml")
16 | @Test
17 | void permissionsAreAvailableOnStartup(JenkinsConfiguredWithCodeRule rule) throws Exception {
18 | SecurityRealm realm = rule.createDummySecurityRealm();
19 | rule.jenkins.setSecurityRealm(realm);
20 |
21 | UsernamePasswordAuthenticationToken authRequest = new UsernamePasswordAuthenticationToken("user", "user");
22 | Authentication a = realm.getSecurityComponents().manager2.authenticate(authRequest);
23 | assertTrue(rule.jenkins.hasPermission2(a, ScriptlerPermissions.CONFIGURE));
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/test/java/org/jenkinsci/plugins/scriptler/util/ScriptHelperTest.java:
--------------------------------------------------------------------------------
1 | package org.jenkinsci.plugins.scriptler.util;
2 |
3 | import static org.junit.jupiter.api.Assertions.assertEquals;
4 | import static org.junit.jupiter.api.Assertions.assertFalse;
5 | import static org.junit.jupiter.api.Assertions.assertNotNull;
6 |
7 | import java.nio.charset.StandardCharsets;
8 | import java.nio.file.Files;
9 | import java.nio.file.Paths;
10 | import org.jenkinsci.plugins.scriptler.share.ScriptInfo;
11 | import org.junit.jupiter.api.Test;
12 |
13 | class ScriptHelperTest {
14 |
15 | @Test
16 | void testGetJson() throws Exception {
17 | final String content =
18 | Files.readString(Paths.get("src/test/resources/parsing_test.groovy"), StandardCharsets.UTF_8);
19 | assertFalse(content.isBlank(), "no content from file");
20 |
21 | final ScriptInfo info = ScriptHelper.extractScriptInfo(content);
22 | assertNotNull(info, "ScriptInfo is null");
23 | assertEquals("1.300", info.getCore());
24 | assertEquals("print hello", info.getName());
25 | assertEquals("some cool comment", info.getComment());
26 | assertEquals("Dude mac", info.getAuthors().get(0).getName());
27 | assertEquals("param1", info.getParameters().get(0));
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/org/jenkinsci/plugins/scriptler/NodeNames.java:
--------------------------------------------------------------------------------
1 | package org.jenkinsci.plugins.scriptler;
2 |
3 | import edu.umd.cs.findbugs.annotations.NonNull;
4 | import java.util.HashMap;
5 | import java.util.List;
6 | import java.util.Map;
7 |
8 | public final class NodeNames {
9 | public static final String BUILT_IN = "(built-in)";
10 | public static final String ALL = "(all)";
11 | public static final String ALL_AGENTS = "(all agents)";
12 | private static final Map DEPRECATED_ALIASES;
13 |
14 | static {
15 | Map> deprecatedNames =
16 | Map.of(BUILT_IN, List.of("(master)", "(controller)"), ALL_AGENTS, List.of("(all slaves)"));
17 |
18 | Map aliases = new HashMap<>();
19 | deprecatedNames.forEach(
20 | (newName, oldNames) -> oldNames.forEach(oldName -> aliases.put(normalizeName(oldName), newName)));
21 |
22 | DEPRECATED_ALIASES = Map.copyOf(aliases);
23 | }
24 |
25 | @NonNull
26 | private static String normalizeName(@NonNull String name) {
27 | return name.toLowerCase();
28 | }
29 |
30 | @NonNull
31 | public static String normalizeNodeName(@NonNull String nodeName) {
32 | return DEPRECATED_ALIASES.getOrDefault(normalizeName(nodeName), nodeName);
33 | }
34 |
35 | private NodeNames() {}
36 | }
37 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkinsci/plugins/scriptler/ScriptlerManagement/sidepanel_ja.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright (c) 2009-2010, Dominik Bartholdi
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | runEditScripts=スクリプトの実行 / 編集
24 | addNewScript=スクリプトの追加
25 | remoteScriptCatalogs=リモートスクリプトカタログ
26 | scriptlerSettings=Scriptlerの設定
27 | gitRepo=Git リポジトリ
28 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkinsci/plugins/scriptler/ScriptlerManagement/show_ja.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright (c) 2012, Dominik Bartholdi
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 | title=スクリプトの詳細
23 | Name=名前
24 | IdDescription=スクリプトのID
25 | ParamDefinition=必須パラメータ
26 | Comment=コメント
27 | Parameters=パラメータ
28 | ParameterName=名前:
29 | ParameterDefaultValue=デフォルト値:
30 | Script=スクリプト
31 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkinsci/plugins/scriptler/ScriptlerManagement/show.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright (c) 2012, Dominik Bartholdi
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 | title=Script Details
23 | Name=Name
24 | IdDescription=unique script id
25 | ParamDefinition=Required parameters
26 | Comment=Comment
27 | Parameters=Parameters
28 | ParameterName=Name:
29 | ParameterDefaultValue=Default:
30 | Script=Script
31 |
--------------------------------------------------------------------------------
/src/test/resources/scriptler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
15 |
20 |
25 |
26 |
27 |
28 | default
29 | https://raw2.github.com/christ66/scriptler-plugin/master/src/test/resources/scriptler-catalog.xml
30 | https://raw2.github.com/christ66/scriptler-plugin/master/src/test/resources{0}
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkinsci/plugins/scriptler/ScriptlerManagement/index_ja.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright (c) 2009-2010, Dominik Bartholdi
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | title=Scriptler
24 | intro=Scriptlerでは、スクリプトの作成/編集/削除/実行を行えます。また、スクリプトを実行する際、どのノードで実行するかを選択することができます。
25 | scriptdirectorytext=スクリプトが保存されているパス:
26 | fileNotAvailable=ファイルが存在しません
27 | noScriptsAvailable=実行出来るスクリプトが存在しません。リモートカタログからインポートするか、スクリプトを作成することができます。
28 | freeForRunSciptPermission=''RunScripts''権限があるユーザに許可されています
--------------------------------------------------------------------------------
/src/main/resources/org/jenkinsci/plugins/scriptler/ScriptlerManagement/runScript_ja.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright (c) 2009-2010, Dominik Bartholdi
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | title=スクリプトの実行
24 | intro=スクリプトを実行したいスレーブを選択してください。必要に応じてスクリプトを編集することができます。編集した結果は、保存されているスクリプトには反映されません。
25 | executiononclient=下記で選択したスレーブのJVM上で実行されます
26 | SelectionNode=ノードを選択
27 | ParametersDescription=スクリプトのパラメータを定義
28 | Parameters=パラメータ
29 | ParameterName=名前:
30 | ParameterValue=値:
31 | Run=実行
32 | Result=結果
33 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkinsci/plugins/scriptler/builder/ScriptlerBuilder/config_ja.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright (c) 2012, Dominik Bartholdi
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | RequiredParameters=必須パラメータ:
24 | NoPermission = 権限がないので、実行されるスクリプトを変更できません。
25 | WarnNoScript = スクリプトが定義されていません。Scriptlerで定義してください。
26 | Script=スクリプト
27 | ViewScript=選択されたスクリプトを参照する
28 | ParametersDescription=スクリプトのパラメータを定義
29 | Parameters=パラメータ
30 | ParameterName=名前:
31 | ParameterValue=値:
32 | DeleteParameter=削除
33 | AddParameter=パラメータの追加
34 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkinsci/plugins/scriptler/ScriptlerManagement/catalog_ja.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright (c) 2009-2010, Dominik Bartholdi
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | title=リモートスクリプトカタログ
24 | intro=カタログを通じて、共有サーバからGroovyスクリプトをインポートすることができます。\
25 | 保存アイコンをクリックすると、スクリプトがローカルディレクトリにインポートされます。\
26 | カタログに応じて、あなたのスクリプトを共有することもできます。\
27 | https://github.com/jenkinsci/jenkins-scripts にプルリクエストを送るか、\
28 | scriptlerweb にアップロードしてください。
--------------------------------------------------------------------------------
/src/main/resources/org/jenkinsci/plugins/scriptler/ScriptlerManagement/settings_ja.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright (c) 2009-2010, Dominik Bartholdi
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | title=Scriptlerの設定
24 | intro=必要に応じて、Scriptlerを設定します
25 | scriptlerdirectorytext=Scriptlerの設定が保存されているパス:
26 | scriptdirectorytext=スクリプトが保存されているパス:
27 | disabledtext=リモートカタログは無効になっています。この機能を使用するには最初に有効にする必要があります。
28 | Directories=ディレクトリ:
29 | Disable\ remote\ catalog=リモートカタログの無効化
30 | Allow\ RunScript\ permission=RunScriptユーザによる実行の許可
31 | Allow\ RunScript\ editing=RunScriptユーザによる編集の許可
32 | Submit=保存
33 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkinsci/plugins/scriptler/ScriptlerManagement/edit_ja.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright (c) 2009-2010, Dominik Bartholdi
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 | title=スクリプトの編集
23 | Name=名前
24 | IdDescription=変更した場合、スクリプトがコピーされます
25 | uploadtext=Groovyスクリプトをローカルシステムから選択してください。現在のファイルに上書きされます。
26 | Permission = 権限
27 | PermissionDescription = ''RunScripts''権限があるユーザに、スクリプトの実行を許可するか
28 | Comment=コメント
29 | ParametersDescription=スクリプトのパラメータを定義
30 | Parameters=パラメータ
31 | ParameterName=名前:
32 | ParameterDefaultValue=デフォルト値:
33 | DeleteParameter=削除
34 | AddParameter=パラメータの追加
35 | Script=スクリプト
36 | Submit=保存
37 |
--------------------------------------------------------------------------------
/src/main/java/org/jenkinsci/plugins/scriptler/ScriptlerPermissions.java:
--------------------------------------------------------------------------------
1 | package org.jenkinsci.plugins.scriptler;
2 |
3 | import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
4 | import hudson.init.InitMilestone;
5 | import hudson.init.Initializer;
6 | import hudson.security.Permission;
7 | import hudson.security.PermissionGroup;
8 | import hudson.security.PermissionScope;
9 | import jenkins.model.Jenkins;
10 |
11 | public final class ScriptlerPermissions {
12 | public static final PermissionGroup SCRIPTLER_PERMISSIONS =
13 | new PermissionGroup(ScriptlerManagement.class, Messages._permissons_title());
14 |
15 | public static final Permission CONFIGURE = new Permission(
16 | SCRIPTLER_PERMISSIONS,
17 | "Configure",
18 | Messages._permissons_configure_description(),
19 | Jenkins.ADMINISTER,
20 | PermissionScope.JENKINS);
21 |
22 | public static final Permission RUN_SCRIPTS = new Permission(
23 | SCRIPTLER_PERMISSIONS,
24 | "RunScripts",
25 | Messages._permissons_runScript_description(),
26 | CONFIGURE,
27 | PermissionScope.JENKINS);
28 |
29 | public static final Permission BYPASS_APPROVAL = Jenkins.ADMINISTER;
30 |
31 | private ScriptlerPermissions() {}
32 |
33 | @SuppressFBWarnings(
34 | value = "RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT",
35 | justification = "getEnabled return value discarded")
36 | @Initializer(after = InitMilestone.PLUGINS_STARTED, before = InitMilestone.EXTENSIONS_AUGMENTED)
37 | public static void ensurePermissionsRegistered() {
38 | CONFIGURE.getEnabled();
39 | RUN_SCRIPTS.getEnabled();
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/main/java/org/jenkinsci/plugins/scriptler/util/ByIdSorter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License
3 | *
4 | * Copyright (c) 2010, Dominik Bartholdi
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in
14 | * all copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | * THE SOFTWARE.
23 | */
24 | package org.jenkinsci.plugins.scriptler.util;
25 |
26 | import java.io.Serializable;
27 | import java.util.Comparator;
28 | import org.jenkinsci.plugins.scriptler.config.NamedResource;
29 |
30 | /**
31 | * @author imod
32 | *
33 | */
34 | public class ByIdSorter implements Comparator, Serializable {
35 | public int compare(NamedResource o1, NamedResource o2) {
36 | return o1.getId().compareTo(o2.getId());
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkinsci/plugins/scriptler/ScriptlerManagement/catalog.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright (c) 2009-2010, Dominik Bartholdi
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | title=Remote Script Catalogs
24 | intro=The catalog allows you to import groovy scripts from a shared source server. \
25 | Just click the save icon and the script will be imported to your local script directory. Depending on the catalog, you can share your scripts too \
26 | - e.g. send pull requests to https://github.com/jenkinsci/jenkins-scripts. \
27 | Go on, share some of your scripts too :)
28 | importScript=Import script
29 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkinsci/plugins/scriptler/git/GitScriptlerRepository/index.jelly:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkinsci/plugins/scriptler/builder/ScriptlerBuilder/config.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright (c) 2012, Dominik Bartholdi
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | RequiredParameters=Required Parameters:
24 | NoPermission = You don''t have permission to change Scriptler steps, changes will not be applied!
25 | WarnNoScript = No scripts are defined. Please define one at
26 | Script=Script
27 | ViewScript=view selected script
28 | ParametersDescription=Define script parameters
29 | Parameters=Parameters
30 | ParameterName=Name:
31 | ParameterValue=Value:
32 | DeleteParameter=Delete
33 | AddParameter=Add Parameter
34 | PropagateParams=Propagate Job params to script
35 |
--------------------------------------------------------------------------------
/src/main/resources/org/jenkinsci/plugins/scriptler/ScriptlerManagement/settings.properties:
--------------------------------------------------------------------------------
1 | # The MIT License
2 | #
3 | # Copyright (c) 2009-2010, Dominik Bartholdi
4 | #
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy
6 | # of this software and associated documentation files (the "Software"), to deal
7 | # in the Software without restriction, including without limitation the rights
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | # copies of the Software, and to permit persons to whom the Software is
10 | # furnished to do so, subject to the following conditions:
11 | #
12 | # The above copyright notice and this permission notice shall be included in
13 | # all copies or substantial portions of the Software.
14 | #
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | # THE SOFTWARE.
22 |
23 | title=Scriptler Settings
24 | intro=Configure the Scriptler to fit your requirements
25 | scriptlerdirectorytext=The Scriptler configurations are saved at:
26 | scriptdirectorytext=The scripts are saved at:
27 | disabledtext=Remote catalogs are disabled, you have to enable first to use this feature!
28 | Directories=Directories:
29 | Disable\ remote\ catalog=Disable remote catalog
30 | Allow\ RunScript\ permission=Allow RunScript permission
31 | Allow\ RunScript\ editing=Allow RunScript editing
32 | Submit=Submit
33 |
--------------------------------------------------------------------------------
/src/main/java/org/jenkinsci/plugins/scriptler/share/gh/CentralScriptJsonCatalog.java:
--------------------------------------------------------------------------------
1 | package org.jenkinsci.plugins.scriptler.share.gh;
2 |
3 | import hudson.Extension;
4 | import hudson.ExtensionList;
5 | import hudson.model.DownloadService.Downloadable;
6 | import java.io.IOException;
7 | import java.util.Collection;
8 | import java.util.List;
9 | import net.sf.json.JSONArray;
10 | import net.sf.json.JSONObject;
11 | import net.sf.json.JsonConfig;
12 | import org.jenkinsci.plugins.scriptler.share.ScriptInfo;
13 |
14 | /**
15 | * Gets the GitHub catalog from jenkins.io/org.jenkinsci.plugins.scriptler.CentralScriptJsonCatalog.json.
16 | * This catalog is updated by a background crawler on the Jenkins infrastructure site.
17 | *
18 | * @author Dominik Bartholdi (imod)
19 | */
20 | @Extension
21 | public class CentralScriptJsonCatalog extends Downloadable {
22 |
23 | public static final String ID = "org.jenkinsci.plugins.scriptler.CentralScriptJsonCatalog";
24 |
25 | public CentralScriptJsonCatalog() {
26 | super(ID);
27 | }
28 |
29 | @SuppressWarnings("unchecked")
30 | public Collection getScripts() throws IOException {
31 | JSONObject d = getData();
32 | if (d == null) {
33 | return List.of();
34 | }
35 | JsonConfig config = new JsonConfig();
36 | config.setCollectionType(List.class);
37 | config.setRootClass(ScriptInfo.class);
38 | return JSONArray.toCollection(d.getJSONArray("list"), config);
39 | }
40 |
41 | public static CentralScriptJsonCatalog getCatalog() {
42 | return ExtensionList.lookupSingleton(CentralScriptJsonCatalog.class);
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/src/main/java/org/jenkinsci/plugins/scriptler/util/UIHelper.java:
--------------------------------------------------------------------------------
1 | package org.jenkinsci.plugins.scriptler.util;
2 |
3 | import edu.umd.cs.findbugs.annotations.NonNull;
4 | import java.util.List;
5 | import java.util.Optional;
6 | import java.util.function.Function;
7 | import net.sf.json.JSONObject;
8 | import org.jenkinsci.plugins.scriptler.config.Parameter;
9 |
10 | public final class UIHelper {
11 |
12 | private UIHelper() {}
13 |
14 | /**
15 | * Extracts the parameters from the given request
16 | *
17 | * @param json
18 | * the request potentially containing parameters
19 | * @return parameters - might be an empty array, but never null.
20 | */
21 | @NonNull
22 | public static List extractParameters(JSONObject json) {
23 | final JSONObject defineParams = json.optJSONObject("defineParams");
24 | if (defineParams == null || defineParams.isNullObject()) {
25 | // no parameters defined
26 | return List.of();
27 | }
28 |
29 | final List