On a Wednesday in 2020, Andrea Bolognani wrote:
On Wed, 2020-07-29 at 01:36 +0200, Ján Tomko wrote:
> Make the pipeline chart more interesting.
Maybe include a short summary of the actual motivation here :)
> +++ b/.gitlab-ci.yml
> @@ -268,41 +268,49 @@ mingw64-fedora-rawhide-container:
>
> x64-debian-10:
> <<: *native_build_job_definition
> + needs: ["x64-debian-10-container"]
> variables:
> NAME: debian-10
Why are you limiting this change to a subset of the build jobs?
It goes in line with the actual motivation mentioned in the commit
message ;)
That is: I wanted to get some parallelism running quickly without
figuring out what the other jobs depend on or how to put it to
writing efficiently in this beautiful, whitespace-based language.
It
seems to me that this approach can be used for all of them, both
native and cross.
And please use the
needs:
- x64-debian-10-container
syntax, since that's what we use for lists everywhere else.
Oh, okay.
I also thought we could make this much nicer by using something
like
.native_build_job_template: &native_build_job_definition
stage: builds
image: $CI_REGISTRY_IMAGE/ci-$NAME:latest
needs:
- x64-$NAME-container
...
.cross_build_default_job_template: &cross_build_job_definition
stage: builds
image: $CI_REGISTRY_IMAGE/ci-$NAME-cross-$CROSS:latest
needs:
- $CROSS-$NAME-container
...
x64-debian-10:
<<: *native_build_job_definition
variables:
NAME: debian-10
aarch64-debian-10:
<<: *cross_build_job_definition
variables:
NAME: debian-10
CROSS: aarch64
but it turns out that GitLab doesn't support variable expansion
inside of 'needs', so that's unfortunately not viable :(
Thanks, now I feel better about being too lazy
to try it in the first place.
Jano