Fix: nit fix for workflow (#2957)

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
This commit is contained in:
Tianxin Dong
2021-12-20 11:00:07 +08:00
committed by GitHub
parent add5d40bfc
commit 6c4b7699b9
12 changed files with 87 additions and 21 deletions

View File

@@ -32,6 +32,7 @@ spec:
}
data: parameter.data
}
cluster: parameter.cluster
}
parameter: {
// +usage=Specify the name of the config map
@@ -40,5 +41,7 @@ spec:
namespace?: string
// +usage=Specify the data of config map
data: {}
// +usage=Specify the cluster of the config map
cluster: *"" | string
}

View File

@@ -35,6 +35,7 @@ spec:
}
stringData: parameter.data
}
cluster: parameter.cluster
}
parameter: {
// +usage=Specify the name of the secret
@@ -45,5 +46,7 @@ spec:
type?: string
// +usage=Specify the data of secret
data: {}
// +usage=Specify the cluster of the config map
cluster: *"" | string
}

View File

@@ -18,7 +18,9 @@ spec:
parameter: {
dingding?: {
// +usage=Specify the the dingding url, you can either sepcify it in value or use secretRef
url: value | secretRef
// +useage=Specify the message that you want to sent
message: {
text?: *null | {
content: string
@@ -63,7 +65,9 @@ spec:
}
slack?: {
// +usage=Specify the the slack url, you can either sepcify it in value or use secretRef
url: value | secretRef
// +useage=Specify the message that you want to sent
message: {
text: string
blocks?: *null | [...block]
@@ -77,17 +81,27 @@ spec:
}
email?: {
// +usage=Specify the email info that you want to send from
from: {
address: string
alias?: string
// +usage=Specify the email address that you want to send from
address: string
// +usage=The alias is the email alias to show after sending the email
alias?: string
// +usage=Specify the password of the email, you can either sepcify it in value or use secretRef
password: value | secretRef
host: string
port: *587 | int
// +usage=Specify the host of your email
host: string
// +usage=Specify the port of the email host, default to 587
port: *587 | int
}
// +usage=Specify the email address that you want to send to
to: [...string]
// +usage=Specify the content of the email
content: {
// +usage=Specify the subject of the email
subject: string
body: string
// +usage=Specify the context body of the email
body: string
}
}
}
@@ -137,8 +151,10 @@ spec:
url?: string
}
secretRef: {
// +usage=name is the name of the secret
name: string
key: string
// +usage=key is the key in the secret
key: string
}
value: string
// send webhook notification

View File

@@ -32,6 +32,7 @@ spec:
}
data: parameter.data
}
cluster: parameter.cluster
}
parameter: {
// +usage=Specify the name of the config map
@@ -40,5 +41,7 @@ spec:
namespace?: string
// +usage=Specify the data of config map
data: {}
// +usage=Specify the cluster of the config map
cluster: *"" | string
}

View File

@@ -35,6 +35,7 @@ spec:
}
stringData: parameter.data
}
cluster: parameter.cluster
}
parameter: {
// +usage=Specify the name of the secret
@@ -45,5 +46,7 @@ spec:
type?: string
// +usage=Specify the data of secret
data: {}
// +usage=Specify the cluster of the config map
cluster: *"" | string
}

View File

@@ -18,7 +18,9 @@ spec:
parameter: {
dingding?: {
// +usage=Specify the the dingding url, you can either sepcify it in value or use secretRef
url: value | secretRef
// +useage=Specify the message that you want to sent
message: {
text?: *null | {
content: string
@@ -63,7 +65,9 @@ spec:
}
slack?: {
// +usage=Specify the the slack url, you can either sepcify it in value or use secretRef
url: value | secretRef
// +useage=Specify the message that you want to sent
message: {
text: string
blocks?: *null | [...block]
@@ -77,17 +81,27 @@ spec:
}
email?: {
// +usage=Specify the email info that you want to send from
from: {
address: string
alias?: string
// +usage=Specify the email address that you want to send from
address: string
// +usage=The alias is the email alias to show after sending the email
alias?: string
// +usage=Specify the password of the email, you can either sepcify it in value or use secretRef
password: value | secretRef
host: string
port: *587 | int
// +usage=Specify the host of your email
host: string
// +usage=Specify the port of the email host, default to 587
port: *587 | int
}
// +usage=Specify the email address that you want to send to
to: [...string]
// +usage=Specify the content of the email
content: {
// +usage=Specify the subject of the email
subject: string
body: string
// +usage=Specify the context body of the email
body: string
}
}
}
@@ -137,8 +151,10 @@ spec:
url?: string
}
secretRef: {
// +usage=name is the name of the secret
name: string
key: string
// +usage=key is the key in the secret
key: string
}
value: string
// send webhook notification

View File

@@ -20,7 +20,7 @@ spec:
properties:
component: express-server
- name: export-config
type: export-config
type: export2config
inputs:
- from: status
parameterKey: data.serverstatus

View File

@@ -20,7 +20,7 @@ spec:
properties:
component: express-server
- name: export-secret
type: export-secret
type: export2secret
inputs:
- from: status
parameterKey: data.serverstatus

View File

@@ -130,7 +130,7 @@ func (p *Parser) GenerateAppFile(ctx context.Context, app *v1beta1.Application)
}
appfile.WorkflowMode = common.WorkflowModeDAG
if wfSpec := app.Spec.Workflow; wfSpec != nil {
if wfSpec := app.Spec.Workflow; wfSpec != nil && len(wfSpec.Steps) > 0 {
appfile.WorkflowMode = common.WorkflowModeStep
appfile.WorkflowSteps = wfSpec.Steps
}

View File

@@ -26,6 +26,7 @@ template: {
}
data: parameter.data
}
cluster: parameter.cluster
}
parameter: {
// +usage=Specify the name of the config map
@@ -34,5 +35,7 @@ template: {
namespace?: string
// +usage=Specify the data of config map
data: {}
// +usage=Specify the cluster of the config map
cluster: *"" | string
}
}

View File

@@ -29,6 +29,7 @@ template: {
}
stringData: parameter.data
}
cluster: parameter.cluster
}
parameter: {
// +usage=Specify the name of the secret
@@ -39,5 +40,7 @@ template: {
type?: string
// +usage=Specify the data of secret
data: {}
// +usage=Specify the cluster of the config map
cluster: *"" | string
}
}

View File

@@ -13,7 +13,9 @@ template: {
parameter: {
dingding?: {
// +usage=Specify the the dingding url, you can either sepcify it in value or use secretRef
url: value | secretRef
// +useage=Specify the message that you want to sent
message: {
text?: *null | {
content: string
@@ -58,7 +60,9 @@ template: {
}
slack?: {
// +usage=Specify the the slack url, you can either sepcify it in value or use secretRef
url: value | secretRef
// +useage=Specify the message that you want to sent
message: {
text: string
blocks?: *null | [...block]
@@ -72,17 +76,27 @@ template: {
}
email?: {
// +usage=Specify the email info that you want to send from
from: {
address: string
alias?: string
// +usage=Specify the email address that you want to send from
address: string
// +usage=The alias is the email alias to show after sending the email
alias?: string
// +usage=Specify the password of the email, you can either sepcify it in value or use secretRef
password: value | secretRef
host: string
port: *587 | int
// +usage=Specify the host of your email
host: string
// +usage=Specify the port of the email host, default to 587
port: *587 | int
}
// +usage=Specify the email address that you want to send to
to: [...string]
// +usage=Specify the content of the email
content: {
// +usage=Specify the subject of the email
subject: string
body: string
// +usage=Specify the context body of the email
body: string
}
}
}
@@ -138,8 +152,10 @@ template: {
}
secretRef: {
// +usage=name is the name of the secret
name: string
key: string
// +usage=key is the key in the secret
key: string
}
value: string