Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ actionTests:
- action: create-workflow
inputPath: testdata/cronworkflow.yaml
expectedOutputPath: testdata/workflow.yaml
- action: create-workflow
inputPath: testdata/cronworkflow-without-label.yaml
expectedOutputPath: testdata/workflow-without-label.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ if (obj.spec.workflowMetadata ~= nil) then
end
end
workflow.metadata.labels["workflows.argoproj.io/cron-workflow"] = obj.metadata.name
if (obj.metadata.labels["workflows.argoproj.io/controller-instanceid"] ~= nil) then
if (obj.metadata.labels ~= nil and obj.metadata.labels["workflows.argoproj.io/controller-instanceid"] ~= nil) then
workflow.metadata.labels["workflows.argoproj.io/controller-instanceid"] = obj.metadata.labels["workflows.argoproj.io/controller-instanceid"]
end
workflow.metadata.annotations["workflows.argoproj.io/scheduled-time"] = os.date("!%Y-%m-%dT%d:%H:%MZ")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
apiVersion: argoproj.io/v1alpha1
kind: CronWorkflow
metadata:
annotations:
cronworkflows.argoproj.io/last-used-schedule: CRON_TZ=America/Los_Angeles * * * * *
name: hello-world
namespace: default
spec:
concurrencyPolicy: Replace
failedJobsHistoryLimit: 4
schedule: '* * * * *'
startingDeadlineSeconds: 0
successfulJobsHistoryLimit: 4
suspend: true
timezone: America/Los_Angeles
workflowSpec:
entrypoint: whalesay
templates:
- container:
args:
- "\U0001F553 hello world. Scheduled on: {{workflow.scheduledTime}}"
command:
- cowsay
image: 'docker/whalesay:latest'
name: whalesay
workflowMetadata:
labels:
example: test
annotations:
another-example: another-test
finalizers: [test-finalizer]
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
- k8sOperation: create
unstructuredObj:
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
annotations:
another-example: another-test
labels:
example: test
name: hello-world-202306221736
namespace: default
ownerReferences:
- apiVersion: argoproj.io/v1alpha1
kind: CronWorkflow
name: hello-world
finalizers: [test-finalizer]
spec:
entrypoint: whalesay
templates:
- container:
args:
- "\U0001F553 hello world. Scheduled on: {{workflow.scheduledTime}}"
command:
- cowsay
image: 'docker/whalesay:latest'
name: whalesay