Difficulty attempting to build and deploy edgex-go services on private Jenkins instance #141
-
I have been trying to integrate Project Alvarium EdgeX Foundry in work related to #140. I am attempting to capture information from events in the Jenkins pipeline and so far I have been trying to get the pipeline working on my own private Jenkins instance just to validate that it can work then I will look into capturing the necessary information during the pipeline by adding Project Alvarium code to the CICD pipeline (specifically, the edgex-global-pipelines shared library). So far my process has been adding the edgex-global-pipelines (and lf-releng-pipelines) as shared libraries in Jenkins and then trying to build edgex-go using the Jenkinsfile present in its repo. Then after each build I check for any logged errors and try my best to address them. This process is slow and not very efficient, is there any existing resources on how to replicate the Jenkins environment to get the pipeline to work right off the bat ? perhaps an existing docker image that spins up a Jenkins instance with the proper configuration already there ? If not, then perhaps someone might've thought of a better approach, I'd appreciate any ideas. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
@ernestojeda , this is one for you. :-) |
Beta Was this translation helpful? Give feedback.
-
@Ali-Amin This will be pretty difficult to do on your own Jenkins server specifically because of how the Jenkins server is set up. The Jenkins servers used by the edgexfoundry project are set up and maintained by the Linux Foundation (LF) and leverage a lot of scripts and tools built by the LF engineering team. The setup for the Jenkins server can be found in this repository: ci-management. The LF uses a tool called Jenkins Job Builder to deploy out a lot of the config and they use Packer to build VM images with specific configuration. However, there's a pretty steep learning curve to understand this setup and it may not be worth the effort. The builds also rely on certain tools to be installed such as lftools otherwise certain commands will fail during the build. Overall, I would not attempt to run these pipelines on your own Jenkins server unless there is some specific requirement such as needing specific hardware to test functionality. It is probably better just to submit your code via a PR and let the edgexfoundry Jenkins server build and test the code. |
Beta Was this translation helpful? Give feedback.
-
I create a simpler Jenkinsfile example you could run on your Jenkins server if you wanted to still verify in a similar manner to how edgex-global-pipeline runs the pipeline. This is not exactly the way edgex-go is built but should be a close approximation. The biggest difference is edgex-global-pipeline uses docker-compose to build all the edgex-go images in parallel where my example uses the |
Beta Was this translation helpful? Give feedback.
I create a simpler Jenkinsfile example you could run on your Jenkins server if you wanted to still verify in a similar manner to how edgex-global-pipeline runs the pipeline.
This is not exactly the way edgex-go is built but should be a close approximation. The biggest difference is edgex-global-pipeline uses docker-compose to build all the edgex-go images in parallel where my example uses the
make docker
target to build.