我想你可以用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個插件不兼容:( –