The branch, master has been updated via 84f6fdcef3b .gitlab-ci.yml: run the samba-o3 job on each working container image via ad2c23eeb38 .gitlab-ci.yml: split AUTOBUILD_JOB_NAME from CI_JOB_NAME via 82e0986bf0d .gitlab-ci.yml: make use of bootstrap/.gitlab-ci.yml and use the new defined image via 09cd51780ff bootstrap/READMD.md: update the instructions to reflect the current code via c36c1022f0c bootstrap: add the result of bootstrap/template.py --render via 2300a38de36 bootstrap/.gitlab-ci.yml: add ci file to trigger image auto build via f1b1bba5c32 bootstrap: remove unused docker.py via 37676409926 bootstrap/template.py: add sha1sum support via da0567e00b1 bootstrap/template.py: generate Vagrantfile just once via c15bbb0e78d bootstrap/template.py: render locale.sh for each dist and make shell scripts executable via 033eca2df38 bootstrap/config.py: generate rendered files into bootstrap/generated-dists/ via 0b2bbeb5dd9 bootstrap/config.py: add a hind how to rebuild generated files via 31f5b75120b bootstrap/config.py: Add openSUSE Leap 15.0 via 27b61082aa1 bootstrap/config.py: Create the 'samba' group in containers via 3b431486c47 bootstrap/config.py: Fix lmdb-utils package name for RPM family via aa29211be7f bootstrap/config.py: Use generic lsb-release package name via f749f17f22e bootstrap/config.py: Add gzip, which and hostname to base packages via 6009e47d8e2 bootstrap/config.py: add libicu-dev/libicu-devel via 1ca1cc2b5c9 bootstrap/config.py: add glib2-dev via 154a7b7d411 bootstrap/config.py: add patch, rsync and tar via 47c826ed411 bootstrap/config.py: link ld to ld.gold when available via 077f8eaf40f bootstrap/config.py: add ARG in Dockerfile to allow add sha1sum into docker image via 932756e2a3a bootstrap/config.py: rm ENV for ccache since we didn't use it any more via dd1d04e8289 bootstrap/config.py: add missing dev packages via 3e9af703eb0 bootstrap/config.py: adjust package list to align current ci image via 50fde627811 bootstrap/config.py: change UTF-8 to utf8 for locale name in Dockerfile ENV via 9c33b193ff1 bootstrap/config.py: mv locale setup from bootstrap.sh from 45fee29d1ed .gitlab-ci.yml: require samba-ci-private tag for our private runners
https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 84f6fdcef3b11ab4a4087c52f2f4c5a749a43b92 Author: Stefan Metzmacher <me...@samba.org> Date: Fri Apr 12 21:34:24 2019 +0200 .gitlab-ci.yml: run the samba-o3 job on each working container image Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andreas Schneider <a...@samba.org> Autobuild-User(master): Stefan Metzmacher <me...@samba.org> Autobuild-Date(master): Thu Apr 18 13:10:49 UTC 2019 on sn-devel-144 commit ad2c23eeb38603631d1d9789d1a53a93e7caec03 Author: Stefan Metzmacher <me...@samba.org> Date: Fri Apr 12 21:21:03 2019 +0200 .gitlab-ci.yml: split AUTOBUILD_JOB_NAME from CI_JOB_NAME This will make it easier extend the templates later. Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andreas Schneider <a...@samba.org> commit 82e0986bf0d4f9b78be2782ecbfc4e84c7036745 Author: Joe Guo <j...@catalyst.net.nz> Date: Wed Mar 20 17:03:21 2019 +1300 .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 <me...@samba.org> Signed-off-by: Joe Guo <j...@catalyst.net.nz> Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andreas Schneider <a...@samba.org> commit 09cd51780ffc65f105978441cc2377f0ad209d40 Author: Stefan Metzmacher <me...@samba.org> Date: Thu Apr 11 16:56:17 2019 +0200 bootstrap/READMD.md: update the instructions to reflect the current code Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andreas Schneider <a...@samba.org> commit c36c1022f0c9073fb5511938b8d01401ed5bdfeb Author: Stefan Metzmacher <me...@samba.org> Date: Fri Apr 12 13:33:12 2019 +0200 bootstrap: add the result of bootstrap/template.py --render Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andreas Schneider <a...@samba.org> commit 2300a38de36bab9980dc0ea1d8e55997946a0d19 Author: Joe Guo <j...@catalyst.net.nz> Date: Thu Mar 14 17:15:47 2019 +1300 bootstrap/.gitlab-ci.yml: add ci file to trigger image auto build Depending on 'SAMBA_CI_REBUILD_IMAGES=yes' (and 'SAMBA_CI_REBUILD_BROKEN_IMAGES=yes') as environment variables on a custom gitlab ci pipeline we'll generate und upload container images. bootstrap/README.md will get more details in the next commits. Please note ci in this file did NOT add the `latest` tag, since we want main ci to always use a fixed image based on the sha1sum of everything under bootstrap/ from now on. This also implies the new built image will not replace/break anything. Pair-Programmed-With: Stefan Metzmacher <me...@samba.org> Signed-off-by: Joe Guo <j...@catalyst.net.nz> Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andreas Schneider <a...@samba.org> commit f1b1bba5c32f8066845c900536e0f812882cddb1 Author: Stefan Metzmacher <me...@samba.org> Date: Thu Apr 11 16:56:32 2019 +0200 bootstrap: remove unused docker.py We'll generate docker images during a gitlab-ci run. Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andreas Schneider <a...@samba.org> commit 37676409926a89bd83dd3b916144dd9aaae151f3 Author: Joe Guo <j...@catalyst.net.nz> Date: Wed Mar 20 12:26:48 2019 +1300 bootstrap/template.py: add sha1sum support 1. calc sha1sum for files under bootstrap/ (except README.md and *.pyc files) after render and write to bootstrap/sha1sum.txt file. 2. add a new option to print sha1sum, so we can use it to compare in ci Pair-Programmed-With: Stefan Metzmacher <me...@samba.org> Signed-off-by: Joe Guo <j...@catalyst.net.nz> Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andreas Schneider <a...@samba.org> commit da0567e00b113baccad7f41f9dab5dc82cc7f996 Author: Stefan Metzmacher <me...@samba.org> Date: Thu Apr 11 10:34:28 2019 +0200 bootstrap/template.py: generate Vagrantfile just once Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andreas Schneider <a...@samba.org> commit c15bbb0e78da1393c5e168d0aafa2fc984ef07c4 Author: Joe Guo <j...@catalyst.net.nz> Date: Thu Mar 7 19:00:37 2019 +1300 bootstrap/template.py: render locale.sh for each dist and make shell scripts executable Signed-off-by: Joe Guo <j...@catalyst.net.nz> Reviewed-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andreas Schneider <a...@samba.org> commit 033eca2df381574bcd99c255cc47300568d5b194 Author: Stefan Metzmacher <me...@samba.org> Date: Thu Apr 11 10:34:28 2019 +0200 bootstrap/config.py: generate rendered files into bootstrap/generated-dists/ Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andreas Schneider <a...@samba.org> commit 0b2bbeb5dd91d1c9f1da32a893a194a84e9e5b83 Author: Stefan Metzmacher <me...@samba.org> Date: Thu Apr 11 10:34:28 2019 +0200 bootstrap/config.py: add a hind how to rebuild generated files Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andreas Schneider <a...@samba.org> commit 31f5b75120b4d543195ce704970d8e4dcd58addb Author: Samuel Cabrero <scabr...@suse.de> Date: Fri Mar 22 14:15:31 2019 +0100 bootstrap/config.py: Add openSUSE Leap 15.0 Signed-off-by: Samuel Cabrero <scabr...@suse.de> Reviewed-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andreas Schneider <a...@samba.org> commit 27b61082aa1363c8a5f9f11ad9bb117cd7a20de7 Author: Samuel Cabrero <scabr...@suse.de> Date: Wed Mar 27 18:00:09 2019 +0100 bootstrap/config.py: Create the 'samba' group in containers Signed-off-by: Samuel Cabrero <scabr...@suse.de> Reviewed-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andreas Schneider <a...@samba.org> commit 3b431486c4784f2f37f9292255fd2e965af253f0 Author: Samuel Cabrero <scabr...@suse.de> Date: Thu Mar 28 12:04:15 2019 +0100 bootstrap/config.py: Fix lmdb-utils package name for RPM family Signed-off-by: Samuel Cabrero <scabr...@suse.de> Reviewed-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andreas Schneider <a...@samba.org> commit aa29211be7fa4ddd6393db8c087b37ab322fc682 Author: Samuel Cabrero <scabr...@suse.de> Date: Fri Mar 22 12:37:13 2019 +0100 bootstrap/config.py: Use generic lsb-release package name Signed-off-by: Samuel Cabrero <scabr...@suse.de> Reviewed-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andreas Schneider <a...@samba.org> commit f749f17f22e7a0b7fd9f2087313de537ebc06537 Author: Samuel Cabrero <scabr...@suse.de> Date: Fri Mar 22 12:34:14 2019 +0100 bootstrap/config.py: Add gzip, which and hostname to base packages The openSUSE Leap 15.0 container does not include gzip and which Signed-off-by: Samuel Cabrero <scabr...@suse.de> Reviewed-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andreas Schneider <a...@samba.org> commit 6009e47d8e2a86927ee2d09e7361606955223ff4 Author: Ralph Boehme <s...@samba.org> Date: Tue Apr 9 16:55:37 2019 +0200 bootstrap/config.py: add libicu-dev/libicu-devel Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andreas Schneider <a...@samba.org> commit 1ca1cc2b5c9fd908f1da1925a47107bfd66ebcc6 Author: Ralph Boehme <s...@samba.org> Date: Fri Mar 29 12:13:09 2019 +0100 bootstrap/config.py: add glib2-dev Signed-off-by: Ralph Boehme <s...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andreas Schneider <a...@samba.org> commit 154a7b7d41193e27826f9883f704796b7deed6dc Author: Stefan Metzmacher <me...@samba.org> Date: Fri Mar 29 09:43:08 2019 +0100 bootstrap/config.py: add patch, rsync and tar Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andreas Schneider <a...@samba.org> commit 47c826ed41193ad5d013e97bd6e396cad597cb3c Author: Joe Guo <j...@catalyst.net.nz> Date: Thu Mar 21 11:04:24 2019 +1300 bootstrap/config.py: link ld to ld.gold when available Signed-off-by: Joe Guo <j...@catalyst.net.nz> Reviewed-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andreas Schneider <a...@samba.org> commit 077f8eaf40fd7917ebc90b8577c2766c0000abe6 Author: Joe Guo <j...@catalyst.net.nz> Date: Tue Mar 19 16:31:47 2019 +1300 bootstrap/config.py: add ARG in Dockerfile to allow add sha1sum into docker image Add ARG SHA1SUM, then we can pass it to docker build with --build-arg Signed-off-by: Joe Guo <j...@catalyst.net.nz> Reviewed-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andreas Schneider <a...@samba.org> commit 932756e2a3adb88ba8216aa926289b287d3a3059 Author: Joe Guo <j...@catalyst.net.nz> Date: Tue Mar 12 19:06:03 2019 +1300 bootstrap/config.py: rm ENV for ccache since we didn't use it any more When ccache is not installed, this will cause failure. Signed-off-by: Joe Guo <j...@catalyst.net.nz> Reviewed-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andreas Schneider <a...@samba.org> commit dd1d04e8289697f7600562c7c94a78253a201ec2 Author: Joe Guo <j...@catalyst.net.nz> Date: Wed Mar 20 10:08:08 2019 +1300 bootstrap/config.py: add missing dev packages Add a few extra dev packages missing in current ci image but should be included. Signed-off-by: Joe Guo <j...@catalyst.net.nz> Reviewed-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andreas Schneider <a...@samba.org> commit 3e9af703eb044ec0b00fd672a6975032c924af0d Author: Joe Guo <j...@catalyst.net.nz> Date: Wed Mar 20 10:06:44 2019 +1300 bootstrap/config.py: adjust package list to align current ci image Adjust packages to make `dpkg -l` output align current ci image. The ones not required are ignored, add a few missing python3 ones. Signed-off-by: Joe Guo <j...@catalyst.net.nz> Reviewed-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andreas Schneider <a...@samba.org> commit 50fde627811317aaea5d2c1525149c7fbdc8053c Author: Joe Guo <j...@catalyst.net.nz> Date: Fri Mar 8 14:49:06 2019 +1300 bootstrap/config.py: change UTF-8 to utf8 for locale name in Dockerfile ENV While generating locales, glibc/localedef/locale-gen will normalize `UTF-8` to `utf8`, use same name style to avoid string mismatch issues. Signed-off-by: Joe Guo <j...@catalyst.net.nz> Reviewed-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andreas Schneider <a...@samba.org> commit 9c33b193ff11009e0998f2cb0eecd315e6133280 Author: Joe Guo <j...@catalyst.net.nz> Date: Thu Mar 7 17:02:50 2019 +1300 bootstrap/config.py: mv locale setup from bootstrap.sh In future, samba developers could run `bootstrap.sh` to update dependencies on their workstation, this is very useful when new people get on board or new dependencies introduced. But currenly it will override locale, which is not expected for this case. Remove locale setup cmds from bootstrap.sh, add a separate script for this. Although this script is written in a generic way and has no variable so far, still follow the same routine as `bootstrap.sh` to keep consistent. Signed-off-by: Joe Guo <j...@catalyst.net.nz> Reviewed-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andreas Schneider <a...@samba.org> ----------------------------------------------------------------------- Summary of changes: .gitlab-ci.yml | 90 +++++++- bootstrap/.gitlab-ci.yml | 116 ++++++++++ bootstrap/READMD.md | 83 ++++--- bootstrap/config.py | 238 ++++++++++++++++----- bootstrap/dists/centos6/Dockerfile | 18 -- bootstrap/dists/centos7/Dockerfile | 18 -- bootstrap/dists/debian7/Dockerfile | 18 -- bootstrap/dists/debian8/Dockerfile | 18 -- bootstrap/dists/debian9/Dockerfile | 18 -- bootstrap/dists/fedora28/Dockerfile | 18 -- bootstrap/dists/fedora29/Dockerfile | 18 -- bootstrap/dists/ubuntu1404/Dockerfile | 18 -- bootstrap/dists/ubuntu1604/Dockerfile | 18 -- bootstrap/dists/ubuntu1804/Dockerfile | 18 -- bootstrap/docker.py | 164 -------------- bootstrap/{dists => generated-dists}/Vagrantfile | 24 +++ bootstrap/generated-dists/centos6/Dockerfile | 27 +++ .../centos6/bootstrap.sh | 53 +++-- bootstrap/generated-dists/centos6/locale.sh | 55 +++++ .../centos6/packages.yml | 34 ++- bootstrap/generated-dists/centos7/Dockerfile | 27 +++ .../centos7/bootstrap.sh | 53 +++-- bootstrap/generated-dists/centos7/locale.sh | 55 +++++ .../centos7/packages.yml | 34 ++- bootstrap/generated-dists/debian7/Dockerfile | 27 +++ .../debian7/bootstrap.sh | 61 +++--- bootstrap/generated-dists/debian7/locale.sh | 55 +++++ .../debian7/packages.yml | 38 +++- bootstrap/generated-dists/debian8/Dockerfile | 27 +++ .../debian8/bootstrap.sh | 61 +++--- bootstrap/generated-dists/debian8/locale.sh | 55 +++++ .../debian8/packages.yml | 38 +++- bootstrap/generated-dists/debian9/Dockerfile | 27 +++ .../debian9/bootstrap.sh | 61 +++--- bootstrap/generated-dists/debian9/locale.sh | 55 +++++ .../debian9/packages.yml | 38 +++- bootstrap/generated-dists/fedora28/Dockerfile | 27 +++ .../fedora28}/bootstrap.sh | 54 +++-- bootstrap/generated-dists/fedora28/locale.sh | 55 +++++ .../fedora28}/packages.yml | 35 ++- bootstrap/generated-dists/fedora29/Dockerfile | 27 +++ .../fedora29}/bootstrap.sh | 54 +++-- bootstrap/generated-dists/fedora29/locale.sh | 55 +++++ .../fedora29}/packages.yml | 35 ++- bootstrap/generated-dists/opensuse150/Dockerfile | 27 +++ bootstrap/generated-dists/opensuse150/bootstrap.sh | 104 +++++++++ bootstrap/generated-dists/opensuse150/locale.sh | 55 +++++ .../opensuse150}/packages.yml | 64 +++--- bootstrap/generated-dists/ubuntu1404/Dockerfile | 27 +++ .../ubuntu1404/bootstrap.sh | 61 +++--- bootstrap/generated-dists/ubuntu1404/locale.sh | 55 +++++ .../ubuntu1404/packages.yml | 38 +++- bootstrap/generated-dists/ubuntu1604/Dockerfile | 27 +++ .../ubuntu1604/bootstrap.sh | 61 +++--- bootstrap/generated-dists/ubuntu1604/locale.sh | 55 +++++ .../ubuntu1604/packages.yml | 38 +++- bootstrap/generated-dists/ubuntu1804/Dockerfile | 27 +++ .../ubuntu1804/bootstrap.sh | 61 +++--- bootstrap/generated-dists/ubuntu1804/locale.sh | 55 +++++ .../ubuntu1804/packages.yml | 38 +++- bootstrap/sha1sum.txt | 1 + bootstrap/template.py | 84 +++++++- 62 files changed, 2216 insertions(+), 780 deletions(-) create mode 100644 bootstrap/.gitlab-ci.yml delete mode 100644 bootstrap/dists/centos6/Dockerfile delete mode 100644 bootstrap/dists/centos7/Dockerfile delete mode 100644 bootstrap/dists/debian7/Dockerfile delete mode 100644 bootstrap/dists/debian8/Dockerfile delete mode 100644 bootstrap/dists/debian9/Dockerfile delete mode 100644 bootstrap/dists/fedora28/Dockerfile delete mode 100644 bootstrap/dists/fedora29/Dockerfile delete mode 100644 bootstrap/dists/ubuntu1404/Dockerfile delete mode 100644 bootstrap/dists/ubuntu1604/Dockerfile delete mode 100644 bootstrap/dists/ubuntu1804/Dockerfile delete mode 100755 bootstrap/docker.py rename bootstrap/{dists => generated-dists}/Vagrantfile (66%) create mode 100644 bootstrap/generated-dists/centos6/Dockerfile rename bootstrap/{dists => generated-dists}/centos6/bootstrap.sh (70%) mode change 100644 => 100755 create mode 100755 bootstrap/generated-dists/centos6/locale.sh rename bootstrap/{dists => generated-dists}/centos6/packages.yml (72%) create mode 100644 bootstrap/generated-dists/centos7/Dockerfile rename bootstrap/{dists => generated-dists}/centos7/bootstrap.sh (70%) mode change 100644 => 100755 create mode 100755 bootstrap/generated-dists/centos7/locale.sh rename bootstrap/{dists => generated-dists}/centos7/packages.yml (72%) create mode 100644 bootstrap/generated-dists/debian7/Dockerfile rename bootstrap/{dists => generated-dists}/debian7/bootstrap.sh (64%) mode change 100644 => 100755 create mode 100755 bootstrap/generated-dists/debian7/locale.sh rename bootstrap/{dists => generated-dists}/debian7/packages.yml (65%) create mode 100644 bootstrap/generated-dists/debian8/Dockerfile rename bootstrap/{dists => generated-dists}/debian8/bootstrap.sh (66%) mode change 100644 => 100755 create mode 100755 bootstrap/generated-dists/debian8/locale.sh rename bootstrap/{dists => generated-dists}/debian8/packages.yml (66%) create mode 100644 bootstrap/generated-dists/debian9/Dockerfile rename bootstrap/{dists => generated-dists}/debian9/bootstrap.sh (66%) mode change 100644 => 100755 create mode 100755 bootstrap/generated-dists/debian9/locale.sh rename bootstrap/{dists => generated-dists}/debian9/packages.yml (66%) create mode 100644 bootstrap/generated-dists/fedora28/Dockerfile rename bootstrap/{dists/fedora29 => generated-dists/fedora28}/bootstrap.sh (70%) mode change 100644 => 100755 create mode 100755 bootstrap/generated-dists/fedora28/locale.sh copy bootstrap/{dists/fedora29 => generated-dists/fedora28}/packages.yml (73%) create mode 100644 bootstrap/generated-dists/fedora29/Dockerfile rename bootstrap/{dists/fedora28 => generated-dists/fedora29}/bootstrap.sh (70%) mode change 100644 => 100755 create mode 100755 bootstrap/generated-dists/fedora29/locale.sh rename bootstrap/{dists/fedora28 => generated-dists/fedora29}/packages.yml (73%) create mode 100644 bootstrap/generated-dists/opensuse150/Dockerfile create mode 100755 bootstrap/generated-dists/opensuse150/bootstrap.sh create mode 100755 bootstrap/generated-dists/opensuse150/locale.sh rename bootstrap/{dists/fedora29 => generated-dists/opensuse150}/packages.yml (53%) create mode 100644 bootstrap/generated-dists/ubuntu1404/Dockerfile rename bootstrap/{dists => generated-dists}/ubuntu1404/bootstrap.sh (66%) mode change 100644 => 100755 create mode 100755 bootstrap/generated-dists/ubuntu1404/locale.sh rename bootstrap/{dists => generated-dists}/ubuntu1404/packages.yml (67%) create mode 100644 bootstrap/generated-dists/ubuntu1604/Dockerfile rename bootstrap/{dists => generated-dists}/ubuntu1604/bootstrap.sh (66%) mode change 100644 => 100755 create mode 100755 bootstrap/generated-dists/ubuntu1604/locale.sh rename bootstrap/{dists => generated-dists}/ubuntu1604/packages.yml (67%) create mode 100644 bootstrap/generated-dists/ubuntu1804/Dockerfile rename bootstrap/{dists => generated-dists}/ubuntu1804/bootstrap.sh (66%) mode change 100644 => 100755 create mode 100755 bootstrap/generated-dists/ubuntu1804/locale.sh rename bootstrap/{dists => generated-dists}/ubuntu1804/packages.yml (67%) create mode 100644 bootstrap/sha1sum.txt Changeset truncated at 500 lines: diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 505df7cdbe3..b940b433e30 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,17 +1,47 @@ # 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 + # + # The following images are available + # Please see the samba-o3 sections at the end of this file! + # We should run that for each available image + # + SAMBA_CI_CONTAINER_IMAGE_ubuntu1804: ${SAMBA_CI_CONTAINER_REGISTRY}/samba-ci-ubuntu1804:${SAMBA_CI_CONTAINER_TAG} + SAMBA_CI_CONTAINER_IMAGE_ubuntu1604: ${SAMBA_CI_CONTAINER_REGISTRY}/samba-ci-ubuntu1604:${SAMBA_CI_CONTAINER_TAG} + SAMBA_CI_CONTAINER_IMAGE_ubuntu1404: ${SAMBA_CI_CONTAINER_REGISTRY}/samba-ci-ubuntu1404:${SAMBA_CI_CONTAINER_TAG} + SAMBA_CI_CONTAINER_IMAGE_debian9: ${SAMBA_CI_CONTAINER_REGISTRY}/samba-ci-debian9:${SAMBA_CI_CONTAINER_TAG} + SAMBA_CI_CONTAINER_IMAGE_opensuse150: ${SAMBA_CI_CONTAINER_REGISTRY}/samba-ci-opensuse150:${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 + variables: + AUTOBUILD_JOB_NAME: $CI_JOB_NAME + # We use the ubuntu1404 image as default as + # it matches what we have on sn-devel-144. + image: $SAMBA_CI_CONTAINER_IMAGE_ubuntu1404 stage: build tags: - docker @@ -24,6 +54,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 @@ -45,8 +83,8 @@ variables: script: # gitlab predefines CI_JOB_NAME for each job. The gitlab job usually matches the # autobuild name, which means we can define a default template that runs most autobuild jobs - - echo "Running cmd script/autobuild.py $CI_JOB_NAME --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase" - - script/autobuild.py $CI_JOB_NAME --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase + - echo "Running cmd script/autobuild.py $AUTOBUILD_JOB_NAME --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase" + - script/autobuild.py $AUTOBUILD_JOB_NAME --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase others: extends: .shared_template @@ -76,9 +114,6 @@ samba-systemkrb5: samba-xc: extends: .shared_template -samba-o3: - extends: .shared_template - samba-ad-member: extends: .shared_template @@ -140,3 +175,36 @@ samba-nt4: samba-schemaupgrade: extends: .private_template + +# +# We build samba-o3 on all supported distributions +# + +.samba-o3-template: + extends: .shared_template + variables: + AUTOBUILD_JOB_NAME: samba-o3 + +ubuntu1804-samba-o3: + extends: .samba-o3-template + image: $SAMBA_CI_CONTAINER_IMAGE_ubuntu1804 + +ubuntu1604-samba-o3: + extends: .samba-o3-template + image: $SAMBA_CI_CONTAINER_IMAGE_ubuntu1604 + +ubuntu1404-samba-o3: + extends: .samba-o3-template + image: $SAMBA_CI_CONTAINER_IMAGE_ubuntu1404 + +debian9-samba-o3: + extends: .samba-o3-template + image: $SAMBA_CI_CONTAINER_IMAGE_debian9 + +opensuse150-samba-o3: + extends: .samba-o3-template + image: $SAMBA_CI_CONTAINER_IMAGE_opensuse150 + +# +# Keep the samba-o3 sections at the end ... +# diff --git a/bootstrap/.gitlab-ci.yml b/bootstrap/.gitlab-ci.yml new file mode 100644 index 00000000000..f6bbd9e0285 --- /dev/null +++ b/bootstrap/.gitlab-ci.yml @@ -0,0 +1,116 @@ +services: + - docker:dind + +.build_image_template: + image: docker:latest + stage: images + tags: + - docker + variables: + SAMBA_CI_IS_BROKEN_IMAGE: "no" + before_script: + # Ensure we are generating correct the container + - uname -a + - cat /etc/os-release + - echo "SAMBA_CI_CONTAINER_REGISTRY[${SAMBA_CI_CONTAINER_REGISTRY}]" + - echo "SAMBA_CI_CONTAINER_TAG[${SAMBA_CI_CONTAINER_TAG}]" + - echo "SAMBA_CI_IS_BROKEN_IMAGE[${SAMBA_CI_IS_BROKEN_IMAGE}]" + - echo "SAMBA_CI_REBUILD_IMAGES[${SAMBA_CI_REBUILD_IMAGES}]" + - echo "SAMBA_CI_REBUILD_BROKEN_IMAGES[${SAMBA_CI_REBUILD_BROKEN_IMAGES}]" + - echo "GITLAB_USER_LOGIN[${GITLAB_USER_LOGIN}]" + - echo "${SAMBA_CI_CONTAINER_TAG}" > /tmp/sha1sum-tag.txt + - diff -u bootstrap/sha1sum.txt /tmp/sha1sum-tag.txt + script: | + set -xueo pipefail + ci_image_name=samba-ci-${CI_JOB_NAME} + docker build -t ${ci_image_name} --build-arg SHA1SUM=${SAMBA_CI_CONTAINER_TAG} bootstrap/generated-dists/${CI_JOB_NAME} + ci_image_path="${SAMBA_CI_CONTAINER_REGISTRY}/${ci_image_name}" + timestamp=$(date +%Y%m%d%H%M%S) + docker_hash=$(docker image inspect --format='{{index .Id}}' ${ci_image_name} | cut -d : -f 2 | cut -c 1-9) + timestamp_tag=${SAMBA_CI_CONTAINER_TAG}-${timestamp}-${GITLAB_USER_LOGIN}-${docker_hash} + samba_repo_root=/home/samba/samba + # Ensure we are generating the correct container that we expect to be in + echo "${SAMBA_CI_CONTAINER_TAG}" > /tmp/sha1sum-tag.txt + diff -u bootstrap/sha1sum.txt /tmp/sha1sum-tag.txt + docker run --volume $(pwd):${samba_repo_root} --workdir ${samba_repo_root} ${ci_image_name} \ + /bin/bash -c "echo \"${SAMBA_CI_CONTAINER_TAG}\" > /tmp/sha1sum-tag.txt; diff -u bootstrap/sha1sum.txt /tmp/sha1sum-tag.txt" + docker run --volume $(pwd):${samba_repo_root} --workdir ${samba_repo_root} ${ci_image_name} \ + diff -u bootstrap/sha1sum.txt /sha1sum.txt + docker run --volume $(pwd):${samba_repo_root} --workdir ${samba_repo_root} ${ci_image_name} \ + bootstrap/template.py --sha1sum > /tmp/sha1sum-template.txt + diff -u bootstrap/sha1sum.txt /tmp/sha1sum-template.txt + # run smoke test with samba-o3 + docker run --volume $(pwd):${samba_repo_root} --workdir ${samba_repo_root} ${ci_image_name} \ + /bin/bash -c "sudo chown -R samba:samba ./** && script/autobuild.py samba-o3 --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase" + docker tag ${ci_image_name} ${ci_image_path}:${SAMBA_CI_CONTAINER_TAG} + docker tag ${ci_image_name} ${ci_image_path}:${timestamp_tag} + # We build all images, but only upload is it's not marked as broken + test x"${SAMBA_CI_IS_BROKEN_IMAGE}" = x"yes" || { \ + docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY; \ + docker push ${ci_image_path}:${SAMBA_CI_CONTAINER_TAG}; \ + docker push ${ci_image_path}:${timestamp_tag}; \ + } + echo "Success for ${ci_image_path}:${timestamp_tag}" + test x"${SAMBA_CI_IS_BROKEN_IMAGE}" = x"no" || { \ + echo "The image ${CI_JOB_NAME} is marked as broken and should have failed!"; \ + echo "Replace .build_image_template_force_broken with .build_image_template!"; \ + echo "Add a .samba-o3-template section at the end of the main .gitlab-ci.yml!"; \ + /bin/false; \ + } + only: + variables: + # + # You need a custom pipeline which passes + # SAMBA_CI_REBUILD_IMAGES="yes". + # + # https://gitlab.com/samba-team/devel/samba/pipelines/new + # + - $SAMBA_CI_REBUILD_IMAGES == "yes" + +.build_image_template_force_broken: + extends: .build_image_template + variables: + SAMBA_CI_IS_BROKEN_IMAGE: "yes" + only: + variables: + # + # You need a custom pipeline which passes + # SAMBA_CI_REBUILD_BROKEN_IMAGES="yes" + # in order to build broken images for debugging + # + # https://gitlab.com/samba-team/devel/samba/pipelines/new + # + - $SAMBA_CI_REBUILD_BROKEN_IMAGES == "yes" + +ubuntu1804: + extends: .build_image_template + +ubuntu1604: + extends: .build_image_template + +ubuntu1404: + extends: .build_image_template + +debian9: + extends: .build_image_template + +debian8: + extends: .build_image_template_force_broken + +debian7: + extends: .build_image_template_force_broken + +fedora29: + extends: .build_image_template_force_broken + +fedora28: + extends: .build_image_template_force_broken + +centos7: + extends: .build_image_template_force_broken + +centos6: + extends: .build_image_template_force_broken + +opensuse150: + extends: .build_image_template diff --git a/bootstrap/READMD.md b/bootstrap/READMD.md index 313c2056007..672c0522c77 100644 --- a/bootstrap/READMD.md +++ b/bootstrap/READMD.md @@ -13,7 +13,7 @@ A pure python3 module with CLI to bootstrap Samba envs for multiple distribution ## Supported Distributions deb: Debian 7|8|9, Ubuntu 1404|1604|1804 -rpm: CentOS 6|7, Fedora 28|29 +rpm: CentOS 6|7, Fedora 28|29, openSUSE Leap 15.0 Easy to add more. @@ -21,51 +21,80 @@ Easy to add more. Render files: - ./template.py --render + bootstrap/template.py --render -By default, files are rendered into `files` directory in current dir. +Files are rendered into `bootstrap/generated-dists` directory in current dir. +It also generates bootstrap/sha1sum.txt and prints out the sha1sum of the +current code/configuration. -Build docker images: +Just calculate the sha1sum for consistency checks: - ./docker.py --build + bootstrap/template.py --sha1sum -Tag docker images: +The checksum needs to be added as `SAMBA_CI_CONTAINER_TAG` in +the toplevel .gitlab-ci.yml file. - ./docker.py --tag --prefix registry.gitlab.com/samba-team/samba +## User Stories -Push docker images(you need to have permission): +As a gitlab-ci user, I can use this tool to build new CI docker images: - docker login - ./docker.py --push --prefix registry.gitlab.com/samba-team/samba + After committing the result of calling `bootstrap/template.py --render` + and updating `SAMBA_CI_CONTAINER_TAG` in .gitlab-ci.yml, you can push + The branch to g...@gitlab.com:samba-team/devel/samba.git using: -the prefix defaults to `registry.gitlab.com/samba-team/samba`, and you can -override it with env var `SAMBA_DOCKER_IMAGE_NAME_PREFIX`. + git push -o ci.skip g...@gitlab.com:samba-team/devel/samba.git ... -## User Stories + The `-o ci.skip` option means gitlab won't start a pipeline + for the just pushed branch. + + Instead you would start a custom pipeline at: + + https://gitlab.com/samba-team/devel/samba/pipelines/new + + But you need to pass `SAMBA_CI_REBUILD_IMAGES=yes` as environment + variable. It means the pipeline runs the 'images' stage and builds + the new container images for all supported distributions and + uploads the images into the registry.gitlab.com/samba-team/devel/samba + container registry. + + If you want to try to build images for the (currently) broken + distributions, you would pass `SAMBA_CI_REBUILD_BROKEN_IMAGES=yes` + in addition to the custom pipeline. Note the images for + the broken distributions are just build, but not uploaded + to the container registry. And any failures in the image + creation is ignored. Once you managed to get success, you should + move from `.build_image_template_force_broken` to `.build_image_template`. + And also add a `.samba-o3-template` job for the new image + in the main .gitlab-ci.yml file. -As a gitlab-ci maintainer, I can use this tool to build the CI docker images. -I can also automate it. + Over time we'll get a lot of images pushed to the container registry. + The approach we're using allows gitlab project maintainers to + remove old images! But it is possible to regenerate the images + if you have the need to run a gitlab ci pipeline based on an + older branch. As a Samba developer/tester, I can setup a Samba env very quickly. With Docker: - cd ~/samba - git clean -xdf - docker run -it -v $(pwd):/home/samba/samba samba-ubuntu1604:latest bash + cd ~/samba + git clean -xdf + docker login + docker pull registry.gitlab.com/samba-team/devel/samba/samba-ci-ubuntu1804:${sha1sum} + docker run -it -v $(pwd):/home/samba/samba samba-ci-ubuntu1804:${sha1sum} bash With Vagrant: - cd ./files/ - vagrant up # start all - vagrant up debian9 # start one - vagrant ssh debian9 - vagrant destroy debian9 # destroy one - vagrant destroy # destroy all + cd bootstrap/generated-dists/ + vagrant up # start all + vagrant up debian9 # start one + vagrant ssh debian9 + vagrant destroy debian9 # destroy one + vagrant destroy # destroy all Or a remote/cloud machine: - scp ./files/fedora29/bootstrap.sh USER@IP: - ssh USER@IP - sudo bash ./bootstrap.sh + scp bootstrap/generated-dists/fedora29/bootstrap.sh USER@IP: + ssh USER@IP + sudo bash ./bootstrap.sh diff --git a/bootstrap/config.py b/bootstrap/config.py index 3cb14556130..8d85dce1e83 100644 --- a/bootstrap/config.py +++ b/bootstrap/config.py @@ -26,26 +26,33 @@ import os from os.path import abspath, dirname, join HERE = abspath(dirname(__file__)) # output dir for rendered files -OUT = join(HERE, 'dists') +OUT = join(HERE, 'generated-dists') # pkgs with same name in all packaging systems COMMON = [ + 'acl', 'attr', 'autoconf', 'binutils', 'bison', - 'ccache', 'curl', 'gcc', 'gdb', 'git', + 'gzip', + 'hostname', + 'htop', 'make', + 'patch', 'perl', 'psmisc', # for pstree in test + 'rng-tools', + 'rsync', + 'sed', 'sudo', # docker images has no sudo by default - 'vim', - 'wget', + 'tar', + 'tree', ] @@ -55,15 +62,14 @@ COMMON = [ # deb, rpm, ... PKGS = [ # NAME1-dev, NAME2-devel - ('lmdb-utils', 'lmdb-devel'), + ('lmdb-utils', 'lmdb'), ('nettle-dev', 'nettle-devel'), ('zlib1g-dev', 'zlib-devel'), ('libbsd-dev', 'libbsd-devel'), ('libaio-dev', 'libaio-devel'), ('libarchive-dev', 'libarchive-devel'), ('libblkid-dev', 'libblkid-devel'), - ('libxml2-dev', 'libxml2-devel'), - ('libcap-dev', 'libpcap-devel'), + ('libcap-dev', 'libcap-devel'), ('libacl1-dev', 'libacl-devel'), ('libattr1-dev', 'libattr-devel'), @@ -82,7 +88,17 @@ PKGS = [ ('libgpgme11-dev', 'gpgme-devel'), # NOTE: Debian 8+ and Ubuntu 14.04+ ('libgnutls28-dev', 'gnutls-devel'), + ('libtasn1-bin', ''), + ('libtasn1-dev', 'libtasn1-devel'), + ('', 'quota-devel'), + ('uuid-dev', 'libuuid-devel'), + ('libjs-jquery', ''), + ('libavahi-common-dev', 'avahi-devel'), ('libdbus-1-dev', 'dbus-devel'), + ('libpcap-dev', 'libpcap-devel'), + ('libunwind-dev', 'libunwind-devel'), # for back trace + ('libglib2.0-dev', 'glib2-devel'), + ('libicu-dev', 'libicu-devel'), # NAME1, NAME2 # for debian, locales provide locale support with language packs @@ -91,43 +107,54 @@ PKGS = [ # fedora split language packs to glibc-langpack-xx ('locales', 'glibc-common'), # required for locale ('language-pack-en', 'glibc-langpack-en'), # we need en_US.UTF-8 - ('', 'glibc-locale-source'), # for localedef - ('bind9', 'bind'), ('bind9utils', 'bind-utils'), ('dnsutils', ''), - ('locate', 'mlocate'), ('xsltproc', 'libxslt'), - ('krb5-kdc', 'krb5-workstation'), + ('krb5-user', ''), + ('krb5-config', ''), + ('', 'krb5-server'), ('apt-utils', 'yum-utils'), ('pkg-config', 'pkgconfig'), ('procps', 'procps-ng'), # required for the free cmd in tests - ('lsb-core', 'redhat-lsb'), # we need lsb_relase to show info + ('lsb-release', 'lsb-release'), # we need lsb_relase to show info ('', 'rpcgen'), # required for test # refer: https://fedoraproject.org/wiki/Changes/SunRPCRemoval ('', 'libtirpc-devel'), # for <rpc/rpc.h> header on fedora ('', 'libnsl2-devel'), # for <rpcsvc/yp_prot.h> header on fedora + ('mawk', 'gawk'), # python ('python-dev', 'python-devel'), + ('python-dbg', ''), + ('python-iso8601', ''), ('python-gpg', 'python2-gpg'), # defaults to ubuntu/fedora latest ('python-crypto', 'python-crypto'), ('python-markdown', 'python-markdown'), ('python-dnspython', 'python-dns'), + ('python-pexpect', ''), # for wintest only ('python3-dev', 'python3-devel'), + ('python3-dbg', ''), + ('python3-iso8601', ''), ('python3-gpg', 'python3-gpg'), # defaults to ubuntu/fedora latest ('python3-crypto', 'python3-crypto'), ('python3-markdown', 'python3-markdown'), + ('python3-matplotlib', ''), ('python3-dnspython', 'python3-dns'), + ('python3-pexpect', ''), # for wintest only ('', 'libsemanage-python'), ('', 'policycoreutils-python'), # perl -- Samba Shared Repository