Skip to content

Conversation

@B3nnyL
Copy link
Contributor

@B3nnyL B3nnyL commented Aug 22, 2022

Feature description:

#268

Details:

  • Support publishing pacts with branch and a build_url.
  • Use auto_detect_version_properties flag to read branch information from CI. Enable it by default

Actual pacts published with branch:

broker url

@B3nnyL B3nnyL marked this pull request as ready for review August 22, 2022 07:08
@YOU54F
Copy link
Member

YOU54F commented Aug 22, 2022

epic @B3nnyL will take a look at this today, if not, this week. 🙌🏾

@B3nnyL B3nnyL requested a review from YOU54F August 23, 2022 03:48
@B3nnyL B3nnyL requested a review from elliottmurray August 23, 2022 04:25
@B3nnyL
Copy link
Contributor Author

B3nnyL commented Aug 23, 2022

PR for fixing broken example message consumer test due to publishing duplicated versions

@B3nnyL B3nnyL changed the title Support publish pact with branch feat: Support publish pact with branch Aug 24, 2022
@YOU54F
Copy link
Member

YOU54F commented Aug 26, 2022

Just added some documentation to support

c1da32a

@elliottmurray
Copy link
Contributor

I need to test this a bit locally first. I don't know what that auto detect does!

Can I merge this and #302 at the same time? Looks like at least the complexity metric might be an issue?

@B3nnyL
Copy link
Contributor Author

B3nnyL commented Sep 7, 2022

Hello @elliottmurray! Sorry I just saw your reply. auto-detect-version-properties helps CI detects branches , you can explanation from here

@YOU54F
Copy link
Member

YOU54F commented Sep 9, 2022

Tested this out, looks good, branch is optional, and picked up from env vars, if auto_detect_version_properties set to True

I'd maybe tighten up the auto_detect_version_properties to accept True and not Any as it allows "true" but expects True.

        broker = Broker(broker_base_url="https://saf.pactflow.io", broker_token='foobar')
        broker.publish("Consumer_a",
                       "2.0.3",
                       auto_detect_version_properties=True,  # Uses common CI env vars such as GIT_BRANCH to set the branch property only (probably confusingly named!)
                       #    branch='consumer-branch',
                       tag_with_git_branch=True,
                       pact_dir='.')

Nice work @B3nnyL

@YOU54F YOU54F mentioned this pull request Sep 9, 2022
@elliottmurray elliottmurray merged commit 42e0db8 into pact-foundation:master Sep 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants