fresh-yak-35965
06/12/2024, 1:08 PMdeploy --sync
?microscopic-river-74022
06/12/2024, 1:08 PMmicroscopic-river-74022
06/12/2024, 1:09 PMdeploy --sync
, you can use the ${actions.run.<name>.outputs.log}
template string key. This key provides the full log output from the executed command.
Here is an example of how you can use it:
yaml
kind: Run
type: exec
name: get-api-hash
spec:
command: [git, rev-parse, HEAD]
---
kind: Deploy
type: container
name: api
dependencies: [run.get-api-hash]
spec:
# ...
env:
COMMIT_HASH: ${actions.run.get-api-hash.outputs.log}
In this example, the get-api-hash
Run action executes the git rev-parse HEAD
command, and its output is stored in the COMMIT_HASH
environment variable of the api
Deploy action.
Remember to make the log output machine-readable so it can be parsed by dependants.
Also, note that you can stream logs for a Deploy
action using the garden logs my-deploy --follow
command.
For more information, refer to the Garden documentation on exec Run Outputs () and Garden documentation on streaming logs for a Deploy action ().
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------microscopic-river-74022
06/12/2024, 1:09 PMfresh-yak-35965
06/12/2024, 1:10 PMmicroscopic-river-74022
06/12/2024, 1:10 PMmicroscopic-river-74022
06/12/2024, 1:10 PMgarden logs my-deploy --follow
command to stream logs for a Deploy
action, which might help you troubleshoot any issues you're experiencing.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------microscopic-river-74022
06/12/2024, 1:10 PM