[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 36/41] containers.yml: build with docker.py tooling
From: |
Alex Bennée |
Subject: |
[PULL 36/41] containers.yml: build with docker.py tooling |
Date: |
Tue, 7 Jul 2020 08:08:53 +0100 |
Instead of building the docker files directly use the same docker.py
scripting as we do for building locally. This should help ensure we
use the exact same steps and allow us to cache properly when building
locally.
To get this working you have to have a fairly recent docker binary
otherwise you will see the error message:
=> ERROR importing cache manifest from registry.gitlab....
So far docker 19.03.12 works (from the docker apt repos) but 18.09.1,
build 4c52b90 which is packaged in Debian Buster fails.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20200701135652.1366-39-alex.bennee@linaro.org>
diff --git a/.gitlab-ci.d/containers.yml b/.gitlab-ci.d/containers.yml
index ea350eacff70..b1e39cfd9ac1 100644
--- a/.gitlab-ci.d/containers.yml
+++ b/.gitlab-ci.d/containers.yml
@@ -6,14 +6,17 @@
before_script:
- export TAG="$CI_REGISTRY_IMAGE/qemu/$NAME:latest"
- export COMMON_TAG="$CI_REGISTRY/qemu-project/qemu/$NAME:latest"
+ - apk add python3
- docker info
- docker login registry.gitlab.com -u "$CI_REGISTRY_USER" -p
"$CI_REGISTRY_PASSWORD"
script:
+ - echo "TAG:$TAG"
+ - echo "COMMON_TAG:$COMMON_TAG"
- docker pull "$TAG" || docker pull "$COMMON_TAG" || true
- - sed -i -e "s,FROM qemu/,FROM $CI_REGISTRY_IMAGE/qemu/,"
tests/docker/dockerfiles/$NAME.docker
- - DOCKER_BUILDKIT=1 docker build --cache-from "$TAG" --cache-from
"$COMMON_TAG" --tag "$TAG"
- --build-arg BUILDKIT_INLINE_CACHE=1
- -f
"tests/docker/dockerfiles/$NAME.docker" tests/docker/dockerfiles
+ - ./tests/docker/docker.py --engine docker build
+ -t "qemu:$NAME" -f "tests/docker/dockerfiles/$NAME.docker"
+ -r $CI_REGISTRY_IMAGE
+ - docker tag "qemu:$NAME" "$TAG"
- docker push "$TAG"
after_script:
- docker logout
--
2.20.1
- [PULL 29/41] tests/tcg: add more default compilers to configure.sh, (continued)
- [PULL 29/41] tests/tcg: add more default compilers to configure.sh, Alex Bennée, 2020/07/07
- [PULL 41/41] tests/qht-bench: Adjust threshold computation, Alex Bennée, 2020/07/07
- [PULL 28/41] gitlab: add acceptance testing to system builds, Alex Bennée, 2020/07/07
- [PULL 31/41] linux-user/elfload: use MAP_FIXED_NOREPLACE in pgb_reserved_va, Alex Bennée, 2020/07/07
- [PULL 20/41] gitlab: convert jobs to use custom built containers, Alex Bennée, 2020/07/07
- [PULL 39/41] travis.yml: Test also the other targets on s390x, Alex Bennée, 2020/07/07
- [PULL 18/41] gitlab: introduce explicit "container" and "build" stages, Alex Bennée, 2020/07/07
- [PULL 16/41] .gitignore: un-ignore .gitlab-ci.d, Alex Bennée, 2020/07/07
- [PULL 17/41] gitlab-ci: Fix the change rules after moving the YML files, Alex Bennée, 2020/07/07
- [PULL 27/41] tests/acceptance: skip LinuxInitrd 2gib with v4.16 on GitLab, Alex Bennée, 2020/07/07
- [PULL 36/41] containers.yml: build with docker.py tooling,
Alex Bennée <=
- [PULL 25/41] tests/acceptance: fix dtb path for machine_rx_gdbsim, Alex Bennée, 2020/07/07
- [PULL 34/41] gitlab: split build-disabled into two phases, Alex Bennée, 2020/07/07
- [PULL 35/41] gitlab: limit re-builds of the containers, Alex Bennée, 2020/07/07
- [PULL 23/41] tests/docker: add packages needed for check-acceptance, Alex Bennée, 2020/07/07
- [PULL 38/41] shippable: pull images from registry instead of building, Alex Bennée, 2020/07/07
- [PULL 32/41] gitlab: enable check-tcg for linux-user tests, Alex Bennée, 2020/07/07
- [PULL 26/41] tests/acceptance: skip multicore mips_malta tests on GitLab, Alex Bennée, 2020/07/07
- [PULL 40/41] tests/qht-bench: Adjust testing rate by -1, Alex Bennée, 2020/07/07
- [PULL 24/41] tests/acceptance: skip s390x_ccw_vrtio_tcg on GitLab, Alex Bennée, 2020/07/07
- [PULL 21/41] gitlab: build containers with buildkit and metadata, Alex Bennée, 2020/07/07