Skip to content

Latest commit

 

History

History
38 lines (32 loc) · 1.1 KB

workflow-submitting-workflow.md

File metadata and controls

38 lines (32 loc) · 1.1 KB

One Workflow Submitting Another

GA

v2.8 and after

If you want one workflow to create another, you can do this using curl. You'll need an access token. Typically the best way is to submit from a workflow template:

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: demo-
spec:
  entrypoint: main
  templates:
    - name: main
      steps:
        - - name: a
            template: create-wf
    - name: create-wf
      script:
        image: curlimages/curl:latest
        command:
          - sh
        source: >
          curl http:https://argo-server:2746/api/v1/workflows/argo/submit \
            -fs \
            -H "Authorization: Bearer eyJhbGci..." \
            -d '{"resourceKind": "WorkflowTemplate", "resourceName": "wait", "submitOptions": {"labels": "workflows.argoproj.io/workflow-template=wait"}}'

See also: