Add approval for release/x.x branch (#338)

Temporary workaround for now because our CI policy requires it.
This commit is contained in:
Daniel Chao
2024-03-18 15:17:22 -07:00
committed by Dan Chao
parent 6b04e1d606
commit 08be512fe1
2 changed files with 69 additions and 9 deletions
+38
View File
@@ -53,6 +53,44 @@ main {
}
}
// TODO: remove me once policy allows these jobs without approval
circleCi {
workflows {
["release-branch"] {
jobs = new Listing<*Mapping<String, WorkflowJob>|String> {
new {
["hold"] {
type = "approval"
}
}
new {
["pr-approval/authenticate"] {
context = "pkl-pr-approval"
}
}
for (job in super.jobs) {
job |> requireApproval
}
}
}
}
}
// TODO: remove me once policy allows these jobs without approval
local requireApproval = (it: String|Mapping<String, WorkflowJob>) ->
if (it is String)
new Mapping<String, WorkflowJob> {
[it] {
requires { "hold" }
}
}
else
(it) {
[it.keys.first] {
requires { "hold" }
}
}
release {
jobs {
...releaseJobs