From 29e2a5461be60e3dbfacc3ae07b27f65e8a6d915 Mon Sep 17 00:00:00 2001 From: Alex Tercete Date: Tue, 17 Dec 2024 14:19:30 +0000 Subject: [PATCH] feat(ruleset): allow specifying jobs to extend --- templates/ruleset/config.yml | 7 ++++++- templates/ruleset/os.yml | 7 ++++++- templates/ruleset/template.yml | 8 ++++++++ templates/ruleset/version.yml | 7 ++++++- 4 files changed, 26 insertions(+), 3 deletions(-) diff --git a/templates/ruleset/config.yml b/templates/ruleset/config.yml index 7c74356..021b324 100644 --- a/templates/ruleset/config.yml +++ b/templates/ruleset/config.yml @@ -6,6 +6,11 @@ spec: tag: default: latest description: "Open container image (OCI) tag for the image." + extends: + type: array + default: + - .job + description: "Jobs for the testing jobs to extend." needs: type: array default: [] @@ -30,7 +35,7 @@ include: tag: "$[[inputs.tag]]" config: - extends: .job + extends: $[[inputs.extends]] needs: $[[inputs.needs]] parallel: matrix: diff --git a/templates/ruleset/os.yml b/templates/ruleset/os.yml index 26fa385..c229913 100644 --- a/templates/ruleset/os.yml +++ b/templates/ruleset/os.yml @@ -6,6 +6,11 @@ spec: tag: default: latest description: "Open container image (OCI) tag for the image." + extends: + type: array + default: + - .job + description: "Jobs for the testing jobs to extend." needs: type: array default: [] @@ -30,7 +35,7 @@ include: tag: "$[[inputs.tag]]" os: - extends: .job + extends: $[[inputs.extends]] needs: $[[inputs.needs]] variables: CI_LOCKFILE_MODE: "off" diff --git a/templates/ruleset/template.yml b/templates/ruleset/template.yml index 61634d6..f7937a3 100644 --- a/templates/ruleset/template.yml +++ b/templates/ruleset/template.yml @@ -10,6 +10,11 @@ spec: default: 7.4.0 description: "The minimum Bazel version tested." regex: ^\d+\.\d+\.\d+$ + extends: + type: array + default: + - .job + description: "Jobs for the testing jobs to extend." needs: type: array default: [] @@ -45,6 +50,7 @@ include: inputs: image: "$[[inputs.image]]" tag: "$[[inputs.tag]]" + extends: $[[inputs.extends]] needs: $[[inputs.needs]] roots: $[[inputs.roots]] versions: $[[inputs.versions]] @@ -52,6 +58,7 @@ include: inputs: image: "$[[inputs.image]]" tag: "$[[inputs.tag]]" + extends: $[[inputs.extends]] needs: $[[inputs.needs]] roots: $[[inputs.roots]] configs: $[[inputs.configs]] @@ -59,6 +66,7 @@ include: inputs: image: "$[[inputs.image]]" tag: "$[[inputs.tag]]" + extends: $[[inputs.extends]] needs: $[[inputs.needs]] roots: $[[inputs.roots]] oses: $[[inputs.oses]] diff --git a/templates/ruleset/version.yml b/templates/ruleset/version.yml index b460624..d5c0262 100644 --- a/templates/ruleset/version.yml +++ b/templates/ruleset/version.yml @@ -6,6 +6,11 @@ spec: tag: default: latest description: "Open container image (OCI) tag for the image." + extends: + type: array + default: + - .job + description: "Jobs for the testing jobs to extend." needs: type: array default: [] @@ -31,7 +36,7 @@ include: tag: "$[[inputs.tag]]" version: - extends: .job + extends: $[[inputs.extends]] needs: $[[inputs.needs]] variables: CI_LOCKFILE_MODE: "off" -- GitLab