mirror of
https://github.com/kubevela/kubevela.git
synced 2026-04-21 10:07:26 +00:00
Fix: fix depends on app built-in step (#2429)
This commit is contained in:
@@ -27,7 +27,7 @@ spec:
|
||||
}
|
||||
}
|
||||
load: op.#Steps & {
|
||||
if dependsOn.err != _|_ {
|
||||
if dependsOn.err != _|_ && dependsOn.value == _|_ {
|
||||
configMap: op.#Read & {
|
||||
value: {
|
||||
apiVersion: "v1"
|
||||
@@ -43,18 +43,16 @@ spec:
|
||||
yaml.Unmarshal(configMap.value.data[parameter.name])
|
||||
}
|
||||
}
|
||||
}
|
||||
if dependsOn.err == _|_ {
|
||||
apply: op.#Apply & {
|
||||
value: {
|
||||
dependsOn.value
|
||||
}
|
||||
wait: op.#ConditionalWait & {
|
||||
continue: load.apply.value.status.status == "running"
|
||||
}
|
||||
}
|
||||
|
||||
if dependsOn.value != _|_ {
|
||||
wait: op.#ConditionalWait & {
|
||||
continue: dependsOn.value.status.status == "running"
|
||||
}
|
||||
}
|
||||
}
|
||||
phase: load.apply.value.status.status
|
||||
wait: op.#ConditionalWait & {
|
||||
continue: phase == "running"
|
||||
}
|
||||
parameter: {
|
||||
// +usage=Specify the name of the dependent Application
|
||||
|
||||
@@ -27,7 +27,7 @@ spec:
|
||||
}
|
||||
}
|
||||
load: op.#Steps & {
|
||||
if dependsOn.err != _|_ {
|
||||
if dependsOn.err != _|_ && dependsOn.value == _|_ {
|
||||
configMap: op.#Read & {
|
||||
value: {
|
||||
apiVersion: "v1"
|
||||
@@ -43,18 +43,16 @@ spec:
|
||||
yaml.Unmarshal(configMap.value.data[parameter.name])
|
||||
}
|
||||
}
|
||||
}
|
||||
if dependsOn.err == _|_ {
|
||||
apply: op.#Apply & {
|
||||
value: {
|
||||
dependsOn.value
|
||||
}
|
||||
wait: op.#ConditionalWait & {
|
||||
continue: load.apply.value.status.status == "running"
|
||||
}
|
||||
}
|
||||
|
||||
if dependsOn.value != _|_ {
|
||||
wait: op.#ConditionalWait & {
|
||||
continue: dependsOn.value.status.status == "running"
|
||||
}
|
||||
}
|
||||
}
|
||||
phase: load.apply.value.status.status
|
||||
wait: op.#ConditionalWait & {
|
||||
continue: phase == "running"
|
||||
}
|
||||
parameter: {
|
||||
// +usage=Specify the name of the dependent Application
|
||||
|
||||
26
docs/examples/workflow/depends-on-app/app.yaml
Normal file
26
docs/examples/workflow/depends-on-app/app.yaml
Normal file
@@ -0,0 +1,26 @@
|
||||
apiVersion: core.oam.dev/v1beta1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: kruise
|
||||
namespace: vela-system
|
||||
spec:
|
||||
components:
|
||||
- name: kruise
|
||||
type: helm
|
||||
properties:
|
||||
branch: master
|
||||
chart: ./charts/kruise/v0.9.0
|
||||
version: "*"
|
||||
repoType: git
|
||||
url: https://github.com/openkruise/kruise
|
||||
workflow:
|
||||
steps:
|
||||
- name: check-flux
|
||||
type: depends-on-app
|
||||
properties:
|
||||
name: fluxcd
|
||||
namespace: vela-system
|
||||
- name: apply-kruise
|
||||
type: apply-component
|
||||
properties:
|
||||
component: kruise
|
||||
@@ -23,7 +23,7 @@ template: {
|
||||
}
|
||||
|
||||
load: op.#Steps & {
|
||||
if dependsOn.err != _|_ {
|
||||
if dependsOn.err != _|_ && dependsOn.value == _|_ {
|
||||
configMap: op.#Read & {
|
||||
value: {
|
||||
apiVersion: "v1"
|
||||
@@ -39,20 +39,16 @@ template: {
|
||||
yaml.Unmarshal(configMap.value.data[parameter.name])
|
||||
}
|
||||
}
|
||||
}
|
||||
if dependsOn.err == _|_ {
|
||||
apply: op.#Apply & {
|
||||
value: {
|
||||
dependsOn.value
|
||||
}
|
||||
wait: op.#ConditionalWait & {
|
||||
continue: load.apply.value.status.status == "running"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
phase: load.apply.value.status.status
|
||||
|
||||
wait: op.#ConditionalWait & {
|
||||
continue: phase == "running"
|
||||
if dependsOn.value != _|_ {
|
||||
wait: op.#ConditionalWait & {
|
||||
continue: dependsOn.value.status.status == "running"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
parameter: {
|
||||
|
||||
Reference in New Issue
Block a user