How to get job.status into shell script? #25729
-
It should be really basic stuff but I couldn’t figure it out… |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
You need to provide it to the step in some way. Exactly how depends on how your script wants to consume that data. You could put it on the command line:
Or into the environment:
|
Beta Was this translation helpful? Give feedback.
-
Many thanks!
Tried “color: failure() && ‘good’ || ‘bad’” and other variations - the same result. |
Beta Was this translation helpful? Give feedback.
-
I figured it out - as usually RTFM helps. color: ${{ job.status == ‘success’ && ‘good’ || ‘bad’ }} |
Beta Was this translation helpful? Give feedback.
You need to provide it to the step in some way. Exactly how depends on how your script wants to consume that data. You could put it on the command line:
Or into the environment: