Re:Improving maintenance of your Jenkins(file) pipelines
by zelos on Friday October 25, 2019 @04:34AM
(#21352974)
Not the OP, but I’m wary about implementing build logic in a form that’s only executable on a server. Pipelines are one step better than the old style build configuration, but still inferior to just having the whole build/test/release cycle defined in scripts in the branch which can be run anywhere.
[ Parent
| on HN ]
Re:Improving maintenance of your Jenkins(file) pipelines
by M3t0r on Friday October 25, 2019 @05:14AM
(#21353185)
We have started using Makefiles for this. Our Jenkinsfiles are only used for the orchestration and reporting. All our applications can be build, tested, and released by our employees on their machines. Works great for us!
Re:Improving maintenance of your Jenkins(file) pipelines
by pnako on Friday October 25, 2019 @05:22AM
(#21353220)
I have a simple Python script with a function for each step.
When called with no arg it runs everything; this way I can trivially run a full CI build on my laptop.
You can also call individual steps, which I do from a Jenkinsfile. This way you can still see a nice pipeline woth different steps.
All this runs in Docker. This is integrated almost properly with Gitea (only thing missing is an icon in Gitea on success/failure).
Jenkins is fine behind the firewall. Its not terribly elegant but its very flexible.
Re:Improving maintenance of your Jenkins(file) pipelines
by pintxo on Friday October 25, 2019 @04:46AM
(#21353043)
Your Jenkins pipeline could just be a singe step:
run 'sh ./build.sh && ./test.sh && ./deploy.sh'
We have gone for middle ground, the pipeline has a small number of discrete steps, but these steps mainly just call scripts defined besides the code within the respective repo. That way one can replay the process manually wherever needed, but we still can easily see in Jenkins where the process fails, including submitting test results to jenkins to see directly in the web-ui which tests failed.