pactflow-publish-sh

0.2.1 • Public • Published

Pactflow Publish SH

NPM

This is a shell script that can publish Pact JSON to a Pactflow broker using curl.

You may want to use the shell script as is, or use it via npx and get it from npm.

Parameters:

--username                   The username
--password                   The password
--token                      The token
--pactflow-broker-url        Base URL of Pactflow
--build-url                  The URL of the build that invoked this script
--pact-json-folder           Folder containing Pact JSON files
--participant-version-number The version

Example

You may get the version like this:

current_version=$(npx git-changelog-command-line \
  --patch-version-pattern "^fix.*" \
  --print-current-version)
git_hash=`git rev-parse --short HEAD`
participant_version_number="$current_version-$git_hash"

Using just the shell script:

./pactflow-publish.sh \
 --username=dXfltyFMgNOFZAxr8io9wJ37iUpY42M \
 --password=O5AIZWxelWbLvqMd8PkAVycBJh2Psyg1 \
 --pactflow-broker-url=https://test.pactflow.io/contracts/publish \
 --build-url=http://whatever/ \
 --pact-json-folder=example-pact-json \
 --participant-version-number=$participant_version_number

Or with npx via npm:

npx pactflow-publish-sh \
 --username=dXfltyFMgNOFZAxr8io9wJ37iUpY42M \
 --password=O5AIZWxelWbLvqMd8PkAVycBJh2Psyg1 \
 --pactflow-broker-url=https://test.pactflow.io/contracts/publish \
 --build-url=http://whatever/ \
 --pact-json-folder=example-pact-json \
 --participant-version-number=$participant_version_number

You can login to the broker at https://test.pactflow.io/ with username dXfltyFMgNOFZAxr8io9wJ37iUpY42M and password O5AIZWxelWbLvqMd8PkAVycBJh2Psyg1.

See also

/pactflow-publish-sh/

    Package Sidebar

    Install

    npm i pactflow-publish-sh

    Weekly Downloads

    0

    Version

    0.2.1

    License

    Apache 2

    Unpacked Size

    21.8 kB

    Total Files

    7

    Last publish

    Collaborators

    • tomasbjerre