Getting your hands dirty
Data sharing across tasks and pipelines should have no secrets for you now. You are ready to test your knowledge with the following exercises. In order to complete those challenges, you will need to use the concepts introduced here, along with notions from the previous chapters. The solutions to these exercises can be found in the Assessments section at the end of the book.
Write and read
Create a task that uses a workspace to share information across its two steps. The first step will write a message, specified in a parameter, to a file in the workspace. The second step will output the content of the file in the logs. Try running the task using the -w
parameter in the tkn
CLI tool.
Tips
- Use the variable substitutions to get the path of the workspace and append a file name.
- Use the cat
command to output the content of a file.
- You can use an emptyDir
volume when the data is shared within a task.
Pick a card
Using the Deck...