It just happens that I have to setup a CI/CD ecosystem to test a series of changes to the compiler. I am using Git and Jenkins as the framework.
I am getting to know both!
I am using corporate Jenkins, which means another team has downloaded, and configured Jenkins. I have a personal Jenkins space, with limited configuration capabilities. It is connected to a source repository which contains an application code, toolchain and build scripts. The relationship between these pieces are as follow:
the build scripts build the toolchain, which then is used to build the application code.
Each of these, the scripts, toolchain, and application, is maintained in a separate repository. The main goal is changes to each repository triggers the build, guided by Jenkinsfile.
I added the build scripts and toolchain repositories as submodules of the application. I then navigated through the Jenkinsfile documentation online to find a way to trigger a build when a commit was made to the git submodules. After a couple days on the topic, I gave up.
I tried GitSCM with various settings and none worked.
In order to make progress, I moved to an alternative way. It is a simple minded way. I git clone each repository, within on Jenkins Pipeline and go build the toolchain and the application in that order.
Jenkins, being so pervasive in the development world, should be able to handle multiple repositories and invoke the build when there's a change to one of them.
Please, leave me a comment here, if you know how. Thanks in advance!
No comments:
Post a Comment