Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-farache authored and masayag committed Feb 4, 2024
1 parent 33aba50 commit 706747e
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 267 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,54 @@
apiVersion: v1
data:
input.json: |
{
"$id": "classpath:/schema/input.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Input",
"description": "schema for input description",
"type": "object",
"properties": {
"repositoryURL": {
"description": "the git repository URL to be used",
"type": "string",
"examples": [
"https://bitbucket.org/gfarache31/m2k-test"
]
},
"sourceBranch": {
"description": "the branch to download the zip from",
"type": "string"
},
"targetBranch": {
"description": "the branch to create in the repo",
"type": "string"
},
"workspaceId": {
"description": "the ID of the Move2Kube workspace",
"type": "string"
},
"projectId": {
"description": "the ID of the Move2Kube project",
"type": "string"
},
"notificationsDisabled": {
"description": "If set to true, notification will NOT be sent to backstage",
"type": "boolean",
"default": false
},
"token": {
"description": "The token to use to authenticate with GitHub",
"type": "string"
}
},
"required": [
"repositoryURL",
"sourceBranch",
"targetBranch",
"workspaceId",
"projectId"
]
}
move2kube.yaml: |
---
openapi: 3.0.1
Expand Down Expand Up @@ -1819,263 +1868,7 @@ data:
example: all
description: A rule is a list of resources and the list of allowed verbs
for those resources.
notifications.yaml: |-
openapi: 3.0.3
info:
title: Notifications Plugin - OpenAPI Specs
description: |-
Notifications Plugin - OpenAPI Specs
version: 1.0.0
tags:
- name: notifications
description: notifications plugin
servers:
- url: http://localhost:7007/api/notifications
paths:
/notifications:
post:
tags:
- notifications
summary: Create notification
description: Create notification
operationId: createNotification
requestBody:
description: Create a new notification
content:
application/json:
schema:
$ref: '#/components/schemas/CreateBody'
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: object
properties:
messageId:
type: string
example: bc9f19de-8b7b-49a8-9262-c5036a1ed35e
required: ['messageId']
get:
tags:
- notifications
summary: Gets notifications
description: Gets notifications
operationId: getNotifications
parameters:
- name: pageSize
in: query
description: Page size of the result
required: false
schema:
type: integer
minimum: 0
- name: pageNumber
in: query
description: Page number of the result
required: false
schema:
type: integer
minimum: 0
- name: orderBy
in: query
description: order by field. e.g. created, origin.
required: false
schema:
type: string
enum:
- title
- message
- created
- topic
- origin
- name: orderByDirec
in: query
description: order ascending or descending
required: false
schema:
type: string
enum:
- asc
- desc
- name: containsText
in: query
description: Filter notifications whose either title or message contains the provided string
required: false
schema:
type: string
- name: createdAfter
in: query
description: Only notifications created after this timestamp will be included
required: false
schema:
type: string
format: date-time
- name: messageScope
in: query
description: retrieve either logged-in user messages, system messages or both
required: false
schema:
type: string
enum:
- all
- user
- system
- name: read
in: query
description: Notifications read or not
required: false
schema:
type: boolean
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Notifications'
/notifications/count:
get:
tags:
- notifications
summary: Get notifications count
description: Gets notifications count
operationId: getNotificationsCount
parameters:
- name: containsText
in: query
description: Filter notifications whose either title or message contains the provided string
required: false
schema:
type: string
- name: createdAfter
in: query
description: Only notifications created after this timestamp will be included
required: false
schema:
type: string
format: date-time
- name: messageScope
in: query
description: retrieve either logged-in user messages, system messages or both
required: false
schema:
type: string
enum:
- all
- user
- system
- name: read
in: query
description: Notifications read or not
required: false
schema:
type: boolean
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: object
properties:
count:
type: number
required: ['count']
/notifications/read:
put:
tags:
- notifications
summary: Set notification as read/unread
description: Set notification as read/unread
operationId: setRead
parameters:
- name: messageId
in: query
description: The message ID
required: true
schema:
type: string
- name: read
in: query
description: read/unread
required: true
schema:
type: boolean
responses:
'200':
description: Successful operation
components:
schemas:
Notifications:
type: array
items:
$ref: '#/components/schemas/Notification'
Notification:
properties:
id:
type: string
created:
type: string
format: date-time
readByUser:
type: boolean
isSystem:
type: boolean
origin:
type: string
title:
type: string
message:
type: string
topic:
type: string
actions:
type: array
items:
$ref: '#/components/schemas/Action'
required: [id, created, readByUser, isSystem, origin, title, actions]
Action:
properties:
id:
type: string
title:
type: string
url:
type: string
required: [id, title, url]
CreateBody:
properties:
origin:
type: string
title:
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]
kind: ConfigMap
metadata:
creationTimestamp: null
name: 01-m2k-resources
namespace: default
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ metadata:
app: m2k
sonataflow.org/workflow-app: m2k
name: m2k
namespace: default
spec:
flow:
dataInputSchema:
Expand Down Expand Up @@ -42,7 +41,7 @@ spec:
operation: rest:post:http://broker-ingress.knative-eventing.svc.cluster.local/sonataflow-infra/default
type: custom
- name: createNotification
operation: specs/notifications.yaml#createNotification
operation: notifications#createNotification
type: rest
start:
stateName: StartPlanning
Expand Down Expand Up @@ -255,7 +254,7 @@ spec:
podTemplate:
container:
resources: {}
image: quay.io/orchestrator/serverless-workflow-move2kube:4fae4bd85a48f4091f5c67a83fbcc94dcd29f1f2
image: quay.io/orchestrator/serverless-workflow-move2kube:6d54d44a0c036a2924de61347d7ae0f7f59c7e43
resources:
configMaps:
- configMap:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,15 @@ data:
mp.messaging.incoming.kogito_incoming_stream.method=POST
# This property is used when sending the notification while waiting for Q&A
move2kube_url={{ .Values.workflow.move2kubeURL }}
move2kube_url=${MOVE2KUBE_URL:http://move2kube-svc.default.svc.cluster.local:8080}
# This property is used to send requests to the move2kube instance
quarkus.rest-client.move2kube_yaml.url={{ .Values.workflow.move2kubeURL }}
quarkus.rest-client.move2kube_yaml.url=${MOVE2KUBE_URL:http://move2kube-svc.default.svc.cluster.local:8080}
# This property is used to send requests to the backstage notification plugin
quarkus.rest-client.notifications.url={{ .Values.workflow.backstageNotificationURL }}
#quarkus.log.category.\"org.apache.http\".level=DEBUG
quarkus.rest-client.notifications.url=${BACKSTAGE_NOTIFICATIONS_URL:http://orchestrator-backstage.orchestrator/api/notifications/}
kind: ConfigMap
metadata:
creationTimestamp: null
labels:
app: {{ .Values.workflow.name }}
sonataflow.org/workflow-app: {{ .Values.workflow.name }}
name: {{ .Values.workflow.name }}-props
namespace: {{ .Values.namespace }}
app: m2k
sonataflow.org/workflow-app: m2k
name: m2k-props

0 comments on commit 706747e

Please sign in to comment.