我想你可以用Jenkins Build Flow plugin来实现。
如果你必须设计复杂的工作流程,这个插件功能非常强大。
这里是我的构建流程的一个示例:
// Format the build ID (long and short)
TimeZone.setDefault(TimeZone.getTimeZone('UTC'))
def now = new Date()
def short_date = now.format("yyyyMMdd")
def long_date = now.format("yyyyMMdd_HHmm")
// Launch the OpenDJ nightly build (try 3 times if random test failures)
ignore(UNSTABLE) {
retry (3) {
build("OpenDJ_-_nightly_-_build", BUILD_ID_SHORT: short_date, BUILD_ID_LONG: long_date)
}
}
// Build the standard packages
parallel (
{ build("OpenDJ_-_nightly_-_DEB", BUILD_ID_SHORT: short_date, BUILD_ID_LONG: long_date) },
{ build("OpenDJ_-_nightly_-_RPM", BUILD_ID_SHORT: short_date, BUILD_ID_LONG: long_date) },
{ build("OpenDJ_-_nightly_-_MSI", BUILD_ID_SHORT: short_date, BUILD_ID_LONG: long_date) },
{ build("OpenDJ_-_nightly_-_ZIP_OEM", BUILD_ID_SHORT: short_date, BUILD_ID_LONG: long_date) }
)
// Build the DEB and RPM OEM packages (they depend on the previous builds)
parallel (
{ build("OpenDJ_-_nightly_-_DEB_OEM", BUILD_ID_SHORT: short_date, BUILD_ID_LONG: long_date) },
{ build("OpenDJ_-_nightly_-_RPM_OEM", BUILD_ID_SHORT: short_date, BUILD_ID_LONG: long_date) },
)
结果:
它看起来像构建流程插件不与交货流水线插件相处(我用于可视化)。 –
行我不知道这2个插件不兼容:( –