-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into merge-main
- Loading branch information
Showing
10 changed files
with
256 additions
and
397 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package org | ||
|
||
import future.keywords | ||
|
||
policy_name["example_compiled"] | ||
|
||
enable_hard["enforce_small_jobs"] | ||
|
||
enforce_small_jobs[reason] { | ||
some job_name, job in input._compiled_.jobs | ||
job.resource_class != "small" | ||
reason = sprintf("job %s: resource_class must be small", [job_name]) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
test_compile_policy: | ||
compile: true | ||
pipeline_parameters: | ||
parameters: | ||
size: small | ||
input: | ||
version: 2.1 | ||
parameters: | ||
size: | ||
type: string | ||
default: medium | ||
jobs: | ||
test: | ||
docker: | ||
- image: go | ||
resource_class: << pipeline.parameters.size >> | ||
steps: | ||
- run: it | ||
workflows: | ||
main: | ||
jobs: | ||
- test | ||
decision: | ||
status: PASS | ||
enabled_rules: [enforce_small_jobs] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.