Skip to content

Commit

Permalink
feat(can-deploy): add broker token to can-deploy task (#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
mefellows authored May 13, 2019
1 parent 280269c commit fad1e63
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions bin/pact-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ cli
.option("-l, --latest [TAG]", "Use the latest version of the participant, or the latest based on the tag. Must follow after participant.", undefined, undefined)
.option("-t, --to <tag>", "participant tags to check against", undefined, undefined)
.option("-b, --pact-broker <URL>", "URL of the Pact Broker to publish pacts to.", undefined, undefined, true)
.option("-token, --pact-broker-token <token>", "Pact Broker API token.")
.option("-username, --pact-broker-username <user>", "Pact Broker username.")
.option("-password, --pact-broker-password <password>", "Pact Broker password.")
.option("-o, --output <output>", "json or table.")
Expand Down
5 changes: 4 additions & 1 deletion src/can-deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export class CanDeploy {
"latest": "--latest",
"to": "--to",
"pactBroker": "--broker-base-url",
"pactBrokerToken": "--broker-token",
"pactBrokerUsername": "--broker-username",
"pactBrokerPassword": "--broker-password",
"output": "--output",
Expand All @@ -51,7 +52,8 @@ export class CanDeploy {
checkTypes.assert.nonEmptyString(options.participantVersion, "Must provide the participant version argument");
checkTypes.assert.nonEmptyString(options.pactBroker, "Must provide the pactBroker argument");
options.latest !== undefined && checkTypes.assert.nonEmptyString(options.latest.toString());
options.to !== undefined && checkTypes.assert.nonEmptyString(options.to);
options.to !== undefined && checkTypes.assert.nonEmptyString(options.to);
options.pactBrokerToken !== undefined && checkTypes.assert.nonEmptyString(options.pactBrokerToken);
options.pactBrokerUsername !== undefined && checkTypes.assert.string(options.pactBrokerUsername);
options.pactBrokerPassword !== undefined && checkTypes.assert.string(options.pactBrokerPassword);

Expand Down Expand Up @@ -94,6 +96,7 @@ export interface CanDeployOptions extends SpawnArguments {
to?: string;
latest?: boolean | string;
pactBroker: string;
pactBrokerToken?: string;
pactBrokerUsername?: string;
pactBrokerPassword?: string;
output?: "json" | "table";
Expand Down

0 comments on commit fad1e63

Please sign in to comment.