Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add binary_sha discard #42

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion profile/exec.jq
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ def discard_items(patterns): if patterns | length > 0 then map(select([test(patt
# discard_items_pairs discards all pairs of items in the input array of strings that the first element in the pair matches any of the regular expressions in the patterns array of strings
def discard_items_pairs(patterns): if patterns | length > 0 then delpaths([paths([test(patterns[])] | any) | .,map(.+1)]) else . end;

# discard_binary_sha256 discards all process where the sha matches the input array of strings
def discard_binary_sha256(patterns): if patterns | length > 0 then select([.binary_sha256 | contains(patterns[])] | any | not) else . end;

[
.[] |
{
Expand All @@ -16,5 +19,5 @@ def discard_items_pairs(patterns): if patterns | length > 0 then delpaths([paths
binary_sha256: getarg("sha256"),
process_args: getarg("argv") | discard_items_pairs($config[0].args_discard_pair) | discard_items($config[0].args_discard),
process_env: (if isempty(getarg("env")) | not then (discard_items($config[0].env_discard) | sort) else null end)
}
} | discard_binary_sha256($config[0].binary_sha256_discard)
] | sort_by(.binary_path)
2 changes: 2 additions & 0 deletions profile/profile-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@
],
"dns_discard": [
"pipelines.actions.githubusercontent.com"
],
"binary_sha256_discard":[
]
}