From 8e9d950f0b8cb621379862b3c6c236bd4731fa73 Mon Sep 17 00:00:00 2001 From: Varadarajan V Date: Tue, 17 Oct 2023 13:13:58 +0530 Subject: [PATCH] Update workflow --- .github/workflows/publish-canary.yml | 18 ++++++------------ .../braze-cohorts/syncAudiences/index.ts | 3 +-- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/.github/workflows/publish-canary.yml b/.github/workflows/publish-canary.yml index 9dfc04b4532..ba7aacbbc6d 100644 --- a/.github/workflows/publish-canary.yml +++ b/.github/workflows/publish-canary.yml @@ -8,7 +8,7 @@ on: branches: # Remove before merging to master - add-tar-release-pipeline - - stage + - staging # Manual trigger workflow_dispatch: # branches: @@ -51,14 +51,6 @@ jobs: env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: Get Package Version - run: | - PACKAGE_VERSION=$(node -p "require('./packages/destination-actions/package.json').version") - SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8` - echo "PACKAGE_VERSION=${PACKAGE_VERSION}" >> $GITHUB_ENV - echo "SHORT_SHA=${SHORT_SHA}" >> $GITHUB_ENV - echo "ACTION_DESTINATION_VERSION=${PACKAGE_VERSION}-${SHORT_SHA}" >> $GITHUB_ENV - - name: Build run: | NODE_ENV=production yarn build @@ -70,7 +62,9 @@ jobs: - name: Publish Canary Packages run: | - yarn lerna publish --canary --preid $(git branch --show-current) --no-push --no-git-tag-version + yarn lerna publish -y --canary --preid $(git branch --show-current) --no-push --no-git-tag-version --summary-file + echo "ACTION_DESTINATIONS_VERSION=$(jq -r '.[] | select(.packageName == "@segment/action-destinations") | .version' lerna-publish-summary.json)" >> "$GITHUB_ENV" + echo "ACTIONS_CORE_VERSION=$(jq -r '.[] | select(.packageName == "@segment/actions-core") | .version' lerna-publish-summary.json)" >> "$GITHUB_ENV" - name: Trigger Buildkite Pipeline run: | @@ -79,11 +73,11 @@ jobs: --header 'Authorization: Bearer ${{ secrets.BUILDKITE_TOKEN }}' \ --header 'Content-Type: application/json' \ --data '{"commit":"HEAD","branch":"ci-test", "message": "Triggered from :github: run ${{ github.run_id }}: Upgrade action-destination packages ${{ env.ACTION_DESTINATION_VERSION }}","env":{ - "BRANCH_TO_UPDATE": "${{ github.ref_name }}", "SHORT_SHA": "${{ env.SHORT_SHA }}", "WEEKLY_DEPLOY": "false", "UPGRADE_ACTION_DESTINATIONS": "true", "ACTION_DESTINATIONS_VERSION": "${{ env.ACTION_DESTINATION_VERSION }}", "ACTIONS_RUN_ID": "${{ github.run_id }}" },"meta_data":{}}') + "BRANCH_TO_UPDATE": "${{ github.ref_name }}", "ACTIONS_RELEASE": "true", "CREATE_PR": "false", "UPGRADE_ACTION_DESTINATIONS": "true", "ACTION_DESTINATIONS_VERSION": "${{ env.ACTION_DESTINATIONS_VERSION }}", "ACTIONS_CORE_VERSION": "${{ env.ACTIONS_CORE_VERSION }}", "ACTIONS_RUN_ID": "${{ github.run_id }}" },"meta_data":{}}') BUILDKITE_URL=$(echo $result | jq -r '.web_url') if [[ ${BUILDKITE_URL} -eq null ]]; then echo "Failed to trigger Buildkite pipeline. Reason:$(echo $result | jq -r '.message'))" exit 1 else - echo "Buildkite pipeline triggered successfully - ${BUILDKITE_URL}" + echo "Buildkite pipeline triggered successfully. fi diff --git a/packages/destination-actions/src/destinations/braze-cohorts/syncAudiences/index.ts b/packages/destination-actions/src/destinations/braze-cohorts/syncAudiences/index.ts index 152ee11bf9f..84ff91303b8 100644 --- a/packages/destination-actions/src/destinations/braze-cohorts/syncAudiences/index.ts +++ b/packages/destination-actions/src/destinations/braze-cohorts/syncAudiences/index.ts @@ -102,8 +102,7 @@ const action: ActionDefinition = { } } }, - perform: async (request, { settings, payload, stateContext, logger }) => { - logger?.info('Hello world') + perform: async (request, { settings, payload, stateContext }) => { return processPayload(request, settings, [payload], stateContext) }, performBatch: async (request, { settings, payload, stateContext }) => {