|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH test-artifacts v3 09/13] Add trigger-test job, to run test on a Linux built from a branch/tag
On Wed, Apr 15, 2026 at 07:40:19PM +0200, Marek Marczykowski-Górecki wrote: > On Wed, Apr 15, 2026 at 01:44:47PM +0000, Anthony PERARD wrote: > > On Wed, Apr 01, 2026 at 01:21:59AM +0200, Marek Marczykowski-Górecki wrote: > > > +trigger-test: > > > + stage: deploy > > > + trigger: > > > + project: $TEST_TRIGGER_REPO > > > + branch: $TEST_TRIGGER_BRANCH > > > + strategy: mirror > > > + variables: > > > + ARTIFACTS_REPO: $CI_PROJECT_PATH > > > + ARTIFACTS_BRANCH: $CI_COMMIT_REF_NAME > > > + LINUX_JOB_X86_64: linux-git-x86_64 > > > + LINUX_JOB_ARM64: linux-git-arm64 > > > + BUILD_FOR_TESTS_ONLY: 1 > > > > Can we add this? > > inherit: > > variables: false > > > > Otherwise, as I understand, the triggered pipeline will also use the > > global variables, like TEST_TRIGGER_REPO, LINUX_GIT_VERSION, ... Or I > > could be wrong because we don't set a default value and the are only > > manual/scheduled pipeline variable. > > > > https://docs.gitlab.com/ci/yaml/#trigger > > > CI/CD variables defined in a top-level variables section (globally) or > > > in the trigger job are forwarded to the downstream pipeline as trigger > > > variables. > > > > https://docs.gitlab.com/ci/pipelines/downstream_pipelines/#prevent-default-variables-from-being-passed > > Hm, yes, inherit:variables:false might be needed if we'd want to avoid > passing those variables. But, TBH I'm not sure if we want to avoid that > - it might be useful at some point to get LINUX_GIT_VERSION there, for > example. I've run a test and I don't see LINUX_GIT_VERSION value in the trigger pipeline, only the default value. See https://gitlab.com/xen-project/people/anthonyper/xen/-/jobs/14042314690/viewer $ echo triggered by ${LINUX_GIT_URL} and ${LINUX_GIT_VERSION}; triggered by and $ env REGISTRY=registry.gitlab.com/xen-project/people/anthonyper/test-artifacts XEN_REGISTRY=registry.gitlab.com/xen-project/xen LINUX_GIT_VERSION= LINUX_GIT_URL= TEST_TRIGGER_REPO= TEST_TRIGGER_BRANCH= ARTIFACTS_REPO=xen-project/people/anthonyper/test-artifacts LINUX_JOB_X86_64=linux-git-x86_64 ... So, the triggered pipeline got the value of the variable as set in `.gitlab-ci.yml` `variables` section, and the values of the variables set in the trigger job. But the value set via push-variable are missing. So far, the triggered pipeline doesn't get the useful variable values, beside the needed ones. And my main issue would be with the REGISTRY or XEN_REGISTRY variables, if we rename one into the other, the triggered pipeline could fail. So I think we should use inherit:variables:false, and explicitly passthrough the variables we want. Cheers, -- Anthony Perard | Vates XCP-ng Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |