How to manage a common ant build script across multiple project build jobs on jenkins?

后端 未结 3 2070
你的背包
你的背包 2020-12-01 15:35

I have a set of java projects coming from different git repositories which I want to be built with Jenkins.

All of them share the same ant build script, which employ

3条回答
  •  一整个雨季
    2020-12-01 15:51

    A couple of ideas...

    1. Store the Ant script in an artifact repository that your individual projects can pull from, like any other dependency.
    2. Create a parent Git project that contains the build script. In your parent project, pull down each individual sub-project as a Git submodule. You would probably need to make some minor modification to your script in order to parameterize the sub-project references in the build script.

    This answer is not specific to Jenkins and should be portable to other build servers.

提交回复
热议问题