Hi there, I am quite new to writing code in Jenkinsfile so please excuse me if this is basic.
I am trying to execute a function, if the requirements.txt
file has been changed in the current pull request.
Here is the code that I have:
> ...
stage('Create Jira Ticket') { when { anyOf { changeset 'requirements.txt' } } steps{ jiraTicketCreator() // this function is defined higher up } }
But when I run a build for the above, without any changes to the requirements.txt
file, the function is still called.