我有一個jenkins作業,它需要在某些條件下運行特定的構建任務。jenkins有條件地使用NOT
我設置了一個名爲'skipBuild'的布爾參數,默認爲false。
然後,我使用NOT設置條件參數,如果布爾參數爲false,那麼只需要執行步驟。但即使將參數設置爲true,構建步驟仍然運行。
[Boolean condition] checking [{ENV,var="skipBuild"}] against [^(1|y|yes|t|true|on|run)$] (origin token: {ENV,var="skipBuild"})
Run condition [Not] enabling perform for step [Execute shell]
...... my command here -DskipBuild=true
這裏是我的工作,建立
我基本上不想執行shell作業運行時布爾參數爲真
我想這是一個自由式的工作嗎?如何轉移到管道工作?當您的構建步驟是腳本化時,複雜的邏輯要容易得多。 –