diff --git a/move2kube/m2k.sw.yml b/move2kube/m2k.sw.yml index f3638417..3458d9df 100644 --- a/move2kube/m2k.sw.yml +++ b/move2kube/m2k.sw.yml @@ -93,9 +93,12 @@ states: refName: createNotification arguments: title: " \"Transformation \" + .transformationId + \" waiting for Q&A\" " - message: '"Please go to your Move2Kube instance and answers to questions in order to continue the Move2Kube workflow"' + message: '"Please go to your move2kube instance and answer the questions in order to continue the Move2Kube workflow"' origin: "Move2Kube Workflow" topic: "Move2Kube Workflow" + actions: + - title: "Move2Kube waiting Q&A" + url: "$SECRET.move2kube_url + \"/workspaces/\"+ .workspaceId + \"/projects/\" + .projectId + \"/outputs/\"+ .transformId " transition: SaveTransformationOutput - name: SaveTransformationOutput type: operation @@ -155,7 +158,7 @@ states: refName: createNotification arguments: title: '"Move2Kube workflow " + $WORKFLOW.instanceId + " failed"' - message: '"Move2Kube workflow " + $WORKFLOW.instanceId + " on workspace " + .workspaceId + " and project " + .projectId + " failed with exit message: "+ .exitMessage + "

Error: " + .error' + message: '"Move2Kube workflow " + $WORKFLOW.instanceId + " on workspace " + .workspaceId + " and project " + .projectId + " failed with exit message: "+ .exitMessage + "\n\nError: " + .error' origin: "Move2Kube Workflow" topic: "Move2Kube Workflow" end: true @@ -177,7 +180,7 @@ states: refName: createNotification arguments: title: '"Move2Kube workflow " + $WORKFLOW.instanceId + " success"' - message: '"Move2Kube workflow " + $WORKFLOW.instanceId + " on workspace " + .workspaceId + " and project " + .projectId + " was successful"' - origin: "Move2Kube Worflow" + message: '"Move2Kube workflow " + $WORKFLOW.instanceId + " on workspace " + .workspaceId + " and project " + .projectId + " was successful; the output is available in the branch " + .targetBranch + " of your git repository "+ .repositoryURL"' + origin: "Move2Kube Workflow" topic: "Move2Kube Workflow" end: true diff --git a/move2kube/specs/notifications.yaml b/move2kube/specs/notifications.yaml index f9467906..e5bf02e1 100644 --- a/move2kube/specs/notifications.yaml +++ b/move2kube/specs/notifications.yaml @@ -17,13 +17,6 @@ paths: summary: Create notification description: Create notification operationId: createNotification - parameters: - - name: notifications-secret - in: header - description: Notification secret - required: true - schema: - type: string requestBody: description: Create a new notification content: @@ -238,6 +231,24 @@ components: type: string message: type: string + actions: + type: array + items: + type: object + properties: + title: + type: string + url: + type: string + required: [title, url] topic: type: string + targetUsers: + type: array + items: + type: string + targetGroups: + type: array + items: + type: string required: [origin, title] \ No newline at end of file