-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue #51 Add GitLab CI runner #52
Conversation
1a86a39
to
6690128
Compare
.gitlab-ci.yml
Outdated
- cd iso | ||
- echo \"$(cat os-release.template)\" > os-release | ||
- REMOVE_CONTAINER_IMAGES=y ./build.sh | ||
- cd .. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So no tests execution here right?
Currently a restriction as for shared/public runners we rely on
docker-in-docker to build the images. This happens due a very minimal image
docker:dind. It also does not provide make. Working on improving this...
This was a first attempt.
…--
Gerard Braad | http://gbraad.nl
[ Doing Open Source Matters ]
|
👍 Got you. |
Using Docker-in-Docker using a Fedora 26 image. Which allows me to run our regular build process using |
Note: intermediate docker images are removed when |
So this is a WIP? |
WIP status was removed 15 hours ago ;-) |
What's the empty "iso/.gitlab-ci.yml" for? |
|
||
# Get nsenter. | ||
docker run --rm jpetazzo/nsenter cat /nsenter > $tmpdir/nsenter && chmod +x $tmpdir/nsenter | ||
|
||
# Get socat | ||
docker build -t socat -f Dockerfile.socat . | ||
docker run socat cat socat > $tmpdir/socat | ||
docker run $DOCKER_RUN_OPTIONS socat cat socat > $tmpdir/socat |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does $DOCKER_RUN_OPTIONS come into play?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when REMOVE_CONTAINER_IMAGES
is set, it gets a value of --rm
. This is needed as GitLab shared CI runners have a limited amount of disk space assigned to a build, and without removing intermediate images and containers, we exhaust that before the build of boot2docker
even started.
Any feedback? @praveenkumar @LalatenduMohanty @budhrg ? |
Looks good to me @gbraad |
echo "Building in $tmpdir." | ||
cp -r . $tmpdir/ | ||
|
||
pushd $tmpdir |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any specific reason why we are removing pushd/pop
? Is it because of sh instead bash?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes. it can be restored as we are not using the docker;git image anymore anyways.
what was the motivation/pro to use popd/pushd?
|
||
# Do the build. | ||
docker build -t iso . | ||
docker build -t b2diso . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Fixes #51
Add GitLab CI runner definition
Note: some changes are needed to allow shared runners