|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v4 09/13] Add trigger-test job, to run test on a Linux built from a branch/tag
When scheduling pipeline in test-artifacts repo, it can get also
TEST_TRIGGER_REPO and TEST_TRIGGER_BRANCH variables, to trigger relevant
pipeline to test just built artifacts.
Pass ARTIFACTS_REPO+ARTIFACTS_BRANCH to the child pipeline to ensure it
fetches artifacts from the right job, but avoid xen test pipeline
inheriting other variables, as they might have unintended consequences
(for example REGISTRY one).
For example, to build linux-next and test Xen staging on it, the
pipeline could be triggered with:
LINUX_GIT_URL=https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
LINUX_GIT_VERSION=master
TEST_TRIGGER_REPO=xen-project/hardware/xen
TEST_TRIGGER_BRANCH=staging
The triggered xen test pipeline will skip most build jobs.
Signed-off-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
---
Changes in v4:
- add inherit:variables:false
---
.gitlab-ci.yml | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3ba8a31..b3c2b65 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -4,9 +4,14 @@ variables:
description: "branch/tag/commit for the linux-git jobs"
LINUX_GIT_URL:
description: "git url for the linux-git jobs"
+ TEST_TRIGGER_REPO:
+ description: "gitlab repo on which test just built linux, for example
'xen-project/hardware/xen'"
+ TEST_TRIGGER_BRANCH:
+ description: "branch in TEST_TRIGGER_REPO to test on, for example
'staging'"
stages:
- build
+ - deploy
.artifacts:
stage: build
@@ -115,3 +120,20 @@ linux-git-x86_64:
microcode-x86:
extends: .x86_64-artifacts
script: ./scripts/x86-microcode.sh
+
+trigger-test:
+ stage: deploy
+ trigger:
+ project: $TEST_TRIGGER_REPO
+ branch: $TEST_TRIGGER_BRANCH
+ strategy: mirror
+ inherit:
+ variables: false
+ 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
+ rules:
+ - if: $TEST_TRIGGER_REPO && $TEST_TRIGGER_BRANCH
--
git-series 0.9.1
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |