Issue with "Include stage" not using "default: image:"

Problem to solve

I am trying to set in the .gitlab-ci.yml a:

default:
  image: artifacts.company.org/image:1.1

so I don’t have to include them in my sub yaml files that are included with:

env_one_build:
    stage: Environments
    needs:
        - job: lint
    trigger:
        include:
            - local: .ci/environmentOne-ci.yml

I am not seeing my subsequent Build stage (i.e. environmentOne-ci.yml) including this image. Instead, it is pulling in:

Using Docker executor with image node:14.15.2-slim ...
Pulling docker image node:14.15.2-slim ...

environmentOne-ci.yml

stages:
  - Build

.build_env_one: &build_env_one
  stage: Build
  script:
    - gradle assemble$ENV
  when: manual
  tags:
      - docker

prod:
    variables:
        ENV: "release"
    <<: *build_env_one

However, for my other job in my .gitlab-ci.yml it seems to use the image fine. Is the trigger: include: local: too late on merging to include that default value in the subsequent stage?

.gitlab-ci.yml

default:
    image: artifacts.company.org/image:1.1

stages:
    - Lint
    - Environments

#---------------------------------------------------#
#                       Lint                        #
#---------------------------------------------------#

lint:
    stage: Lint
    extends:
        - .configure_properties
    script:
        - gradle ktlintCheck
    artifacts:
        paths:
            - ./*/build/reports/ktlint/*
    when: always
    tags:
        - docker

#---------------------------------------------------#
#                    Env One                      #
#---------------------------------------------------#
env_one_build:
    stage: Environments
    needs:
        - job: lint
    trigger:
        include:
            - local: .ci/environmentOne-ci.yml

Versions

Versions

  • GitLab Runner: 16.9.1