title: How to get the git latest commit message and prevent the jenkins build if the commit message contains [ci skip]?
body: <p>I tried to get the git commit message in jenkinsfile and prevent the build based on commit message.</p>
  
  <p><strong>env.GIT_COMMIT</strong> doesn't return the commit details in jenkinsfile.</p>
  
  <p>How to get the git latest commit message and prevent the jenkins build if the commit message contains [ci skip] in it?</p>