dd010101 / vyos-jenkins

How build packages from VyOS stable branches (1.3 equuleus/1.4 sagitta) with Jenkins (and then build ISO from them)
87 stars 28 forks source link

Jenkins job for building the iso #16

Closed GurliGebis closed 3 months ago

GurliGebis commented 4 months ago

Would it be possible to create a Jenkinsfile for building the ISO? I think mounting the key into the container, along with a Bash script that builds the ISO, and the entry point being overridden to run this script, might be a possible solution. What do you think? (Jenkinsfiles are black magic to me, so I can't help with that part)

dd010101 commented 4 months ago

The vyos-build/Jenkinsfile already does this, it also runs automatic smoketest. I don't like it though, it eats lot of RAM. It won't work without adjustments - but it's easier than starting from scratch. Jenkinsfile can run bash so there is no limitations to what you can do. You would need to solve where you put the ISO images for example since VyOS uses AWS. I would just wget the apt.gpg.key.

@pittagurneyi did make it work over scp for example. You can find all his work here. If you download the .tar.txt files and rename them to .tar then you get bunch of patches and there you will find 0015-Upload-to-SSH-instead-of-AWS.patch for example that modifies vyos-build/Jenkinsfile so it works without AWS. You can apply these patches via git apply to vyos-build.git.

I would suggest whatever route you take the result should be new Jenkinsfile. The reason why I didn't put the patches to vyos-build is that I have policy not to modify anything unless it's absolutely necessary - like there is literally no other way - that's why I would copy the original or make new Jenkinsfile - since the more changes to the original code are made - the more merge conflicts I will face = more long term maintenance.


My role in this project is to solve something that isn't solved or is hard to do - like the packages. I don't see ISO build as something that people don't know how to do or is hard to do the usual way.

Maybe I don't see much value but perhaps you would like to have it all in Jenkins, so...

Jenkinsfiles are black magic to me, so I can't help with that part

This sounds like perfect opportunity for you to experiment with Jenkinsfile! You need to start somewhere...

Neboer commented 3 months ago

Maybe instead we can have artifacts released so that the build process will be simpler. I've open a new issue in #24 for this.

dd010101 commented 3 months ago

I think this issue is solved by #27?

GurliGebis commented 3 months ago

Well, it is easy to do manually yes. I think manually is better, since building the ISOs all the time doesn't make much sense.