This pull request implements a Dockerfile and .travis.yml for auto-building releases, and deploying them on pushes to master.
The Dockerfile sets up an Arch Linux container with everything required to build an ISO. It has alez-downloader.sh, and the motd embedded in the ISO.
Container
The container can be built with:
docker build -t "alezbuild" ./
To run the container and build the ISO:
docker run --privileged \
--volume="/dev:/dev" \
--volume="$PWD/out:/opt/alez/iso/out" "alezbuild"
Both --privileged, and mounting /dev are necessary in order for the container to be able to chroot, and mount a loop-back device.
This can also be used as an easy way to create an ISO, and it doesn't require an arch system. This could be useful for users who are not currently using Arch but would like to create their own ISO.
All the same problems may occur that we have experienced before during the build if the kernel version and zfs version are out of sync.
Travis CI
The .travis.yml mainifest basically does does the above build and run of the container, saving the built ISO to out/, and if successful deploying as a new release.
In the current configuration it auto-tags a release in the form:
This could be modified to only create a release on tagged commits alternatively.
The configuration could be modified to only create a release on tagged commits alternatively. draft: true could also be used so that the releases are 'internal' to contributors, and releases could be modified before finalized.
The releases are tagged using the committers name and email with:
At this point, if Travis CI is enabled on the repo, pushes should auto build.
Tests
I've tested auto building and deploying a release on a test github repo. I downloaded the built ISO, and everything is working correctly as far as I could tell.
Automated releases using Travis CI
This pull request implements a
Dockerfile
and.travis.yml
for auto-building releases, and deploying them on pushes to master.The
Dockerfile
sets up an Arch Linux container with everything required to build an ISO. It hasalez-downloader.sh
, and themotd
embedded in the ISO.Container
The container can be built with:
To run the container and build the ISO:
Both
--privileged
, and mounting/dev
are necessary in order for the container to be able to chroot, and mount a loop-back device.This can also be used as an easy way to create an ISO, and it doesn't require an arch system. This could be useful for users who are not currently using Arch but would like to create their own ISO.
All the same problems may occur that we have experienced before during the build if the kernel version and zfs version are out of sync.
Travis CI
The
.travis.yml
mainifest basically does does the above build and run of the container, saving the built ISO toout/
, and if successful deploying as a new release.In the current configuration it auto-tags a release in the form:
This could be modified to only create a release on tagged commits alternatively.
The configuration could be modified to only create a release on tagged commits alternatively.
draft: true
could also be used so that the releases are 'internal' to contributors, and releases could be modified before finalized.The releases are tagged using the committers name and email with:
Alternatively the variables could be set to a specific user and email.
For authentication an OAuth key should be created with the 'repo' scope so it can push releases to the repo.
After logging in to Travis CI, and creating the token it can be encrypted using the Travis CI gem.
Encrypt it with:
The token can then be set in the
.travis.yml
under:At this point, if Travis CI is enabled on the repo, pushes should auto build.
Tests
I've tested auto building and deploying a release on a test github repo. I downloaded the built ISO, and everything is working correctly as far as I could tell.