Skip to content

Commit

Permalink
updates trigger action definition name
Browse files Browse the repository at this point in the history
Signed-off-by: Amit Singh <singhamitch@outlook.com>
  • Loading branch information
semmet95 committed Jun 13, 2023
1 parent cb3c667 commit a6fbe7c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: core.oam.dev/v1alpha1
kind: Definition
metadata:
name: image-update-task
name: task
namespace: vela-system
spec:
type: trigger-action
Expand All @@ -18,7 +18,7 @@ spec:
apiVersion: "batch/v1"
kind: "Job"
metadata: {
name: context.data.metadata.name
name: parameter.name
namespace: parameter.namespace
if context.data.metadata.labels != _|_ {
labels: context.data.metadata.labels
Expand All @@ -43,7 +43,7 @@ spec:
spec: {
restartPolicy: parameter.restart
containers: [{
name: context.data.metadata.name
name: parameter.name
image: parameter.image
command: parameter.cmd
Expand Down Expand Up @@ -78,6 +78,9 @@ spec:
// +usage=The image to run the job container on
image: string
// +usage=Name of the cron job
name: *context.data.metadata.name | string
// +usage=The namespace to create the Job in
namespace: *context.data.metadata.namespace | string
Expand Down
2 changes: 1 addition & 1 deletion examples/triggerservice-image-update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:
context.data.status.latestBuildReason == "STACK" && context.data.status.conditions[0].status == "True"
action:
type: image-update-task
type: task
properties:
cmd: [/bin/sh, -c, "echo Image: ${SOURCE_NAME} in namespace: ${SOURCE_NAMESPACE} has been successfully rebased at $(date)"]
image: busybox
Expand Down

0 comments on commit a6fbe7c

Please sign in to comment.