Skip to content

Commit

Permalink
Update M2K notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-farache committed Jan 23, 2024
1 parent e96e69c commit dba1dcf
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 11 deletions.
11 changes: 7 additions & 4 deletions move2kube/m2k.sw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,12 @@ states:
refName: createNotification
arguments:
title: " \"Transformation \" + .transformationId + \" waiting for Q&A\" "
message: '"Please go to your <a href=\"" + $SECRET.move2kube_url + "/workspaces/"+ .workspaceId + "/projects/" + .projectId + "/outputs/"+ .transformId + "\">Move2Kube instance</a> and answers to questions in order to continue the Move2Kube workflow"'
message: '"Please go to your move2kube instance and answers to 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
Expand Down Expand Up @@ -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 + " <br><br>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
Expand All @@ -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
25 changes: 18 additions & 7 deletions move2kube/specs/notifications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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]

0 comments on commit dba1dcf

Please sign in to comment.