File tree Expand file tree Collapse file tree 2 files changed +44
-7
lines changed
Expand file tree Collapse file tree 2 files changed +44
-7
lines changed Original file line number Diff line number Diff line change @@ -100,16 +100,35 @@ jobs:
100100 - ./package.json
101101 # - jobstatus
102102
103- publish :
103+ pact-publish-dev :
104+ executor : build-executor
105+ steps :
106+ - checkout
107+ - setup_environment
108+ - node/install-packages
109+ - run :
110+ name : Publish development pacts to broker
111+ command : npm run pact:publish-dev
112+ # - jobstatus
113+
114+ pact-publish-prod :
115+ executor : build-executor
116+ steps :
117+ - checkout
118+ - setup_environment
119+ - node/install-packages
120+ - run :
121+ name : Publish production pacts to broker
122+ command : npm run pact:publish-prod
123+ # - jobstatus
124+
125+ npm-publish :
104126 executor : build-executor
105127 steps :
106128 - attach_workspace :
107129 at : /tmp/workspace
108130 - setup_environment :
109131 version_path : /tmp/workspace
110- - run :
111- name : Publish pacts to broker
112- command : npm run pact:publish
113132 - run :
114133 name : Publish package to NPM
115134 command : cd /tmp/workspace && npm publish
@@ -134,7 +153,16 @@ workflows:
134153 build-and-deploy :
135154 jobs :
136155 - build_test
137- - publish :
156+ - pact-publish-dev :
157+ context :
158+ - org-global
159+ - w3w-pact
160+ requires :
161+ - build_test
162+ filters :
163+ branches :
164+ ignore : master
165+ - pact-publish-prod :
138166 context :
139167 - org-global
140168 - w3w-pact
@@ -143,7 +171,15 @@ workflows:
143171 filters :
144172 branches :
145173 only : master
174+ - npm-publish :
175+ context :
176+ - org-global
177+ requires :
178+ - build_test
179+ filters :
180+ branches :
181+ only : master
146182 - tag :
147183 requires :
148- - publish
184+ - npm- publish
149185
Original file line number Diff line number Diff line change 2020 "pact_do_not_track" : true
2121 },
2222 "scripts" : {
23- "pact:publish" : " pact-broker publish pacts --consumer-app-version=\" $npm_package_version-$(git rev-parse --short HEAD)\" --auto-detect-version-properties --broker-base-url=${PACT_BROKER_BASE_URL}" ,
23+ "pact:publish-dev" : " pact-broker publish pacts --consumer-app-version=\" $npm_package_version-$(git rev-parse --short HEAD)\" --auto-detect-version-properties --broker-base-url=${PACT_BROKER_BASE_URL}" ,
24+ "pact:publish-prod" : " pact-broker publish pacts --consumer-app-version=\" $npm_package_version\" --auto-detect-version-properties --broker-base-url=${PACT_BROKER_BASE_URL}" ,
2425 "test" : " jest" ,
2526 "test:watch" : " jest --watch" ,
2627 "coverage" : " jest --coverage" ,
You can’t perform that action at this time.
0 commit comments