Jenkins pipeline sh does not seem to respect pipe in shell command

前端 未结 6 1284
清歌不尽
清歌不尽 2020-12-15 20:29

I am using a Jenkinsfile in a pipeline on version 2.32.2.

For various reasons I want to extract the version string from the pom. I was hoping I wouldn\'t have to a

6条回答
  •  孤街浪徒
    2020-12-15 21:04

    The pipeline-utility-steps plugin nowadays includes a readMavenPom step, which allows to access the version as follows:

    version = readMavenPom.getVersion()
    

提交回复
热议问题