Add support for "inputs" when using multi-project pipelines

I am creating a multi-project pipeline: https://docs.gitlab.com/ee/ci/pipelines/downstream_pipelines.html?tab=Multi-project+pipeline#multi-project-pipelines

I would like to use the new inputs functionality rather than having to forward pipeline variables: https://docs.gitlab.com/ee/ci/yaml/inputs.html

Downstream yml has the following specs:

spec:
 inputs:
   package-registry-directory:
     description: "Directory in package registry that apks will be published to"
   melange-yaml-file:
     description: "Location of the melange yaml to build"
   runner-tag:
     default: docker-in-docker
     description: "Tag of runner to use, for example an arm64 based runner if you need an arm64 apk"
---

I would like to trigger it and pass inputs in

melange-build:
  stage: $[[ inputs.stage ]]
  trigger:
    project: dwp/secure-development/packages
    file: "templates/melange-build.yml"
    branch: "melange"
    strategy: depend
    inputs:
      melange-yaml-file: ${CI_PROJECT_DIR}/$[[ inputs.melange-yaml-file ]]
      package-registry-directory: ${APK_LOCATION}
      runner-tag: $[[ inputs.runner-tag ]]

But currently I get an error from Gitlab:

  • jobs:melange-build:trigger config contains unknown keys: file, inputs

Ideally it'd be good to trigger a specific yml build in the downstream repository, as I don't want to include the config into the pipeline, which will therfore run the job in the upstream repo, I want the job to run on the downstream repo.

We may add multiple entrypoints into that downstream repository to perform different actions, so rather than try control that through variables in the root .gitlab-ci.yml of the downstream repo, if we could specify a file and provide inputs, that would make for a better UX.

Edited by 🤖 GitLab Bot 🤖