-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Flatten package names
- Loading branch information
Showing
95 changed files
with
174 additions
and
249 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
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
* xref:build_task_policy.adoc[Build Task Policy] | ||
** xref:build_task_policy.adoc#labels_package[Tekton task build type label checks] | ||
*** xref:build_task_policy.adoc#labels__build_type_label_set[Build task has build type label] | ||
*** xref:build_task_policy.adoc#labels__build_task_has_label[Build task has label] | ||
** xref:build_task_policy.adoc#build_labels_package[Tekton task build type label checks] | ||
*** xref:build_task_policy.adoc#build_labels__build_type_label_set[Build task has build type label] | ||
*** xref:build_task_policy.adoc#build_labels__build_task_has_label[Build task has label] |
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
14 changes: 7 additions & 7 deletions
14
policy/build_task/labels/labels_test.rego → ..._task/build_labels/build_labels_test.rego
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 |
---|---|---|
@@ -1,25 +1,25 @@ | ||
package build_task.labels_test | ||
package build_labels_test | ||
|
||
import rego.v1 | ||
|
||
import data.build_task.labels | ||
import data.build_labels | ||
import data.lib | ||
|
||
test_build_label_found if { | ||
# regal ignore:line-length | ||
lib.assert_empty(labels.deny) with input as {"metadata": {"labels": {"build.appstudio.redhat.com/build_type": "docker"}}} | ||
lib.assert_empty(build_labels.deny) with input as {"metadata": {"labels": {"build.appstudio.redhat.com/build_type": "docker"}}} | ||
} | ||
|
||
test_build_label_not_found if { | ||
lib.assert_equal_results(labels.deny, {{ | ||
"code": "labels.build_type_label_set", | ||
lib.assert_equal_results(build_labels.deny, {{ | ||
"code": "build_labels.build_type_label_set", | ||
"msg": "The required build label 'build.appstudio.redhat.com/build_type' is missing", | ||
}}) with input as {"metadata": {"labels": {"bad": "docker"}}} | ||
} | ||
|
||
test_no_labels if { | ||
lib.assert_equal_results(labels.deny, {{ | ||
"code": "labels.build_task_has_label", | ||
lib.assert_equal_results(build_labels.deny, {{ | ||
"code": "build_labels.build_task_has_label", | ||
"msg": "The task definition does not include any labels", | ||
}}) with input as {"metadata": {"name": "no_labels"}} | ||
} |
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
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
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.