diff mbox series

[RFC,v2,1/3] gitlab: Use plain docker in container-template.yml

Message ID 20230224125207.19616-2-farosas@suse.de
State New
Headers show
Series ci: Speed up container stage | expand

Commit Message

Fabiano Rosas Feb. 24, 2023, 12:52 p.m. UTC
Our dockerfiles no longer reference layers from other qemu images so
we can now use 'docker build' on them.

Signed-off-by: Fabiano Rosas <farosas@suse.de>
---
 .gitlab-ci.d/container-template.yml | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Daniel P. Berrangé Feb. 27, 2023, 11:11 a.m. UTC | #1
On Fri, Feb 24, 2023 at 09:52:05AM -0300, Fabiano Rosas wrote:
> Our dockerfiles no longer reference layers from other qemu images so
> we can now use 'docker build' on them.
> 
> Signed-off-by: Fabiano Rosas <farosas@suse.de>
> ---
>  .gitlab-ci.d/container-template.yml | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/.gitlab-ci.d/container-template.yml b/.gitlab-ci.d/container-template.yml
> index c434b9c8f3..f417452212 100644
> --- a/.gitlab-ci.d/container-template.yml
> +++ b/.gitlab-ci.d/container-template.yml
> @@ -13,10 +13,7 @@
>    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 -f "tests/docker/dockerfiles/$NAME.docker" "."
>      - docker push "$TAG"

I think I wouldn't separate this from patch 2, because in effect
we're throwing away caching here, and then re-adding it in the
next patch. IOW, the removal of usage of docker.py requires both
patches combined.


With regards,
Daniel
diff mbox series

Patch

diff --git a/.gitlab-ci.d/container-template.yml b/.gitlab-ci.d/container-template.yml
index c434b9c8f3..f417452212 100644
--- a/.gitlab-ci.d/container-template.yml
+++ b/.gitlab-ci.d/container-template.yml
@@ -13,10 +13,7 @@ 
   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 -f "tests/docker/dockerfiles/$NAME.docker" "."
     - docker push "$TAG"
   after_script:
     - docker logout