LoginSignup
2
1

More than 5 years have passed since last update.

Jenkinsで複数のリポジトリをpollingしたい

Posted at

なんでか知らないけれどどうしても複数のリポジトリをポーリングしてみたいことってあるじゃないですか
最近初めてそんなことがありました。

で、調べるとMulti SCMしか出てこない…
これはちょっとというかかなり面倒くさい。
二個くらいなら何とかなるけど10ことか20ことかあるといちいち設定するの面倒くさい…

というわけでpipelineでポーリングしてみました。

ビルドトリガーはもちろんSCMをポーリングにします。
あとはこんな感じでコード書いて実行したらポーリングしてくれる
pollingは1行ごとにリポジトリ書いてあるビルドパラメータ

あとは煮るなり焼くなりけるなり


node
{
    pollings = polling.split("\n")
    for( i=0;i<pollings.length;i++)
    {
        git pollings[i]
    }
}

2
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1