Skip to content
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

Merged
merged 1 commit into from
Sep 11, 2017

Conversation

gbraad
Copy link
Member

@gbraad gbraad commented Aug 10, 2017

Fixes #51

Add GitLab CI runner definition

Note: some changes are needed to allow shared runners

@gbraad gbraad force-pushed the gitlab branch 2 times, most recently from 1a86a39 to 6690128 Compare August 10, 2017 06:42
.gitlab-ci.yml Outdated
- cd iso
- echo \"$(cat os-release.template)\" > os-release
- REMOVE_CONTAINER_IMAGES=y ./build.sh
- cd ..
Copy link
Contributor

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?

@gbraad
Copy link
Member Author

gbraad commented Aug 10, 2017 via email

@coolbrg
Copy link
Contributor

coolbrg commented Aug 10, 2017

docker:dind. It also does not provide make. Working on improving this... This was a first attempt.

👍 Got you.

@gbraad
Copy link
Member Author

gbraad commented Aug 13, 2017

Using Docker-in-Docker using a Fedora 26 image. Which allows me to run our regular build process using make. By removing the intermediate container images, we can run on shared CI runners.

@gbraad gbraad changed the title [WIP] Issue #51 Add GitLab CI runner Issue #51 Add GitLab CI runner Aug 13, 2017
@gbraad
Copy link
Member Author

gbraad commented Aug 13, 2017

@gbraad
Copy link
Member Author

gbraad commented Aug 14, 2017

Note: intermediate docker images are removed when REMOVE_CONTAINER_IMAGES is set to a value. This is meant to keep disk usage to a minimum

@hferentschik
Copy link
Member

So this is a WIP?

@gbraad
Copy link
Member Author

gbraad commented Aug 14, 2017

WIP status was removed 15 hours ago ;-)

@hferentschik
Copy link
Member

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
Copy link
Member

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?

Copy link
Member Author

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.

@gbraad
Copy link
Member Author

gbraad commented Sep 11, 2017

Any feedback? @praveenkumar @LalatenduMohanty @budhrg ?

@coolbrg
Copy link
Contributor

coolbrg commented Sep 11, 2017

Looks good to me @gbraad

@gbraad gbraad mentioned this pull request Sep 11, 2017
echo "Building in $tmpdir."
cp -r . $tmpdir/

pushd $tmpdir
Copy link
Contributor

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?

Copy link
Member Author

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 .
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@praveenkumar praveenkumar merged commit 53c2700 into minishift:master Sep 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants