Skip to content

Commit 9015685

Browse files
committed
Do not add build predicates (guards) to non-gate jobs with deploy target.
Avoids inconsistencies when a `[post-merge, deploy]` job is skipped but a `[daily, deploy]` job is scheduled for the same commit.
1 parent da0cd2f commit 9015685

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

ci/ci_common/common.jsonnet

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,17 @@ common + common.frequencies + {
1111

1212
# Add a guard to `build` that prevents it from running in the gate
1313
# for a PR that only touches *.md files, the docs, are config files for GitHub
14-
add_excludes_guard(build):: build + {
15-
guard+: {
16-
excludes+: ["**.md", "<graal>/**.md", "<graal>/docs/**", "<graal>/.devcontainer/**", "<graal>/.github/**", "<graal>/vm/ce-release-artifacts.json"]
17-
}
18-
},
14+
#
15+
# To avoid skipping the deployment of some artifacts, only `gate` jobs and
16+
# post-merges that do not have the `deploy` target are considered.
17+
add_excludes_guard(build):: build
18+
+ (
19+
if (std.length(std.find('gate', build.targets)) > 0 || std.length(std.find('deploy', build.targets)) == 0) then {
20+
guard+: {
21+
excludes+: ["**.md", "<graal>/**.md", "<graal>/docs/**", "<graal>/.devcontainer/**", "<graal>/.github/**", "<graal>/vm/ce-release-artifacts.json"]
22+
}
23+
} else {}
24+
),
1925

2026
// Heap settings
2127
// *************

0 commit comments

Comments
 (0)