大声道撒旦

This commit is contained in:
dengqichen 2024-12-30 18:04:16 +08:00
parent d02ad72d92
commit e9eb0d0b82
2 changed files with 60 additions and 4 deletions

View File

@ -2,6 +2,8 @@ package com.qqchen.deploy.backend.deploy.dto.variables;
import com.qqchen.deploy.backend.workflow.annotation.CodeEditorConfig; import com.qqchen.deploy.backend.workflow.annotation.CodeEditorConfig;
import com.qqchen.deploy.backend.workflow.annotation.SchemaProperty; import com.qqchen.deploy.backend.workflow.annotation.SchemaProperty;
import com.qqchen.deploy.backend.workflow.annotation.SchemaPropertyDataSource;
import com.qqchen.deploy.backend.workflow.annotation.SchemaPropertyDataSourceParam;
import lombok.Data; import lombok.Data;
/** /**
@ -10,11 +12,65 @@ import lombok.Data;
@Data @Data
public class JenkinsBaseBuildVariables { public class JenkinsBaseBuildVariables {
@SchemaProperty(
title = "绑定三方Jenkins",
description = "请选择三方Jenkins",
required = true,
dataSource = @SchemaPropertyDataSource(
type = "api",
url = "/api/v1/external-system/list?type=JENKINS",
valueField = "id",
labelField = "name"
),
order = 1
)
private String externalSystemId;
@SchemaProperty(
title = "绑定Jenkins视图",
description = "Jenkins视图名称",
required = true,
dataSource = @SchemaPropertyDataSource(
type = "api",
url = "/api/v1/jenkins-view/list",
valueField = "viewName",
labelField = "viewName",
dependsOn = {"externalSystemId"},
params = {
@SchemaPropertyDataSourceParam(name = "externalSystemId", value = "${externalSystemId}")
}
),
order = 2
)
private String jenkinsViewName;
@SchemaProperty(
title = "绑定Jenkins任务",
description = "Jenkins任务名称",
required = true,
dataSource = @SchemaPropertyDataSource(
type = "api",
url = "/api/v1/jenkins-job/list",
valueField = "jobName",
labelField = "jobName",
dependsOn = {"projectId", "viewName"},
params = {
@SchemaPropertyDataSourceParam(name = "externalSystemId", value = "${externalSystemId}"),
@SchemaPropertyDataSourceParam(name = "viewName", value = "${viewName}")
}
),
order = 3
)
private String jenkinsJobName;
@SchemaProperty( @SchemaProperty(
title = "分支名称", title = "分支名称",
description = "Git分支名称", description = "Git分支名称",
required = true, required = true,
order = 1 order = 4
) )
private String branch; private String branch;
@ -22,7 +78,7 @@ public class JenkinsBaseBuildVariables {
@SchemaProperty( @SchemaProperty(
title = "构建产物路径", title = "构建产物路径",
description = "构建产物路径", description = "构建产物路径",
order = 2 order = 5
) )
private String artifactPath; private String artifactPath;
@ -44,7 +100,7 @@ public class JenkinsBaseBuildVariables {
autoComplete = true, autoComplete = true,
folding = true folding = true
), ),
order = 3 order = 6
) )
private String script; private String script;

View File

@ -231,7 +231,7 @@ public class BpmnConverter {
* @param extensionElements 扩展元素 * @param extensionElements 扩展元素
*/ */
private void configureServiceTask(ServiceTask serviceTask, WorkflowDefinitionGraphNode node, Process process, Map<String, List<ExtensionElement>> extensionElements) { private void configureServiceTask(ServiceTask serviceTask, WorkflowDefinitionGraphNode node, Process process, Map<String, List<ExtensionElement>> extensionElements) {
if (node.getLocalVariables() != null && node.getLocalVariables().has("delegate")) { if (node.getPanelVariables() != null && node.getPanelVariables().has("delegate")) {
String delegate = node.getLocalVariables().get("delegate").asText(); String delegate = node.getLocalVariables().get("delegate").asText();
serviceTask.setImplementationType("delegateExpression"); serviceTask.setImplementationType("delegateExpression");
serviceTask.setImplementation(delegate); serviceTask.setImplementation(delegate);