Can we trigger jenkins pipeline based on variable or textfile content

For Example I have pipeline A,B and C

pipleine A -----writes a result.txt text file [content execute=none]

pipeline B ------ modifies that text file depending on execution [content : execute=true or execute=false]

Depending upon the content of file if its[execute=true] then only i need to execute the pipleine C

Can we achieve this using text file or for that matter even if with variables in jenkins. to modifiy the variable via pipeline and trigger the pipleine based on value of variable

Note workring for me tried multiple ways…!!!

Hi there,

“it doesn’t work” is always hard to remote debug. Try to always include these 3 things.

  1. what did you try? (Code samples, command lines, screenshots, videos, etc)
  2. what did happen? (Error messages, description, outputs, stuff)
  3. what did you expect to happen?

Otherwise, it’s hard for us to get into your context and you’ll have to have someone who is exactly knowledgeable come along.

1 Like