[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH v3 1/1] gitlab: Use plain docker in container-template.ym
From: |
Daniel P . Berrangé |
Subject: |
Re: [RFC PATCH v3 1/1] gitlab: Use plain docker in container-template.yml |
Date: |
Tue, 28 Feb 2023 10:14:03 +0000 |
User-agent: |
Mutt/2.2.9 (2022-11-12) |
On Mon, Feb 27, 2023 at 12:11:10PM -0300, Fabiano Rosas wrote:
> 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>
> ---
> .gitlab-ci.d/container-template.yml | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
Tested-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
>
> 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.35.3
>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
- [RFC PATCH v3 0/1] ci: Speed up container stage, Fabiano Rosas, 2023/02/27
- [RFC PATCH v3 1/1] gitlab: Use plain docker in container-template.yml, Fabiano Rosas, 2023/02/27
- Re: [RFC PATCH v3 1/1] gitlab: Use plain docker in container-template.yml, Alex Bennée, 2023/02/27
- Re: [RFC PATCH v3 1/1] gitlab: Use plain docker in container-template.yml, Alex Bennée, 2023/02/27
- Re: [RFC PATCH v3 1/1] gitlab: Use plain docker in container-template.yml, Fabiano Rosas, 2023/02/27
- Re: [RFC PATCH v3 1/1] gitlab: Use plain docker in container-template.yml, Fabiano Rosas, 2023/02/27
- Re: [RFC PATCH v3 1/1] gitlab: Use plain docker in container-template.yml, Daniel P . Berrangé, 2023/02/28
- Re: [RFC PATCH v3 1/1] gitlab: Use plain docker in container-template.yml, Alex Bennée, 2023/02/28
- Re: [RFC PATCH v3 1/1] gitlab: Use plain docker in container-template.yml,
Daniel P . Berrangé <=
- Re: [RFC PATCH v3 0/1] ci: Speed up container stage, Alex Bennée, 2023/02/28