File tree Expand file tree Collapse file tree 3 files changed +24
-3
lines changed Expand file tree Collapse file tree 3 files changed +24
-3
lines changed Original file line number Diff line number Diff line change 1+ name : Postman Release
2+ on :
3+ # Enabled by CLOUDP-262512
4+ # schedule:
5+ # - cron: '0 0 10 ? * *'
6+ workflow_dispatch :
7+
8+ jobs :
9+ release-postman :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Checkout
13+ uses : actions/checkout@v4
14+ - name : Build and upload Collection
15+ working-directory : ./tools/postman
16+ env :
17+ BASE_URL : ${{ secrets.BASE_URL }}
18+ POSTMAN_API_KEY : ${{ secrets.POSTMAN_API_KEY }}
19+ WORKSPACE_ID : ${{ secrets.WORKSPACE_ID }}
20+ run : |
21+ make build_and_upload
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ echo "Wrapping Collection in \"collection\" tag"
3030jq ' {"collection": .}' " $COLLECTION_FILE_NAME " > intermediateCollectionWrapped.json
3131
3232echo " Disabling query params by default"
33- jq ' (.. | select(.request? != null).request.url.query. [].disabled) = true ' intermediateCollectionWrapped.json > intermediateCollectionDisableQueryParam.json
33+ jq ' (.. | select(.request? != null).request.url.query[].disabled) = true ' intermediateCollectionWrapped.json > intermediateCollectionDisableQueryParam.json
3434
3535# This is to be removed because it is autogenerated when a new collection is created
3636echo " Removing _postman_id"
@@ -40,7 +40,7 @@ echo "Updating name with version"
4040jq ' .collection.info.name = "MongoDB Atlas Administration API ' " ${current_api_revision} " ' "' intermediateCollectionNoPostmanID.json > intermediateCollectionWithName.json
4141
4242echo " Updating baseUrl"
43- jq ' .collection.variable. [0].value = "' " ${BASE_URL} " ' "' intermediateCollectionWithName.json > intermediateCollectionWithBaseURL.json
43+ jq ' .collection.variable[0].value = "' " ${BASE_URL} " ' "' intermediateCollectionWithName.json > intermediateCollectionWithBaseURL.json
4444
4545if [ " $USE_ENVIRONMENT_AUTH " = " false" ]; then
4646 echo " Adding auth variables"
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ if [ "$collection_exists" = "false" ]; then
4747else
4848 # Find collection ID and update collection
4949 echo " Updating remote collection ${current_collection_name} "
50- collection_id=$( jq -r ' .collections | map(select(.name=="' " ${current_collection_name} " ' ").id). [0]' " ${COLLECTIONS_LIST_FILE} " )
50+ collection_id=$( jq -r ' .collections | map(select(.name=="' " ${current_collection_name} " ' ").id)[0]' " ${COLLECTIONS_LIST_FILE} " )
5151 curl --show-error --fail --retry 5 --retry-connrefused --silent --request PUT \
5252 --location " https://api.getpostman.com/collections/${collection_id} " \
5353 --header " Content-Type: application/json" \
You can’t perform that action at this time.
0 commit comments