-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kind/feat: passing artifacts between tasks
- Loading branch information
1 parent
5c40712
commit 1636de1
Showing
23 changed files
with
447 additions
and
30 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
57 changes: 57 additions & 0 deletions
57
examples/v1/pipelineruns/alpha/consume-artifacts-from-task.yaml
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,57 @@ | ||
apiVersion: tekton.dev/v1 | ||
kind: PipelineRun | ||
metadata: | ||
generateName: pipelinerun-consume-tasks-artifacts | ||
spec: | ||
pipelineSpec: | ||
tasks: | ||
- name: produce-artifacts-task | ||
taskSpec: | ||
description: | | ||
A simple task that produces artifacts | ||
steps: | ||
- name: produce-artifacts | ||
image: bash:latest | ||
script: | | ||
#!/usr/bin/env bash | ||
cat > $(artifacts.path) << EOF | ||
{ | ||
"inputs":[ | ||
{ | ||
"name":"input-artifacts", | ||
"values":[ | ||
{ | ||
"uri":"pkg:example.github.com/inputs", | ||
"digest":{ | ||
"sha256":"b35cacccfdb1e24dc497d15d553891345fd155713ffe647c281c583269eaaae0" | ||
} | ||
} | ||
] | ||
} | ||
], | ||
"outputs":[ | ||
{ | ||
"name":"image", | ||
"values":[ | ||
{ | ||
"uri":"pkg:github/package-url/purl-spec@244fd47e07d1004f0aed9c", | ||
"digest":{ | ||
"sha256":"df85b9e3983fe2ce20ef76ad675ecf435cc99fc9350adc54fa230bae8c32ce48", | ||
"sha1":"95588b8f34c31eb7d62c92aaa4e6506639b06ef2" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
EOF | ||
- name: consume-artifacts | ||
runAfter: | ||
- produce-artifacts-task | ||
taskSpec: | ||
steps: | ||
- name: write | ||
image: bash:latest | ||
script: | | ||
#!/usr/bin/env bash | ||
echo $(tasks.produce-artifacts-task.outputs) |
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,44 @@ | ||
apiVersion: tekton.dev/v1 | ||
kind: TaskRun | ||
metadata: | ||
generateName: task-run-artifacts | ||
spec: | ||
taskSpec: | ||
description: | | ||
A simple task that produces artifacts | ||
steps: | ||
- name: produce-artifacts | ||
image: bash:latest | ||
script: | | ||
#!/usr/bin/env bash | ||
cat > $(artifacts.path) << EOF | ||
{ | ||
"inputs":[ | ||
{ | ||
"name":"input-artifacts", | ||
"values":[ | ||
{ | ||
"uri":"pkg:example.github.com/inputs", | ||
"digest":{ | ||
"sha256":"b35cacccfdb1e24dc497d15d553891345fd155713ffe647c281c583269eaaae0" | ||
} | ||
} | ||
] | ||
} | ||
], | ||
"outputs":[ | ||
{ | ||
"name":"image", | ||
"values":[ | ||
{ | ||
"uri":"pkg:github/package-url/purl-spec@244fd47e07d1004f0aed9c", | ||
"digest":{ | ||
"sha256":"df85b9e3983fe2ce20ef76ad675ecf435cc99fc9350adc54fa230bae8c32ce48", | ||
"sha1":"95588b8f34c31eb7d62c92aaa4e6506639b06ef2" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
EOF |
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 |
---|---|---|
|
@@ -30,4 +30,6 @@ const ( | |
StepsDir = "/tekton/steps" | ||
|
||
ScriptDir = "/tekton/scripts" | ||
|
||
ArtifactsDir = "/tekton/artifacts" | ||
) |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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
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
Oops, something went wrong.