From 32784ddbec315e0b44da3ece839fbf3de41ae5ef Mon Sep 17 00:00:00 2001 From: Damien Coraboeuf Date: Mon, 6 Jan 2025 20:30:34 +0100 Subject: [PATCH] #1374 Fixing workflow trigger --- .../tests/av/ACCAutoVersioningWorkflow.kt | 5 +- .../workflows/ACCEnvironmentsWorkflows.kt | 9 +- .../environments/CreateSlotWorkflow.graphql | 2 +- .../kdsl/connector/graphql/schema/schema.json | 673 +++++++++++++++--- .../workflows/SlotWorkflowExtensions.kt | 4 +- 5 files changed, 599 insertions(+), 94 deletions(-) diff --git a/ontrack-kdsl-acceptance/src/test/java/net/nemerosa/ontrack/kdsl/acceptance/tests/av/ACCAutoVersioningWorkflow.kt b/ontrack-kdsl-acceptance/src/test/java/net/nemerosa/ontrack/kdsl/acceptance/tests/av/ACCAutoVersioningWorkflow.kt index 27dc062946..432f0cf72d 100644 --- a/ontrack-kdsl-acceptance/src/test/java/net/nemerosa/ontrack/kdsl/acceptance/tests/av/ACCAutoVersioningWorkflow.kt +++ b/ontrack-kdsl-acceptance/src/test/java/net/nemerosa/ontrack/kdsl/acceptance/tests/av/ACCAutoVersioningWorkflow.kt @@ -4,7 +4,6 @@ import net.nemerosa.ontrack.kdsl.acceptance.tests.scm.withMockScmRepository import net.nemerosa.ontrack.kdsl.acceptance.tests.support.uid import net.nemerosa.ontrack.kdsl.acceptance.tests.support.waitUntil import net.nemerosa.ontrack.kdsl.connector.graphql.schema.type.SlotPipelineStatus -import net.nemerosa.ontrack.kdsl.connector.graphql.schema.type.SlotWorkflowTrigger import net.nemerosa.ontrack.kdsl.spec.extension.av.autoVersioning import net.nemerosa.ontrack.kdsl.spec.extension.environments.environments import net.nemerosa.ontrack.kdsl.spec.extension.environments.workflows.addWorkflow @@ -42,7 +41,7 @@ class ACCAutoVersioningWorkflow : AbstractACCAutoVersioningTestSupport() { // Adding a workflow to this slot slot.addWorkflow( - trigger = SlotWorkflowTrigger.DEPLOYING, + trigger = SlotPipelineStatus.RUNNING, workflowYaml = """ name: Deployment nodes: @@ -74,7 +73,7 @@ class ACCAutoVersioningWorkflow : AbstractACCAutoVersioningTestSupport() { timeout = 10_000, interval = 1_000, ) { - ontrack.environments.findPipelineById(pipeline.id)?.status == SlotPipelineStatus.DEPLOYED + ontrack.environments.findPipelineById(pipeline.id)?.status == SlotPipelineStatus.DONE } // We expect the GitOps repository to contain the new version diff --git a/ontrack-kdsl-acceptance/src/test/java/net/nemerosa/ontrack/kdsl/acceptance/tests/environments/workflows/ACCEnvironmentsWorkflows.kt b/ontrack-kdsl-acceptance/src/test/java/net/nemerosa/ontrack/kdsl/acceptance/tests/environments/workflows/ACCEnvironmentsWorkflows.kt index 24958a36d7..b079b1817e 100644 --- a/ontrack-kdsl-acceptance/src/test/java/net/nemerosa/ontrack/kdsl/acceptance/tests/environments/workflows/ACCEnvironmentsWorkflows.kt +++ b/ontrack-kdsl-acceptance/src/test/java/net/nemerosa/ontrack/kdsl/acceptance/tests/environments/workflows/ACCEnvironmentsWorkflows.kt @@ -4,7 +4,6 @@ import net.nemerosa.ontrack.kdsl.acceptance.tests.AbstractACCDSLTestSupport import net.nemerosa.ontrack.kdsl.acceptance.tests.support.uid import net.nemerosa.ontrack.kdsl.acceptance.tests.support.waitUntil import net.nemerosa.ontrack.kdsl.connector.graphql.schema.type.SlotPipelineStatus -import net.nemerosa.ontrack.kdsl.connector.graphql.schema.type.SlotWorkflowTrigger import net.nemerosa.ontrack.kdsl.spec.extension.environments.environments import net.nemerosa.ontrack.kdsl.spec.extension.environments.workflows.addWorkflow import org.junit.jupiter.api.Test @@ -29,7 +28,7 @@ class ACCEnvironmentsWorkflows : AbstractACCDSLTestSupport() { // Adding a workflow to this slot slot.addWorkflow( - trigger = SlotWorkflowTrigger.CREATION, + trigger = SlotPipelineStatus.CANDIDATE, workflowYaml = """ name: Creation nodes: @@ -50,7 +49,7 @@ class ACCEnvironmentsWorkflows : AbstractACCDSLTestSupport() { timeout = 10_000, interval = 1_000, ) { - ontrack.environments.findPipelineById(pipeline.id)?.status == SlotPipelineStatus.DEPLOYING + ontrack.environments.findPipelineById(pipeline.id)?.status == SlotPipelineStatus.RUNNING } } @@ -73,7 +72,7 @@ class ACCEnvironmentsWorkflows : AbstractACCDSLTestSupport() { // Adding a workflow to this slot slot.addWorkflow( - trigger = SlotWorkflowTrigger.DEPLOYING, + trigger = SlotPipelineStatus.RUNNING, workflowYaml = """ name: Deployment nodes: @@ -95,7 +94,7 @@ class ACCEnvironmentsWorkflows : AbstractACCDSLTestSupport() { timeout = 10_000, interval = 1_000, ) { - ontrack.environments.findPipelineById(pipeline.id)?.status == SlotPipelineStatus.DEPLOYED + ontrack.environments.findPipelineById(pipeline.id)?.status == SlotPipelineStatus.DONE } } diff --git a/ontrack-kdsl/src/main/graphql/net/nemerosa/ontrack/kdsl/connector/graphql/schema/environments/CreateSlotWorkflow.graphql b/ontrack-kdsl/src/main/graphql/net/nemerosa/ontrack/kdsl/connector/graphql/schema/environments/CreateSlotWorkflow.graphql index 00a4df6ce7..17022cabea 100644 --- a/ontrack-kdsl/src/main/graphql/net/nemerosa/ontrack/kdsl/connector/graphql/schema/environments/CreateSlotWorkflow.graphql +++ b/ontrack-kdsl/src/main/graphql/net/nemerosa/ontrack/kdsl/connector/graphql/schema/environments/CreateSlotWorkflow.graphql @@ -1,6 +1,6 @@ mutation CreateSlotWorkflow( $slotId: String!, - $trigger: SlotWorkflowTrigger!, + $trigger: SlotPipelineStatus!, $workflowYaml: String!, ) { addSlotWorkflow(input: { diff --git a/ontrack-kdsl/src/main/graphql/net/nemerosa/ontrack/kdsl/connector/graphql/schema/schema.json b/ontrack-kdsl/src/main/graphql/net/nemerosa/ontrack/kdsl/connector/graphql/schema/schema.json index 7dbd4730cc..086b73e4b9 100644 --- a/ontrack-kdsl/src/main/graphql/net/nemerosa/ontrack/kdsl/connector/graphql/schema/schema.json +++ b/ontrack-kdsl/src/main/graphql/net/nemerosa/ontrack/kdsl/connector/graphql/schema/schema.json @@ -678,7 +678,7 @@ "name": null, "ofType": { "kind": "ENUM", - "name": "SlotWorkflowTrigger", + "name": "SlotPipelineStatus", "ofType": null } }, @@ -5398,7 +5398,62 @@ { "name": "slotPipelines", "description": "List of pipelines this build is associated with", - "args": [], + "args": [ + { + "name": "status", + "description": "Filtering on the pipeline status", + "type": { + "kind": "ENUM", + "name": "SlotPipelineStatus", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "sortedByEnvironment", + "description": "Sorting by decreasing environment order", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "SlotPipeline" + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "currentDeployments", + "description": "Gets the list of slots where this build is actually deployed", + "args": [ + { + "name": "qualifier", + "description": "Qualifier to use", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": "\"\"" + } + ], "type": { "kind": "NON_NULL", "name": null, @@ -6719,12 +6774,12 @@ }, { "kind": "OBJECT", - "name": "Slot", + "name": "SlotPipeline", "ofType": null }, { "kind": "OBJECT", - "name": "SlotPipeline", + "name": "EnvironmentBuildCount", "ofType": null } ] @@ -15115,6 +15170,64 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "INPUT_OBJECT", + "name": "DeleteSlotInput", + "description": "Input type for the deleteSlot mutation.", + "fields": null, + "inputFields": [ + { + "name": "slotId", + "description": "slotId field", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DeleteSlotPayload", + "description": "Output type for the deleteSlot mutation.", + "fields": [ + { + "name": "errors", + "description": "List of errors", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "UserError", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Payload", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, { "kind": "INPUT_OBJECT", "name": "DeleteSlotWorkflowInput", @@ -16950,6 +17063,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "image", + "description": "image field", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "slots", "description": "List of slots for this environment", @@ -16998,6 +17123,61 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "EnvironmentBuildCount", + "description": "Number of environments where a build is deployed", + "fields": [ + { + "name": "id", + "description": "ID of the count (build ID)", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "count", + "description": "Number of environments where a build is deployed", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "build", + "description": "Associated build", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Build", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, { "kind": "INPUT_OBJECT", "name": "EnvironmentFilter", @@ -26112,6 +26292,72 @@ }, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "data", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "LicensedFeatureData" + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "LicensedFeatureData", + "description": null, + "fields": [ + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "value", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null } ], "inputFields": null, @@ -32348,6 +32594,29 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "deleteSlot", + "description": "Deletes a slot using its ID", + "args": [ + { + "name": "input", + "description": "Input for the mutation", + "type": { + "kind": "INPUT_OBJECT", + "name": "DeleteSlotInput", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "DeleteSlotPayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "startSlotPipeline", "description": "Starts a pipeline for a slot and a build", @@ -34301,6 +34570,11 @@ "name": "DeleteSlotAdmissionRuleConfigPayload", "ofType": null }, + { + "kind": "OBJECT", + "name": "DeleteSlotPayload", + "ofType": null + }, { "kind": "OBJECT", "name": "DeleteSlotWorkflowPayload", @@ -36158,6 +36432,33 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "slotGraph", + "description": "Graph of environment slots for a project", + "args": [ + { + "name": "qualifier", + "description": "Qualifier for the slots", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": "\"\"" + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "SlotGraph", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "indicatorPortfolios", "description": "List of indicator portfolios associated with this project, through its labels.", @@ -41873,6 +42174,33 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "environmentById", + "description": "Getting an environment using its ID", + "args": [ + { + "name": "id", + "description": "ID of the environment", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Environment", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "environmentByName", "description": "Getting an environment using its name", @@ -45732,7 +46060,7 @@ "name": null, "ofType": { "kind": "ENUM", - "name": "SlotWorkflowTrigger", + "name": "SlotPipelineStatus", "ofType": null } }, @@ -56158,6 +56486,16 @@ "ofType": null }, "defaultValue": "20" + }, + { + "name": "deployable", + "description": "If true, restricts the list of builds to the ones which can actually be deployed.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null } ], "type": { @@ -56409,6 +56747,61 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "SlotAdmissionRuleData", + "description": null, + "fields": [ + { + "name": "user", + "description": "user field", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "timestamp", + "description": "timestamp field", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "LocalDateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "data", + "description": "data field", + "args": [], + "type": { + "kind": "SCALAR", + "name": "JSON", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, { "kind": "OBJECT", "name": "SlotAdmissionRuleInput", @@ -56436,6 +56829,95 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "SlotAdmissionRuleOverride", + "description": null, + "fields": [ + { + "name": "user", + "description": "user field", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "timestamp", + "description": "timestamp field", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "LocalDateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "message field", + "args": [], + "type": { + "kind": "SCALAR", + "name": "JSON", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "SlotGraph", + "description": "Graph of slots for a project", + "fields": [ + { + "name": "slotNodes", + "description": "slotNodes field", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "SlotNode" + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, { "kind": "OBJECT", "name": "SlotList", @@ -56470,6 +56952,56 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "SlotNode", + "description": "Node for a slot in a graph", + "fields": [ + { + "name": "slot", + "description": "slot field", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Slot", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "parents", + "description": "parents field", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Slot" + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, { "kind": "OBJECT", "name": "SlotPipeline", @@ -56715,45 +57247,13 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "timestamp", - "description": "timestamp field", - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "LocalDateTime", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "user", - "description": "user field", - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "data", "description": "data field", "args": [], "type": { - "kind": "SCALAR", - "name": "JSON", + "kind": "OBJECT", + "name": "SlotAdmissionRuleData", "ofType": null }, "isDeprecated": false, @@ -56764,21 +57264,25 @@ "description": "override field", "args": [], "type": { - "kind": "SCALAR", - "name": "Boolean", + "kind": "OBJECT", + "name": "SlotAdmissionRuleOverride", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "overrideMessage", - "description": "overrideMessage field", + "name": "overridden", + "description": "Flag to check if the rule has been overridden", "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null @@ -56874,17 +57378,33 @@ "name": "message", "description": "message field", "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "dataChanged", + "description": "dataChanged field", + "args": [], "type": { "kind": "SCALAR", - "name": "String", + "name": "Boolean", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "override", - "description": "override field", + "name": "overridden", + "description": "overridden field", "args": [], "type": { "kind": "SCALAR", @@ -57006,12 +57526,28 @@ "args": [], "type": { "kind": "OBJECT", - "name": "SlotPipelineAdmissionRuleStatus", + "name": "SlotAdmissionRuleOverride", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, + { + "name": "overridden", + "description": "Flag to check if the rule has been overridden", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "canBeOverridden", "description": "True if the user is allowed to override this rule", @@ -57257,13 +57793,13 @@ "interfaces": null, "enumValues": [ { - "name": "ONGOING", + "name": "CANDIDATE", "description": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "DEPLOYING", + "name": "RUNNING", "description": null, "isDeprecated": false, "deprecationReason": null @@ -57275,7 +57811,7 @@ "deprecationReason": null }, { - "name": "DEPLOYED", + "name": "DONE", "description": null, "isDeprecated": false, "deprecationReason": null @@ -57329,7 +57865,7 @@ "name": null, "ofType": { "kind": "ENUM", - "name": "SlotWorkflowTrigger", + "name": "SlotPipelineStatus", "ofType": null } }, @@ -57449,35 +57985,6 @@ "enumValues": null, "possibleTypes": null }, - { - "kind": "ENUM", - "name": "SlotWorkflowTrigger", - "description": "List of triggers for the slot workflows", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ - { - "name": "CREATION", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "DEPLOYING", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "DEPLOYED", - "description": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "possibleTypes": null - }, { "kind": "INPUT_OBJECT", "name": "StandardBuildFilter", diff --git a/ontrack-kdsl/src/main/java/net/nemerosa/ontrack/kdsl/spec/extension/environments/workflows/SlotWorkflowExtensions.kt b/ontrack-kdsl/src/main/java/net/nemerosa/ontrack/kdsl/spec/extension/environments/workflows/SlotWorkflowExtensions.kt index f6ab9a4509..bf5323513b 100644 --- a/ontrack-kdsl/src/main/java/net/nemerosa/ontrack/kdsl/spec/extension/environments/workflows/SlotWorkflowExtensions.kt +++ b/ontrack-kdsl/src/main/java/net/nemerosa/ontrack/kdsl/spec/extension/environments/workflows/SlotWorkflowExtensions.kt @@ -2,12 +2,12 @@ package net.nemerosa.ontrack.kdsl.spec.extension.environments.workflows import net.nemerosa.ontrack.kdsl.connector.graphql.convert import net.nemerosa.ontrack.kdsl.connector.graphql.schema.environments.CreateSlotWorkflowMutation -import net.nemerosa.ontrack.kdsl.connector.graphql.schema.type.SlotWorkflowTrigger +import net.nemerosa.ontrack.kdsl.connector.graphql.schema.type.SlotPipelineStatus import net.nemerosa.ontrack.kdsl.connector.graphqlConnector import net.nemerosa.ontrack.kdsl.spec.extension.environments.Slot fun Slot.addWorkflow( - trigger: SlotWorkflowTrigger, + trigger: SlotPipelineStatus, workflowYaml: String, ) { graphqlConnector.mutate(