jenkins pipeline 使用遇到的问题

希望可以直接看到nexus中的war包列表, 以方便选择需要上线的war包版本

这里需要用到Extended Choice Parameter可以在插件中使用Choose Source for Value

//这是我要从nexus中找到我可能会需要用到的war或者tar包的代码, 具体语法不做解释
'curl http://nexus访问地址/service/rest/repository/browse/raw-pro/pipeline-APP/'.execute().text.readLines().collect{
  if(it.contains('pipeline-APP')){
    if(it.contains('.war')){
      String temp=it.split('.war')[1].split('">')[1]+".war"
      return temp
    }
    else if(it.contains('.tar.gz')){
      String temp=it.split('.tar.gz')[1].split('">')[1]+".tar.gz"
      return temp
    }
  }
}.findResults {it}

相关文章:

  • 2021-12-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-01
  • 2022-12-23
  • 2021-04-28
  • 2021-08-08
猜你喜欢
  • 2021-08-19
  • 2021-09-26
  • 2021-08-29
  • 2021-12-20
  • 2021-08-27
  • 2021-11-07
相关资源
相似解决方案