I *think* it should be enough to simply use an intermediate variable
(say IMAGE) in the matrix and job templates.

Please find a patch that *may* solve the problem attached.

Best regards,
Fedorov Alexander.

On Fri, 26 Jan 2024 at 19:43, Alexander Fedorov <varedif....@gmail.com> wrote:
>
> Hello,
>
> It seems that `image` is not a variable, but a "job keyword", and thus
> cannot be directly set in the matrix.
>
> https://docs.gitlab.com/ee/ci/yaml/?query=image
> > Keyword type: Job keyword. You can use it only as part of a job or in the 
> > default section.
>
> Best regards,
> Fedorov Alexander.
>
>
>
>
> On Fri, 26 Jan 2024 at 18:03, Robert Goldman <rpgold...@sift.net> wrote:
> >
> > I have created a new docker image for Allegro CL version 11.0 
> > (express/free), and put it on DockerHub: 
> > https://hub.docker.com/repository/docker/rpgoldman/allegro11express/general
> >
> > I have tried to add regression and upgrade tests using this Docker Image -- 
> > see Regression test and Upgrade test.
> >
> > Unfortunately, these tests don't work! They print the right information at 
> > the head of the job:
> >
> > Regression test: [allegro, rpgoldman/allegro11express, modern] :
> >
> > But they pull the wrong docker image:
> >
> > Using Docker executor with image 
> > containers.common-lisp.net/cl-docker-images/allegro:latest ...
> > Authenticating with credentials from job payload (GitLab Registry)
> > Pulling docker image 
> > containers.common-lisp.net/cl-docker-images/allegro:latest ...
> > Using docker image 
> > sha256:d0fc75f61208fa39497f5ae2188d6d70d4b65ae513105dbdf80f85b41a45ffdc for 
> > containers.common-lisp.net/cl-docker-images/allegro:latest with digest 
> > containers.common-lisp.net/cl-docker-images/allegro@sha256:e16f3a55a2d829732a438c363dc6905754c46ca595e868377ed61faeeda44fdb
> >  ...
> >
> > Does anyone on the list understand GitLab pipelines well enough to tell me 
> > why my image variable binding in "Regression test" and "Upgrade test" 
> > doesn't clobber the value from the template? Or, even more oddly, why it 
> > seems to half-way clobber it, giving the right info print, but pulling the 
> > wrong image?
> >
> > Sorry to bother the list, but I'm at my wits end and the debugging tools 
> > and documentation are somewhere between horrible and non-existent.
> >
> > Thanks for any advice,
> >
> > R
From 06ae8134d3d73a8f9ef12dd75c91e6869e6b7209 Mon Sep 17 00:00:00 2001
From: Gleefre <varedif....@gmail.com>
Date: Fri, 26 Jan 2024 20:21:52 +0100
Subject: [PATCH] Allows to override the IMAGE in the standard pipeline.

image is a job keyword and cannot be set in the matrix.
Use an intermediate variable (IMAGE) instead.
---
 gitlab-pipelines/standard-pipeline.yml | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/gitlab-pipelines/standard-pipeline.yml b/gitlab-pipelines/standard-pipeline.yml
index 073eaaf9..67f16667 100644
--- a/gitlab-pipelines/standard-pipeline.yml
+++ b/gitlab-pipelines/standard-pipeline.yml
@@ -57,9 +57,10 @@ Build docs:
 
 .Regression test template:
   stage: regression
-  image: containers.common-lisp.net/cl-docker-images/$l:$IMAGE_TAG
+  image: $IMAGE
   variables:
     IMAGE_TAG: latest
+    IMAGE: containers.common-lisp.net/cl-docker-images/$l:$IMAGE_TAG
   script:
     - export l=$l$variant
     - make
@@ -88,9 +89,9 @@ Regression test:
       - l: abcl
         IMAGE_TAG: 1.7.1-jdk8
       - l: allegro
-        image: rpgoldman/allegro11express
+        IMAGE: rpgoldman/allegro11express
       - l: allegro
-        image: rpgoldman/allegro11express
+        IMAGE: rpgoldman/allegro11express
         variant: modern
 
 ###############################################################################
@@ -99,9 +100,10 @@ Regression test:
 
 .Upgrade test template:
   stage: upgrade
-  image: containers.common-lisp.net/cl-docker-images/$l:$IMAGE_TAG
+  image: $IMAGE
   variables:
     IMAGE_TAG: latest
+    IMAGE: containers.common-lisp.net/cl-docker-images/$l:$IMAGE_TAG
   script:
     - export l=$l$variant
     - make
@@ -126,9 +128,9 @@ Upgrade test:
         IMAGE_TAG: latest
         variant: modern
       - l: allegro
-        image: rpgoldman/allegro11express
+        IMAGE: rpgoldman/allegro11express
       - l: allegro
-        image: rpgoldman/allegro11express
+        IMAGE: rpgoldman/allegro11express
         variant: modern
 
 # No more tests are known to fail. But leave commented out in case it needs to
-- 
2.39.2

Reply via email to