Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update M2K notifications #52

Merged
merged 1 commit into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 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
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"'
masayag marked this conversation as resolved.
Show resolved Hide resolved
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:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will have to wait to one of two: PR to the generator or Pr to the notification plugin, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see it on the main of janus idp (https://github.com/janus-idp/backstage-plugins/blob/main/plugins/notifications-backend/src/openapi.yaml) is it not already merged? There are so many projects to propagate a change in a given project, I am totally lost as to where it should be merged to be available to us (the showcase I guess?)

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]
Loading