Skip to main content
Topic: Setting up a "build bot" for nightly builds (Read 3177 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Setting up a "build bot" for nightly builds

One of the things I would like to have in place before (or slightly after) starting the development of 2.0 is a "build bot" able to create nightly builds and upload them "somewhere".
This is not so useful now, but if someday we will decide to rely on some external dependency and to use composer to grab them, nightly builds will become a very useful tool for any tester out there.

What is it necessary in order to have a build bot?
Considering ElkArte 1.1 packaging system is already quite friendly (basically run an sh script), I can think of two other requirements:
1) a server/VPS/something that would let us run an sh script with a cronjob (and composer (that is a php script itself) from that script), having git would be super but not entirely mandatory,
2) a bit of space to store the "builds" (better would be on the same "system" from point 1, so that we wouldn't have to deal with file transfers).

A couple of improvements may be required to the bash script: 1) make the bash script able to change the CACHE_STALE to "version + last commit hash", in order to avoid any possible caching issue and 2) the file name should contain the hash of the latest commit as well.

Maybe something more is required, but for the moment that's all that comes to my mind.
Bugs creator.
Features destroyer.
Template killer.

 

Re: Setting up a "build bot" for nightly builds

Reply #1

I am not so sure if my private apache2 server is good enough to offer such a service, but you may use it if you have the need to.

Some notes though, i.e. it uses dynamic dns with the help of zoneedit and I noted that zoneedit has some problems in propagating the dynamic ip (though it can be and always has been automatically updated).

Due to that when a new dynamic ip is changed and stored in zoneedit, I have to manually change it againto make sure that it is properly propagated.

Eg. 1.2.3.4 has been automatically updated to 2.3.4.5, I have to manually change 2.3.4.5 to something else and then revert it back to 2.3.4.5 for it to properly propagating.

I am not complaining this to zoneedit since I am only using free account for it and somebody else has complained about it.

Despite the above, yes, you and any elk users may use it, if so wish at anytime, as I offered before.

Re: Setting up a "build bot" for nightly builds

Reply #2

That's an option indeed, thanks for the offer. :)
The IP is not entirely a problem, the builbot should be able to push the build "somewhere" on the internet (github, some drive,  this server, some other place) and then it can be downloaded from there.

Another possibility I discovered few hours ago could be travis itself:
https://docs.travis-ci.com/user/deployment
Bugs creator.
Features destroyer.
Template killer.

Re: Setting up a "build bot" for nightly builds

Reply #3

It sounds to me like Amazon AWS would be perfect for this.  A S3 bucket for storage, and instead of a VPS, maybe use Lambda to run the sh script once X happens.  AWS also integrates well with Github.  I have not set this up, but if I had to, AWS is where I would start my research.

Re: Setting up a "build bot" for nightly builds

Reply #4

Nothing fancy for sure, the "build" (for 1.1) at the moment is nothing more than this script:
https://github.com/elkarte/Elkarte/blob/245c6c001a1944cf4b868cee25d295a0f8b453af/release_tools/build.sh
in "some time" it may include a run of composer, nothing else.
Bugs creator.
Features destroyer.
Template killer.

Re: Setting up a "build bot" for nightly builds

Reply #5

Indeed.  What specs do you think it will need?  I may be able to offer something. 

Re: Setting up a "build bot" for nightly builds

Reply #6

I have composer installed, so that can already be used. My server built is Ubuntu LTS (14.04), Apache, MySQL, PHP (5.5) with ISPConfig as control panel, 1TB harddisk and 8GB of RAM. I rarely use any of them for the time being.

I can create an account with ssh, netftp and phpmyadmin access for you. Just tell me when you want it and how big is the storage that you need, so I can start creating the account.

And the preferred domain / subdomain name of your own or any subdomain of sch.my. If you are using your own domain / subdomain, it should be redirected to ns1.sch.my and ns2.sch.my (currently pointing to the same dynamic IP).