|
| 1 | +{ |
| 2 | + "Id": "0abe1aab-b264-4f40-a534-d48082ef3ac3", |
| 3 | + "Name": "Submit Argo Workflow", |
| 4 | + "Description": "Submit an Argo Worflow from a WorkflowTemplate", |
| 5 | + "ActionType": "Octopus.KubernetesRunScript", |
| 6 | + "Version": 1, |
| 7 | + "CommunityActionTemplateId": null, |
| 8 | + "Packages": [], |
| 9 | + "GitDependencies": [], |
| 10 | + "Properties": { |
| 11 | + "Octopus.Action.Script.ScriptSource": "Inline", |
| 12 | + "Octopus.Action.Script.Syntax": "Bash", |
| 13 | + "Octopus.Action.Script.ScriptBody": "\n# Grab Variables\n\nexport wkf_name=$(get_octopusvariable 'ArgoWorkflowSubmit.Name')\nexport namespace=$(get_octopusvariable 'ArgoWorkflowSubmit.Namespace')\nexport parameter_array=$(get_octopusvariable \"ArgoWorkflowSubmit.Parameters\")\nexport options=$(get_octopusvariable 'ArgoWorkflowSubmit.Options')\n\n# Process optional parameters\nparameter_string=\"\"\nif [ -n \"$parameter_array\" ] ; then\n parameter_string=$(echo \"$parameter_array\" | awk '{printf \"-p %s \", $0}' | sed 's/ $//')\n echo \"Parameter string: $parameter_string\"\nelse\n echo \"No parameters passed\"\nfi\n\n\nCMD=\"argo submit -n $namespace --from workflowtemplate/$wkf_name $parameter_string $options -o name\"\necho \"Workflow Submit command: $CMD\"\n\nNAME=$($CMD)\nargo logs --follow $NAME\n\nPHASE=$(argo get $NAME -o json | jq -r '.status.phase')\n\nif [[ \"$PHASE\" == \"Succeeded\" ]]; then\n echo \"Workflow Succeeded.\"\n exit 0\nelif [[ \"$PHASE\" == \"Failed\" ]] || [[ \"$PHASE\" == \"Error\" ]]; then\n MESSAGE=$(argo get \"$NAME\" -o json | jq -r '.status.message')\n echo \"Workflow Phase: $PHASE.\"\n echo \"Message: $MESSAGE\"\n exit 1\nelse\n echo \"Workflow Phase: $PHASE (still running or unknown).\"\n exit 2\nfi" |
| 14 | + }, |
| 15 | + "Parameters": [ |
| 16 | + { |
| 17 | + "Id": "0d55eec6-241c-4e0d-a7c3-ac468a73f1b4", |
| 18 | + "Name": "ArgoWorkflowSubmit.Namespace", |
| 19 | + "Label": "Namespace of the workflow template", |
| 20 | + "HelpText": "The name of the namespace where the workflow template to submit is defined", |
| 21 | + "DefaultValue": "argocd", |
| 22 | + "DisplaySettings": { |
| 23 | + "Octopus.ControlType": "SingleLineText" |
| 24 | + } |
| 25 | + }, |
| 26 | + { |
| 27 | + "Id": "b5f33a16-d470-496e-9271-9f75741e3e70", |
| 28 | + "Name": "ArgoWorkflowSubmit.Name", |
| 29 | + "Label": "WorkflowTemplate Name", |
| 30 | + "HelpText": "The name of the Workflow Trmplate to submit", |
| 31 | + "DefaultValue": "", |
| 32 | + "DisplaySettings": { |
| 33 | + "Octopus.ControlType": "SingleLineText" |
| 34 | + } |
| 35 | + }, |
| 36 | + { |
| 37 | + "Id": "073e6872-2f34-4ade-944a-953f451f1ef3", |
| 38 | + "Name": "ArgoWorkflowSubmit.Parameters", |
| 39 | + "Label": "Workflow parameters", |
| 40 | + "HelpText": "An optional array of parameters to pass to the workflow. One name=value per line", |
| 41 | + "DefaultValue": "", |
| 42 | + "DisplaySettings": { |
| 43 | + "Octopus.ControlType": "MultiLineText" |
| 44 | + } |
| 45 | + }, |
| 46 | + { |
| 47 | + "Id": "0b91a1f6-7da7-40ba-b22c-d74ffd2bd8c4", |
| 48 | + "Name": "ArgoWorkflowSubmit.Options", |
| 49 | + "Label": "Additional Options", |
| 50 | + "HelpText": "Additional Options to pass to the \"Argo Submit\" command", |
| 51 | + "DefaultValue": "", |
| 52 | + "DisplaySettings": { |
| 53 | + "Octopus.ControlType": "MultiLineText" |
| 54 | + } |
| 55 | + } |
| 56 | + ], |
| 57 | + "StepPackageId": "Octopus.KubernetesRunScript", |
| 58 | + "$Meta": { |
| 59 | + "ExportedAt": "2026-03-10T15:15:54.763Z", |
| 60 | + "OctopusVersion": "2026.2.742", |
| 61 | + "Type": "ActionTemplate" |
| 62 | + }, |
| 63 | + "LastModifiedBy": "lrochette", |
| 64 | + "Category": "argo" |
| 65 | +} |
0 commit comments