apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: first-vela-workflow
namespace: default
spec:
components:
- name: express-server
type: webservice
properties:
image: oamdev/hello-world
port: 8000
traits:
- type: ingress
properties:
domain: testsvc.example.com
http:
/: 8000
workflow:
steps:
- name: dingtalk-message
type: notification
properties:
dingding:
url:
value: <your dingding url>
message:
msgtype: text
text:
content: 开始运行工作流
- name: application
type: apply-component
properties:
component: express-server
outputs:
- name: app-status
valueFrom: output.status.conditions[0].message + "工作流运行完成"
- name: slack-message
type: webhook-notification
inputs:
- from: app-status
parameterKey: slack.message.text
properties:
slack:
url:
secretRef:
name: <the secret name that stores your slack url>
key: <the secret key that stores your slack url>