kind: Workflow
metadata:
  annotations:
    argo-connector/keywords: Example,Test,Hello World
    argo-connector/license: https://spdx.org/licenses/MIT
    argo-connector/notify: 'true'
    argo-connector/submitterId1: 0000-0003-0351-6523
    argo-connector/submitterName1: Claus Weiland
    workflows.argoproj.io/description: Dummy Agroclim Workflow
    workflows.argoproj.io/pod-name-format: v2
    workflows.argoproj.io/title: Example Workflow printing Hello World
spec:
  arguments:
    parameters:
    - description: Name of the person to greet
      name: name
      value: World
  artifactGC:
    forceFinalizerRemoval: true
  entrypoint: workflow
  onExit: exit-handler
  podGC:
    strategy: OnWorkflowSuccess
  templates:
  - inputs: {}
    metadata: {}
    name: workflow
    outputs: {}
    steps:
    - - arguments:
          parameters:
          - name: name
            value: '{{workflow.parameters.name}}'
        name: print-message
        template: print-to-file
  - inputs:
      parameters:
      - name: name
    metadata: {}
    name: print-to-file
    outputs:
      artifacts:
      - archive:
          none: {}
        name: outputfile
        path: /tmp/output.txt
    script:
      command:
      - python
      image: python:3.9
      name: ''
      resources: {}
      source: "with open(\"/tmp/output.txt\", \"w\") as outf:\n    outf.write(f\"\
        Hello {{inputs.parameters.name}}\")\nprint(\"Created output file /tmp/output.txt\"\
        )\n"
  - inputs: {}
    metadata: {}
    name: exit-handler
    outputs: {}
    steps:
    - - arguments: {}
        inline:
          http:
            headers:
            - name: Authorization
              valueFrom:
                secretKeyRef:
                  key: token
                  name: argo-connector-auth-secret
            insecureSkipVerify: true
            successCondition: response.statusCode == 202
            timeoutSeconds: 10
            url: https://workflow.earth/connector/notify/{{ workflow.namespace }}/{{workflow.name
              }}
          inputs: {}
          metadata: {}
          outputs: {}
          retryStrategy:
            backoff:
              duration: 1m
              factor: '2'
              maxDuration: 30m
            limit: '10'
        name: notify-argo-connector
        when: '{{ workflow.status }} == Succeeded && {{ workflow.annotations.argo-connector/notify
          }} == true'
