Skip to content

Commit 0d9816e

Browse files
committed
Add a README for creating CI containers
1 parent 11b276a commit 0d9816e

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
Docker images for libgit2 continuous integration builds
2+
=======================================================
3+
[libgit2](https://libgit2.org/)'s Linux-based pull request validation,
4+
post-merge continuous integration and nightly builds run inside Docker
5+
containers. This ensures that we can target a predictable platform
6+
running exactly the distribution with exactly the dependencies that
7+
we want.
8+
9+
We target amd64-based containers natively, and other platforms like
10+
x86 and arm by leveraging QEMU.
11+
12+
To build and test these locally, you can simply run `make`. This will
13+
produce a new set of docker images with the `test` tag. You can then
14+
run them locally. From within a [libgit2 source
15+
directory](https://github.com/libgit2/libgit2), you can test the CI
16+
build step:
17+
18+
docker run -v $(pwd):/src -v $(pwd)/build:/build -w /build libgit2/trusty-amd64:test /src/ci/build.sh
19+
20+
You can also run the unit tests:
21+
22+
docker run -v $(pwd):/src -v $(pwd)/build:/build -w /build libgit2/trusty-amd64:test /src/ci/test.sh
23+
24+
(Replace `libgit2/trusty-amd64:test` with the name of the image that you
25+
want to run.)
26+
27+
When you've validated the images, you can build release images and push
28+
them to dockerhub. To build release images, you can run `make TAG=latest`.
29+
To push them, you can run `make TAG=latest push`.

0 commit comments

Comments
 (0)