gunk-dev/the-valley

policy.cue

sourceb4b76b6862d0main's published tip history
1.4 KiB
1// The project layer of the same sample policy, living in the project's own
2// tree rather than in the instance repository. The directory convention is
3// the same one; the authority is not. A project can only add to its own
4// directory, and adding to the instance's floor directory is a change
5// landing in the instance repository.
6package verification
7
8project: {
9 // Selecting the project type is embedding its definition. Every
10 // project in the group can read this template; only the ones that
11 // write this line are affected by it.
12 #docs
13
14 // A check the floor and the template know nothing about. A project may
15 // always add classes and checks.
16 checks: "shellcheck": {
17 runner: "nix"
18 attribute: "shellcheck"
19 }
20
21 // A check that installs the scripts in a virtual machine takes minutes,
22 // so it is marked slow. An author may leave it to the run made when the
23 // change is filed for integration. It is owed exactly as a quick check
24 // is.
25 checks: "install-vm": {
26 runner: "nix"
27 attribute: "install-vm"
28 cost: "slow"
29 }
30 classes: scripts: {
31 paths: "bin/**": true
32 requires: "shellcheck": true
33 requires: "install-vm": true
34 }
35
36 // The template offered the knowledge lint as a default, so this project
37 // can decline it and vet still passes. Declining either of the floor's
38 // checks the same way does not.
39 classes: knowledge: requires: "knowledge-lint": false
40}