Hacker News new | ask | show | jobs
by zelos 2431 days ago
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.
3 comments

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!
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.

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.