Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-66409

Pipeline 'changelog'-Builtin-Condition can not handle multiline messages

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I have a Jenkins Pipeline with a stage that shall only be executed when a certain keyword ("[test]") is found in the git commit message. 

      Due to Documentation this can be done with a simple when-Directive using the Built-in 'changelog'-Condition with a regex pattern.

      The Condition in my Jenkinsfile looks like this:

       

      stage('Run Unit Tests') 
      {
      	when {
      		    changelog '.*\\[test\\].*'
      	}
      ...

      This works great as long as the git commit message is not multi-line! Otherwise the stage is always skipped (at least if the keyword is not in the first line).

       

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            je_lukas_weiss Lukas
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: