パイプラインジョブから行列ビルドを開始したいが、1つのAxisだけを構築したい。Jenkins:パイプラインからのMatrixCombinationsParameterValue
私はこれを試みた:
build job: "Build_Android_Matrix", propagate: false, wait: true,
parameters: [[$class: 'StringParameterValue', name: 'branch', value: "$branch"],
[$class: 'BooleanParameterValue', name: 'production', value: true],
[$class: 'BooleanParameterValue', name: 'beta', value: false],
[$class: 'MatrixCombinationsParameterValue', name: 'paramFilter', description: null, combinations: ['buildType=Release']]]
をI 2つの軸、flavor
とbuildType
を有し、paramFilter
はマトリックスの組み合わせのパラメータです。
マトリックスビルドはすべてのジョブパラメータで開始しますが、マトリックスの組み合わせの選択が空であるため何も構築されません。
私は['buildType==Release']
と['buildType=="Release"']
でも試しましたが、私はいつも同じ結果を得ています。
私はまたして試してみた:
build job: "Build_Android_Matrix", propagate: false, wait: true, parameters: [
new hudson.plugins.matrix_configuration_parameter.MatrixCombinationsParameterValue
("paramFilter",
null,
['buildType=Release'])
]
が、それはRejectedAccessException: Scripts not permitted to use new
ので失敗します。
私はほとんど正しい方法で組み合わせを提供していないと確信していますが、他に何ができるかはわかりません。
更新私はこのようなパラメータを設定しようとしたクリストファー・オア答えた後
:
- 味:ドイツイタリアメキシコUnitedStatesの 私の軸として、これと
[$class: 'MatrixCombinationsParameterValue', name: 'paramFilter', description: null, combinations: ['buildType=Release,flavor=Italy']]]
を
私はスレーブ軸を持っていることを忘れていて、それも指定する必要があります。
だから、これは私のために働いていたものです:
[$class: 'MatrixCombinationsParameterValue', combinations: ["buildType=Release,flavor=Italy,label=android"], description: '', name: 'paramFilter']