[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v2 15/24] gitlab: Use plain docker in container-template.yml
From: |
Alex Bennée |
Subject: |
[PULL v2 15/24] gitlab: Use plain docker in container-template.yml |
Date: |
Wed, 1 Mar 2023 15:15:55 +0000 |
From: Fabiano Rosas <farosas@suse.de>
Our dockerfiles no longer reference layers from other qemu images so
we can now use 'docker build' on them.
Also reinstate the caching that was disabled due to bad interactions
with certain runners. See commit 6ddc3dc7a8 ("tests/docker: don't use
BUILDKIT in GitLab either"). We now believe those issues to be fixed.
The COMMON_TAG needed to be fixed for the caching to work. The
docker.py script was not using the variable, but constructing the
correct URL directly.
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Tested-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20230227151110.31455-2-farosas@suse.de>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20230228190653.1602033-16-alex.bennee@linaro.org>
diff --git a/.gitlab-ci.d/container-template.yml
b/.gitlab-ci.d/container-template.yml
index c434b9c8f3..519b8a9482 100644
--- a/.gitlab-ci.d/container-template.yml
+++ b/.gitlab-ci.d/container-template.yml
@@ -6,17 +6,16 @@
- docker:dind
before_script:
- export TAG="$CI_REGISTRY_IMAGE/qemu/$NAME:latest"
- - export COMMON_TAG="$CI_REGISTRY/qemu-project/qemu/$NAME:latest"
+ - export COMMON_TAG="$CI_REGISTRY/qemu-project/qemu/qemu/$NAME:latest"
- apk add python3
- docker info
- docker login $CI_REGISTRY -u "$CI_REGISTRY_USER" -p
"$CI_REGISTRY_PASSWORD"
script:
- echo "TAG:$TAG"
- echo "COMMON_TAG:$COMMON_TAG"
- - ./tests/docker/docker.py --engine docker build
- -t "qemu/$NAME" -f "tests/docker/dockerfiles/$NAME.docker"
- -r $CI_REGISTRY/qemu-project/qemu
- - docker tag "qemu/$NAME" "$TAG"
+ - docker build --tag "$TAG" --cache-from "$TAG" --cache-from "$COMMON_TAG"
+ --build-arg BUILDKIT_INLINE_CACHE=1
+ -f "tests/docker/dockerfiles/$NAME.docker" "."
- docker push "$TAG"
after_script:
- docker logout
--
2.39.2
- [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows), Alex Bennée, 2023/03/01
- [PULL v2 04/24] tests: make fp-test less chatty when running from test suite, Alex Bennée, 2023/03/01
- [PULL v2 09/24] tests: skip the nios2 replay_kernel test, Alex Bennée, 2023/03/01
- [PULL v2 05/24] gitlab-ci: Use artifacts instead of dumping logs in the Cirrus-CI jobs, Alex Bennée, 2023/03/01
- [PULL v2 02/24] tests: add socat dependency for tests, Alex Bennée, 2023/03/01
- [PULL v2 06/24] gitlab: extend custom runners with base_job_template, Alex Bennée, 2023/03/01
- [PULL v2 08/24] testing: update ubuntu2004 to ubuntu2204, Alex Bennée, 2023/03/01
- [PULL v2 10/24] tests: add tuxrun baseline test to avocado, Alex Bennée, 2023/03/01
- [PULL v2 07/24] tests: don't run benchmarks for the tsan build, Alex Bennée, 2023/03/01
- [PULL v2 15/24] gitlab: Use plain docker in container-template.yml,
Alex Bennée <=
- [PULL v2 01/24] tests: don't run socat tests on MacOS as well, Alex Bennée, 2023/03/01
- [PULL v2 03/24] tests: be a bit more strict cleaning up fifos, Alex Bennée, 2023/03/01
- [PULL v2 11/24] tests/docker: Use binaries for debian-tricore-cross, Alex Bennée, 2023/03/01
- [PULL v2 18/24] tests/lcitool: append user setting stanza to dockerfiles, Alex Bennée, 2023/03/01
- [PULL v2 14/24] tests/dockerfiles: unify debian-toolchain references, Alex Bennée, 2023/03/01
- [PULL v2 20/24] tests/docker: use direct RUNC call to build containers, Alex Bennée, 2023/03/01
- [PULL v2 19/24] tests/docker: add USER stanzas to non-lci images, Alex Bennée, 2023/03/01
- [PULL v2 24/24] tests/avocado: disable BootLinuxPPC64 test in CI, Alex Bennée, 2023/03/01
- [PULL v2 23/24] tests/docker: add zstdtools to the images, Alex Bennée, 2023/03/01
- [PULL v2 13/24] cirrus.yml: Improve the windows_msys2_task, Alex Bennée, 2023/03/01