feat(ci-templates): Bitbucket + Azure parity with the GitHub Action (closes #32)#60
Merged
Conversation
…n parity (closes #32) Exposes the v0.9.7-era surface (VEX, license policy, enrichment toggles, calibration, attestation, plugins) on both the Bitbucket Pipelines and Azure DevOps templates so non-GitHub callers can configure the same `bomdrift diff` knobs the GitHub Action exposes. Implementation pattern: each platform exposes a BOMDRIFT_* repository variable (Bitbucket) or pipeline parameter mapped to a BOMDRIFT_* env var (Azure). A small `args=()` helper block (add_value / add_bool / add_list) appends `--flag value` pairs only when the corresponding variable is set, so the default invocation stays byte-identical for users who set none of the new inputs. Templates parse as YAML and the inline shell passes `bash -n`. Docs gain an "Input reference" section in both bitbucket.md and azure-devops.md grouping the inputs by the same six categories as the GitHub Action. - examples/bitbucket-pipelines/bitbucket-pipelines.yml: +95 - examples/azure-devops/azure-pipelines.yml: +154 - docs/src/bitbucket.md: +84 - docs/src/azure-devops.md: +82
Coverage reportLine coverage: 84.7% (10033 / 11851 lines) Full lcov report available as workflow artifact coverage-lcov: download from this run. v0.9.8 introduces this report; |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #32.
Brings the Bitbucket Pipelines and Azure DevOps templates up to the v0.9.7 GitHub Action input surface, so non-GitHub callers can configure the same
bomdrift diffknobs the action exposes.What's added (on both platforms)
VEX:
vex(list),emit-vex,vex-author,vex-default-justificationLicense policy:
allow-licenses,deny-licenses,allow-exception,deny-exception,allow-ambiguous-licensesEnrichment toggles:
no-epss,no-kev,no-registry,fail-on-epssCalibration:
recently-published-days,typosquat-similarity-threshold,young-maintainer-days,cache-ttl-hours,multi-major-deltaAttestation:
before-attestation,after-attestation,cosign-identity,cosign-issuer,require-attestationPlugins:
plugin(list)Implementation
Both templates use the same pattern: a small bash helper block defines
add_value/add_bool/add_list, then builds anargs=()array fromBOMDRIFT_*env vars and appends"${args[@]}"after the existing--output markdown --platform <name>flags. Unset / empty inputs contribute zero CLI args, so the default invocation is byte-identical for users who don't set any of the new variables.BOMDRIFT_*).parameters:(snake_case because${{ parameters.x-y }}won't expand cleanly with hyphens) and maps them through theenv:block on the diff step to the sameBOMDRIFT_*names.Verification
python3 -c "import yaml; yaml.safe_load(...)".bash -n.add_value/add_bool/add_listall short-circuit on empty/non-truevalues).bitbucket.mdandazure-devops.mdmirror the action.yml descriptions verbatim where the brief allowed, abridged where length required.Notes for maintainer
Repo policy:
mainrequires verified signatures. This branch is unsigned; "Merge" or "Squash" via the GitHub UI auto-signs.The Azure JSON schema doesn't model boolean parameter defaults so the editor LSP will flag a warning on the
default: falselines — the syntax is still valid Azure Pipelines YAML (verified against the public docs). Left as-is.