-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: GitHub <[email protected]>
- Loading branch information
1 parent
af27524
commit 19efdc2
Showing
30 changed files
with
378 additions
and
356 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
...examples/workflows/upstream/cluster_workflow_template__workflow_template_ref.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Cluster Workflow Template Workflow Template Ref | ||
|
||
> Note: This example is a replication of an Argo Workflow example in Hera. The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/master/examples/cluster-workflow-template/workflow-template-ref.yaml). | ||
|
||
|
||
## Hera | ||
|
||
```python | ||
from hera.workflows import Workflow | ||
from hera.workflows.models import WorkflowTemplateRef | ||
|
||
wt_ref = WorkflowTemplateRef(name="cluster-workflow-template-submittable", cluster_scope=True) | ||
|
||
w = Workflow( | ||
generate_name="cluster-workflow-template-hello-world-", | ||
workflow_template_ref=wt_ref, | ||
) | ||
``` | ||
|
||
## YAML | ||
|
||
```yaml | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Workflow | ||
metadata: | ||
generateName: cluster-workflow-template-hello-world- | ||
spec: | ||
workflowTemplateRef: | ||
clusterScope: true | ||
name: cluster-workflow-template-submittable | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Hera | ||
|
||
## Quick Start | ||
|
||
```python | ||
from hera.workflows import DAG, Container, Parameter, Workflow | ||
|
||
with Workflow( | ||
generate_name="dag-diamond-", | ||
entrypoint="diamond", | ||
) as w: | ||
echo = Container( | ||
name="echo", | ||
image="alpine:3.7", | ||
command=["echo", "{{inputs.parameters.message}}"], | ||
inputs=[Parameter(name="message")], | ||
) | ||
with DAG(name="diamond"): | ||
A = echo(name="A", arguments={"message": "A"}) | ||
B = echo(name="B", arguments={"message": "B"}) | ||
C = echo(name="C", arguments={"message": "C"}) | ||
D = echo(name="D", arguments={"message": "D"}) | ||
A >> [B, C] >> D | ||
|
||
w.create() | ||
``` | ||
|
||
## Walk Through |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
sphinx | ||
sphinx-book-theme | ||
sphinx-autoapi | ||
myst-parser | ||
Jinja2<3.1 | ||
# -e . # hera itself |
Oops, something went wrong.