Add a wrapper with sensible CI defaults?
Opened this issue · 0 comments
TimothyJones commented
The recommended behaviour is to publish pacts (and verification results) only on CI. There are other defaults (eg tagging with the git branch) that will also make sense in almost all CI configurations.
I was thinking it would be neat to have (say) pact-broker-ci publish
that brought in sensible defaults for CI without users having to specify extra options manually (like PACT_BROKER_PUBLISH_VERIFICATION_RESULTS
).
We could then use this wrapper in the examples, and uplift people's default best practices automatically.
If we did it at the binary level pact-broker-ci
, then we avoid issues with breaking changes, and could easily bring in other sensible CI defaults in other pact-broker operations.
It would:
- Not publish pacts if not on CI
- Automatically read the branch from git / a number of CI variables
- Possibly other things I haven't thought of