Re: [PATCH v5 14/14] gitlab-ci: do not use qemu-project Docker registry

2021-07-08 Thread Alessandro Di Federico via
On Tue, 29 Jun 2021 15:37:21 +0100
Daniel P. Berrangé  wrote:

> We have either one or two images.  If this is a new user fork,
> we only have the $COMMON_TAG image in the main QEMU registry.
> If this is a existing fork, we might have two images, one in
> the main QEMU registry and one in the user's fork registry.
> Both of the images are to be used as a cache source, with
> the container tools figuring out which has matching image
> layers, if any.
>
> This proposed change makes TAG and COMMON_TAG identical
> which means we loose inheritance from the main QEMU
> registry, which almost always has suitable cached content.

I understand. This patch was aimed at pointing out a problem more than
offering a proper solution.

I'll try and take a look at how to do this right, but I think this
outside the scope of this patchset (and my area of expertise).

-- 
Alessandro Di Federico
rev.ng



Re: [PATCH v5 14/14] gitlab-ci: do not use qemu-project Docker registry

2021-06-29 Thread Daniel P . Berrangé
On Sat, Jun 19, 2021 at 11:37:13AM +0200, Alessandro Di Federico via wrote:
> From: Alessandro Di Federico 
> 
> This commit is necessary in order to use container built by the current
> run of the CI. If we don't do this, we use official containers which are
> not affected by the additional dependencies we're introducing.
> 
> Signed-off-by: Alessandro Di Federico 
> ---
>  .gitlab-ci.d/container-cross.yml| 2 +-
>  .gitlab-ci.d/container-template.yml | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/.gitlab-ci.d/container-cross.yml 
> b/.gitlab-ci.d/container-cross.yml
> index 0fcebe363a..eb134e927d 100644
> --- a/.gitlab-ci.d/container-cross.yml
> +++ b/.gitlab-ci.d/container-cross.yml
> @@ -63,7 +63,7 @@ hexagon-cross-container:
>  - docker:dind
>before_script:
>  - export TAG="$CI_REGISTRY_IMAGE/qemu/$NAME:latest"
> -- export COMMON_TAG="$CI_REGISTRY/qemu-project/qemu/qemu/$NAME:latest"
> +- export COMMON_TAG="$CI_REGISTRY_IMAGE/qemu/$NAME:latest"

This isn't right.

We have either one or two images.  If this is a new user fork,
we only have the $COMMON_TAG image in the main QEMU registry.
If this is a existing fork, we might have two images, one in
the main QEMU registry and one in the user's fork registry.
Both of the images are to be used as a cache source, with
the container tools figuring out which has matching image
layers, if any.

This proposed change makes TAG and COMMON_TAG identical
which means we loose inheritance from the main QEMU
registry, which almost always has suitable cached content.


>  - docker info
>  - docker login $CI_REGISTRY -u "$CI_REGISTRY_USER" -p 
> "$CI_REGISTRY_PASSWORD"
>script:
> diff --git a/.gitlab-ci.d/container-template.yml 
> b/.gitlab-ci.d/container-template.yml
> index 1baecd9460..c85ae377b8 100644
> --- a/.gitlab-ci.d/container-template.yml
> +++ b/.gitlab-ci.d/container-template.yml
> @@ -5,7 +5,7 @@
>  - 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_IMAGE/qemu/$NAME:latest"
>  - apk add python3
>  - docker info
>  - docker login $CI_REGISTRY -u "$CI_REGISTRY_USER" -p 
> "$CI_REGISTRY_PASSWORD"

Again this is wrong.


> @@ -14,7 +14,7 @@
>  - 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
> +  -r $CI_REGISTRY_IMAGE

I'm not sure about this one though.

>  - docker tag "qemu/$NAME" "$TAG"
>  - docker push "$TAG"
>after_script:

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 :|




Re: [PATCH v5 14/14] gitlab-ci: do not use qemu-project Docker registry

2021-06-29 Thread Alessandro Di Federico via
On Sat, 19 Jun 2021 11:37:13 +0200
Alessandro Di Federico  wrote:

> From: Alessandro Di Federico 
> 
> This commit is necessary in order to use container built by the
> current run of the CI. If we don't do this, we use official
> containers which are not affected by the additional dependencies
> we're introducing.
> 
> Signed-off-by: Alessandro Di Federico 

Alex, what do you think about this?

-- 
Alessandro Di Federico
rev.ng



[PATCH v5 14/14] gitlab-ci: do not use qemu-project Docker registry

2021-06-19 Thread Alessandro Di Federico via
From: Alessandro Di Federico 

This commit is necessary in order to use container built by the current
run of the CI. If we don't do this, we use official containers which are
not affected by the additional dependencies we're introducing.

Signed-off-by: Alessandro Di Federico 
---
 .gitlab-ci.d/container-cross.yml| 2 +-
 .gitlab-ci.d/container-template.yml | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/.gitlab-ci.d/container-cross.yml b/.gitlab-ci.d/container-cross.yml
index 0fcebe363a..eb134e927d 100644
--- a/.gitlab-ci.d/container-cross.yml
+++ b/.gitlab-ci.d/container-cross.yml
@@ -63,7 +63,7 @@ hexagon-cross-container:
 - docker:dind
   before_script:
 - export TAG="$CI_REGISTRY_IMAGE/qemu/$NAME:latest"
-- export COMMON_TAG="$CI_REGISTRY/qemu-project/qemu/qemu/$NAME:latest"
+- export COMMON_TAG="$CI_REGISTRY_IMAGE/qemu/$NAME:latest"
 - docker info
 - docker login $CI_REGISTRY -u "$CI_REGISTRY_USER" -p 
"$CI_REGISTRY_PASSWORD"
   script:
diff --git a/.gitlab-ci.d/container-template.yml 
b/.gitlab-ci.d/container-template.yml
index 1baecd9460..c85ae377b8 100644
--- a/.gitlab-ci.d/container-template.yml
+++ b/.gitlab-ci.d/container-template.yml
@@ -5,7 +5,7 @@
 - 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_IMAGE/qemu/$NAME:latest"
 - apk add python3
 - docker info
 - docker login $CI_REGISTRY -u "$CI_REGISTRY_USER" -p 
"$CI_REGISTRY_PASSWORD"
@@ -14,7 +14,7 @@
 - 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
+  -r $CI_REGISTRY_IMAGE
 - docker tag "qemu/$NAME" "$TAG"
 - docker push "$TAG"
   after_script:
-- 
2.31.1