summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorJoe Guo <joeg@catalyst.net.nz>2019-03-20 17:03:21 +1300
committerStefan Metzmacher <metze@samba.org>2019-04-18 12:09:34 +0000
commit82e0986bf0d4f9b78be2782ecbfc4e84c7036745 (patch)
tree0127f6086429108b2bce9ba3d464f24e9d2ab83c /.gitlab-ci.yml
parent09cd51780ffc65f105978441cc2377f0ad209d40 (diff)
downloadsamba-82e0986bf0d4f9b78be2782ecbfc4e84c7036745.tar.gz
.gitlab-ci.yml: make use of bootstrap/.gitlab-ci.yml and use the new defined image
See bootstrap/README.md for the instructions to create and upload the images via a custom gitlab ci pipeline. The key is that it's always possible to regenerate the image if it's not present in the container registry, where we are free to delete old images. But it should be possible to rebuild images if someone has the need to run a pipeline based on an old branch. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml39
1 files changed, 34 insertions, 5 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 505df7cdbe3..58dc7ca2e12 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,14 +1,35 @@
# see https://docs.gitlab.com/ce/ci/yaml/README.html for all available options
+stages:
+ - images
+ - build
variables:
- # we run autobuild.py inside a samba CI docker image located on gitlab's registry
- SAMBA_CI_CONTAINER_REGISTRY: registry.gitlab.com
- SAMBA_CI_CONTAINER_NAME: samba-team/samba
- SAMBA_CI_CONTAINER_TAG: latest
- SAMBA_CI_CONTAINER_IMAGE: $SAMBA_CI_CONTAINER_REGISTRY/$SAMBA_CI_CONTAINER_NAME:$SAMBA_CI_CONTAINER_TAG
GIT_STRATEGY: fetch
GIT_DEPTH: "3"
+ #
+ # we run autobuild.py inside a samba CI docker image located on gitlab's registry
+ # overwrite this variable if you want use your own image registry.
+ #
+ # Or better ask for access to the shared development repository, see
+ # https://wiki.samba.org/index.php/Samba_CI_on_gitlab#Getting_Access
+ #
+ SAMBA_CI_CONTAINER_REGISTRY: registry.gitlab.com/samba-team/devel/samba
+ #
+ # Set this to the contents of bootstrap/sha1sum.txt
+ # which is generated by bootstrap/template.py --render
+ #
+ SAMBA_CI_CONTAINER_TAG: 8606e89b0ce6a916fa881549a6cebf6eed528157
+ #
+ # Be use the ubuntu1404 image as it matches what we
+ # have on sn-devel-144.
+ #
+ SAMBA_CI_CONTAINER_IMAGE: ${SAMBA_CI_CONTAINER_REGISTRY}/samba-ci-ubuntu1404:${SAMBA_CI_CONTAINER_TAG}
+
+include:
+ # The image creation details are specified in a separate file
+ # See bootstrap/README.md for details
+ - 'bootstrap/.gitlab-ci.yml'
.shared_template:
image: $SAMBA_CI_CONTAINER_IMAGE
@@ -24,6 +45,14 @@ variables:
- df -h
- cat /proc/swaps
- free -h
+ # See bootstrap/.gitlab-ci.yml how to generate a new image
+ - echo "SAMBA_CI_CONTAINER_REGISTRY[${SAMBA_CI_CONTAINER_REGISTRY}]"
+ - echo "SAMBA_CI_CONTAINER_TAG[${SAMBA_CI_CONTAINER_TAG}]"
+ - bootstrap/template.py --sha1sum > /tmp/sha1sum-template.txt
+ - diff -u bootstrap/sha1sum.txt /tmp/sha1sum-template.txt
+ - echo "${SAMBA_CI_CONTAINER_TAG}" > /tmp/sha1sum-tag.txt
+ - diff -u bootstrap/sha1sum.txt /tmp/sha1sum-tag.txt
+ - diff -u bootstrap/sha1sum.txt /sha1sum.txt
after_script:
- mount
- df -h