From f375d5137ef64fdc46144784656c862cc585fbca Mon Sep 17 00:00:00 2001 From: shyamasish-twilio <114460196+shyamasish-twilio@users.noreply.github.com> Date: Fri, 29 May 2026 13:29:10 +0530 Subject: [PATCH 1/2] FLEXY-0000 changes for pointing to private artifactory for flex plugin cli --- .circleci/config.yml | 49 --- .circleci/configs/e2e_test.yml | 385 ------------------ .circleci/configs/npm_publish.yml | 98 ----- .circleci/configs/pr_validator.yml | 133 ------ .github/workflows/pr_workflow.yaml | 1 + .github/workflows/~reusable_e2e_by_OS.yaml | 1 + .../workflows/~reusable_public_publish.yaml | 4 +- .github/workflows/~reusable_publish.yaml | 4 +- 8 files changed, 8 insertions(+), 667 deletions(-) delete mode 100644 .circleci/config.yml delete mode 100644 .circleci/configs/e2e_test.yml delete mode 100644 .circleci/configs/npm_publish.yml delete mode 100644 .circleci/configs/pr_validator.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 4303dfb07..000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,49 +0,0 @@ -version: 2.1 - -setup: true - -parameters: - run_e2e_test: - default: false - type: boolean - run_e2e_test_nightly: - default: false - type: boolean - run_pr_validator: - default: true - type: boolean - run_npm_publish: - default: false - type: boolean - dist_tag: - default: "alpha" - type: string - version_bump: - default: "patch" - type: string - package_version: - default: "" - type: string - flex_ui_version: - default: "" - type: string - -executors: - node: - parameters: - tag: - type: string - docker: - - image: cimg/node:<< parameters.tag >>-browsers - macos: - macos: - xcode: 14.2.0 - -orbs: - split-config: bufferings/split-config@0.1.0 - -workflows: - generate-config: - jobs: - - split-config/generate-config: - find-config-regex: \./\.circleci/configs/.*\.yml diff --git a/.circleci/configs/e2e_test.yml b/.circleci/configs/e2e_test.yml deleted file mode 100644 index 07874848b..000000000 --- a/.circleci/configs/e2e_test.yml +++ /dev/null @@ -1,385 +0,0 @@ -version: 2.1 - -parameters: - run_e2e_test: - default: false - type: boolean - run_e2e_test_nightly: - default: false - type: boolean - package_version: - default: "" - type: string - flex_ui_version: - default: "" - type: string - -executors: - node: - parameters: - tag: - type: string - docker: - - image: cimg/node:<< parameters.tag >>-browsers - macos: - macos: - xcode: 14.2.0 - -orbs: - win: circleci/windows@5.0.0 - node: circleci/node@5.1.0 - -commands: - cmd_install-dependencies: - steps: - - run: - name: "Install project dependencies" - command: npm i - cmd_install-prerequisites: - steps: - - run: - name: "Apt-get update" - command: sudo apt-get update - - run: - name: "Install libraries" - command: sudo apt-get install -y libsecret-1-dev - cmd_run-build: - steps: - - run: - name: "Build packages" - command: npm run build - cmd_run-e2e-tests: - steps: - - run: - name: "Run e2e tests" - # default timeout is 10m - no_output_timeout: 20m - command: | - cd packages/flex-plugin-e2e-tests - npm start - cmd_run-e2e-tests-win: - steps: - - run: - name: "Run e2e tests - JS" - command: | - cd packages/flex-plugin-e2e-tests - npm start - environment: - TS: false - cmd_run-e2e-tests-win-ts: - steps: - - run: - name: "Run e2e tests - TS" - command: | - taskkill //im node.exe //f - cd packages/flex-plugin-e2e-tests - npm start - environment: - TS: true - cmd_run-e2e-tests-mac-js: - steps: - - run: - name: "Run e2e tests - JS" - command: | - cd packages/flex-plugin-e2e-tests - npm start - environment: - TS: false - cmd_run-e2e-tests-mac-ts: - steps: - - run: - name: "Run e2e tests - TS" - command: | - killall -9 node - cd packages/flex-plugin-e2e-tests - npm start - environment: - TS: true - cmd_set-mac-permissions: - steps: - - run: - name: "Set permissions to user directory" - command: sudo chmod -R 777 /Users/distiller - cmd_set-linux-permissions: - steps: - - run: - name: "Set permissions to /usr/local" - command: sudo chmod -R 777 /usr/local - cmd_windows-nvm-install-node: - parameters: - node-version: - type: string - steps: - - run: - name: "Install node" - command: nvm install << parameters.node-version >> - - run: - name: "NVM use" - command: nvm use << parameters.node-version >> - cmd_slack-notification-error: - parameters: - text: - type: string - steps: - - run: - name: Send Slack notification - command: | - curl -XPOST -H "Content-type:application/json" --data "{'text':':error: $CIRCLE_PROJECT_REPONAME/$CIRCLE_BRANCH - << parameters.text >>. View <$CIRCLE_BUILD_URL|build>.', 'mrkdwn':true}" $SLACK_WEBHOOK - when: on_fail - -jobs: - job_e2e-test-linux-node16: - resource_class: xlarge - parameters: - package_version: - type: string - flex_ui_version: - type: string - node-version: - type: string - environment: - NODE_OPTIONS: --max-old-space-size=14336 - PACKAGE_VERSION: << parameters.package_version >> - FLEX_UI_VERSION: << parameters.flex_ui_version >> - executor: - name: node - tag: << parameters.node-version >> - steps: - - checkout - - cmd_install-prerequisites - - cmd_install-dependencies - - cmd_run-build - - cmd_set-linux-permissions - - cmd_run-e2e-tests - - store_artifacts: - path: packages/flex-plugin-e2e-tests/screenshots - - job_e2e-test-win-node16: - parameters: - package_version: - type: string - flex_ui_version: - type: string - shell: - type: string - node-version: - type: string - environment: - NODE_OPTIONS: --max-old-space-size=14336 - PACKAGE_VERSION: << parameters.package_version >> - FLEX_UI_VERSION: << parameters.flex_ui_version >> - executor: - name: win/default - shell: << parameters.shell >> - size: xlarge - steps: - - checkout - - cmd_windows-nvm-install-node: - node-version: << parameters.node-version >> - - cmd_install-dependencies - - cmd_run-build - - cmd_run-e2e-tests-win - - cmd_run-e2e-tests-win-ts - - store_artifacts: - path: packages/flex-plugin-e2e-tests/screenshots - - job_e2e-test-macos-node16: - resource_class: macos.x86.medium.gen2 - parameters: - flex_ui_version: - type: string - package_version: - type: string - node-version: - type: string - environment: - NODE_OPTIONS: --max-old-space-size=14336 - PACKAGE_VERSION: << parameters.package_version >> - FLEX_UI_VERSION: << parameters.flex_ui_version >> - executor: - name: macos - steps: - - checkout - - node/install: - node-version: << parameters.node-version >> - - cmd_install-dependencies - - cmd_run-build - - cmd_set-mac-permissions - - cmd_run-e2e-tests-mac-js - - cmd_run-e2e-tests-mac-ts - - store_artifacts: - path: packages/flex-plugin-e2e-tests/screenshots - - # In order to run our e2e tests per operating system, we must have a separate job for each node version. - # Since we use a one account per os, running the tests for each version in parallel is not possible. - job_e2e-test-linux-node18: - resource_class: xlarge - parameters: - package_version: - type: string - flex_ui_version: - type: string - node-version: - type: string - environment: - NODE_OPTIONS: --max-old-space-size=14336 - PACKAGE_VERSION: << parameters.package_version >> - FLEX_UI_VERSION: << parameters.flex_ui_version >> - executor: - name: node - tag: << parameters.node-version >> - steps: - - checkout - - cmd_install-prerequisites - - cmd_install-dependencies - - cmd_run-build - - cmd_set-linux-permissions - - cmd_run-e2e-tests - - store_artifacts: - path: packages/flex-plugin-e2e-tests/screenshots - - job_e2e-test-win-node18: - parameters: - package_version: - type: string - flex_ui_version: - type: string - shell: - type: string - node-version: - type: string - environment: - NODE_OPTIONS: --max-old-space-size=14336 - PACKAGE_VERSION: << parameters.package_version >> - FLEX_UI_VERSION: << parameters.flex_ui_version >> - executor: - name: win/default - shell: << parameters.shell >> - size: xlarge - steps: - - checkout - - cmd_windows-nvm-install-node: - node-version: << parameters.node-version >> - - cmd_install-dependencies - - cmd_run-build - - cmd_run-e2e-tests-win - - cmd_run-e2e-tests-win-ts - - store_artifacts: - path: packages/flex-plugin-e2e-tests/screenshots - - job_e2e-test-macos-node18: - resource_class: macos.x86.medium.gen2 - parameters: - flex_ui_version: - type: string - package_version: - type: string - node-version: - type: string - environment: - NODE_OPTIONS: --max-old-space-size=14336 - PACKAGE_VERSION: << parameters.package_version >> - FLEX_UI_VERSION: << parameters.flex_ui_version >> - executor: - name: macos - steps: - - checkout - - node/install: - node-version: << parameters.node-version >> - - cmd_install-dependencies - - cmd_run-build - - cmd_set-mac-permissions - - cmd_run-e2e-tests-mac-js - - cmd_run-e2e-tests-mac-ts - - store_artifacts: - path: packages/flex-plugin-e2e-tests/screenshots - -workflows: - workflow_e2e-tester: - when: << pipeline.parameters.run_e2e_test >> - jobs: - - job_e2e-test-linux-node16: - matrix: - parameters: - package_version: [<< pipeline.parameters.package_version >>] - flex_ui_version: [<< pipeline.parameters.flex_ui_version >>] - node-version: ["16.20.0"] - - job_e2e-test-win-node16: - matrix: - parameters: - package_version: [<< pipeline.parameters.package_version >>] - flex_ui_version: [<< pipeline.parameters.flex_ui_version >>] - shell: ["bash.exe"] - node-version: ["16.20.0"] - - job_e2e-test-macos-node16: - matrix: - parameters: - package_version: [<< pipeline.parameters.package_version >>] - flex_ui_version: [<< pipeline.parameters.flex_ui_version >>] - node-version: ["16.20.0"] - - workflow_nightly-e2e: - when: << pipeline.parameters.run_e2e_test_nightly >> - jobs: - - job_e2e-test-linux-node16: - matrix: - parameters: - package_version: ["latest"] - flex_ui_version: ["latest"] - node-version: ["16.20.0"] - post-steps: - - cmd_slack-notification-error: - text: "nightly E2E tests failed on Linux in node16" - - job_e2e-test-macos-node16: - matrix: - parameters: - package_version: ["latest"] - flex_ui_version: ["latest"] - node-version: ["16.20.0"] - post-steps: - - cmd_slack-notification-error: - text: "nightly E2E tests failed on MacOS in node16" - - job_e2e-test-win-node16: - matrix: - parameters: - package_version: ["latest"] - flex_ui_version: ["latest"] - shell: ["bash.exe"] - node-version: ["16.20.0"] - post-steps: - - cmd_slack-notification-error: - text: "nightly E2E tests failed on Windows in node16" - - job_e2e-test-linux-node18: - matrix: - parameters: - package_version: ["latest"] - flex_ui_version: ["latest"] - node-version: ["18.15.0"] - requires: - - job_e2e-test-linux-node16 - post-steps: - - cmd_slack-notification-error: - text: "nightly E2E tests failed on Linux in node18" - - job_e2e-test-macos-node18: - matrix: - parameters: - package_version: ["latest"] - flex_ui_version: ["latest"] - node-version: ["18.15.0"] - requires: - - job_e2e-test-macos-node16 - post-steps: - - cmd_slack-notification-error: - text: "nightly E2E tests failed on MacOS in node18" - - job_e2e-test-win-node18: - matrix: - parameters: - package_version: ["latest"] - flex_ui_version: ["latest"] - shell: ["bash.exe"] - node-version: ["18.15.0"] - requires: - - job_e2e-test-win-node16 - post-steps: - - cmd_slack-notification-error: - text: "nightly E2E tests failed on Windows in node18." diff --git a/.circleci/configs/npm_publish.yml b/.circleci/configs/npm_publish.yml deleted file mode 100644 index 384432e0e..000000000 --- a/.circleci/configs/npm_publish.yml +++ /dev/null @@ -1,98 +0,0 @@ -version: 2.1 - -parameters: - run_npm_publish: - default: false - type: boolean - dist_tag: - default: "alpha" - type: string - version_bump: - default: "patch" - type: string - -executors: - node: - parameters: - tag: - type: string - docker: - - image: cimg/node:<< parameters.tag >>-browsers - macos: - macos: - xcode: 14.2.0 - -orbs: - node: circleci/node@5.1.0 - -commands: - cmd_install-dependencies: - steps: - - run: - name: "Install project dependencies" - command: npm i - cmd_install-prerequisites: - steps: - - run: - name: "Apt-get update" - command: sudo apt-get update - - run: - name: "Install libraries" - command: sudo apt-get install -y libsecret-1-dev - cmd_setup-npm: - steps: - - run: - name: "Setting up npm" - command: | - echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc - git config --global user.email $GITHUB_EMAIL - git config --global user.name $GITHUB_USER - cmd_setup-github: - steps: - - add_ssh_keys: - fingerprints: - - "f3:09:6f:86:86:0a:6e:98:9b:fa:cb:49:2e:90:bc:75" - cmd_run-publish: - parameters: - dist_tag: - type: string - version_bump: - type: string - steps: - - run: - name: "Publishing package" - command: | - npm run publish:<< parameters.dist_tag >> << parameters.version_bump >> -jobs: - job_npm-publish: - resource_class: xlarge - parameters: - dist_tag: - type: string - version_bump: - type: string - environment: - NODE_OPTIONS: --max-old-space-size=14336 - CI: "" - executor: - name: node - tag: "16.20.0" - steps: - - checkout - - cmd_install-prerequisites - - cmd_install-dependencies - - cmd_setup-npm - - cmd_setup-github - - cmd_run-publish: - dist_tag: << parameters.dist_tag >> - version_bump: << parameters.version_bump >> - -workflows: - workflow_publisher: - when: << pipeline.parameters.run_npm_publish >> - jobs: - - job_npm-publish: - matrix: - parameters: - dist_tag: [<< pipeline.parameters.dist_tag >>] - version_bump: [<< pipeline.parameters.version_bump >>] diff --git a/.circleci/configs/pr_validator.yml b/.circleci/configs/pr_validator.yml deleted file mode 100644 index 6070094b7..000000000 --- a/.circleci/configs/pr_validator.yml +++ /dev/null @@ -1,133 +0,0 @@ -version: 2.1 - -parameters: - run_pr_validator: - default: true - type: boolean - -executors: - node: - parameters: - tag: - type: string - docker: - - image: cimg/node:<< parameters.tag >>-browsers - macos: - macos: - xcode: 14.2.0 - -orbs: - win: circleci/windows@5.0.0 - node: circleci/node@5.1.0 - -commands: - cmd_install-dependencies: - steps: - - run: - name: "Install project dependencies" - command: npm i - cmd_install-prerequisites: - steps: - - run: - name: "Apt-get update" - command: sudo apt-get update - - run: - name: "Install libraries" - command: sudo apt-get install -y libsecret-1-dev - cmd_run-unit-tests: - steps: - - run: - name: "Run unit tests" - command: npm run test:ci - cmd_run-linter: - steps: - - run: - name: "Run linter" - command: npm run lint:fix - cmd_run-build: - steps: - - run: - name: "Build packages" - command: npm run build - cmd_codecov: - steps: - - run: - name: "Codecov report" - command: npm run coverage -- --token=$CODECOV_TOKEN - cmd_windows-nvm-install-node: - parameters: - node-version: - type: string - steps: - - run: - name: "Install node" - command: nvm install << parameters.node-version >> - - run: - name: "NVM use" - command: nvm use << parameters.node-version >> - -jobs: - job_pr-validator-win32: - environment: - NODE_OPTIONS: --max-old-space-size=14336 --no-experimental-fetch - CI: "" - parameters: - shell: - type: string - node-version: - type: string - executor: - name: win/default - shell: << parameters.shell >> - size: xlarge - steps: - - checkout - - cmd_windows-nvm-install-node: - node-version: << parameters.node-version >> - - cmd_install-dependencies - - cmd_run-build - - cmd_run-unit-tests - - job_pr-validator-node: - resource_class: xlarge - environment: - NODE_OPTIONS: --max-old-space-size=14336 --no-experimental-fetch - CI: "" - parameters: - node-version: - type: string - executor: - name: node - tag: << parameters.node-version >> - steps: - - checkout - - cmd_install-prerequisites - - cmd_install-dependencies - - cmd_run-linter - - cmd_run-unit-tests - - cmd_run-build - - when: - condition: - equal: [<< parameters.node-version >>, "18.15.0"] - steps: - - cmd_codecov - -workflows: - workflow_pr-validator: - when: << pipeline.parameters.run_pr_validator >> - jobs: - - job_pr-validator-win32: - matrix: - parameters: - shell: ["bash.exe", "powershell.exe"] - node-version: ["18.15.0"] - post-steps: - - cmd_slack-notification-error: - text: "$CIRCLE_PULL_REQUEST validation failed on *Node:${CIRCLE_JOB/job_pr-validator-node-/''}* in windows." - - job_pr-validator-node: - matrix: - parameters: - node-version: ["18.15.0"] - post-steps: - - cmd_slack-notification-error: - text: "$CIRCLE_PULL_REQUEST validation failed on *Node:${CIRCLE_JOB/job_pr-validator-node-/''}*." diff --git a/.github/workflows/pr_workflow.yaml b/.github/workflows/pr_workflow.yaml index 4ad6546d1..5ad904411 100644 --- a/.github/workflows/pr_workflow.yaml +++ b/.github/workflows/pr_workflow.yaml @@ -24,6 +24,7 @@ jobs: - uses: actions/setup-node@v3 with: node-version: '22' + registry-url: 'https://npmjs.artifacts.twilio.com/artifactory/api/npm/virtual-npm-thirdparty' - name: Install project dependencies run: | echo "Starting npm ci with a 10-minute timeout" diff --git a/.github/workflows/~reusable_e2e_by_OS.yaml b/.github/workflows/~reusable_e2e_by_OS.yaml index e60f7966e..8937130dd 100644 --- a/.github/workflows/~reusable_e2e_by_OS.yaml +++ b/.github/workflows/~reusable_e2e_by_OS.yaml @@ -102,6 +102,7 @@ jobs: - uses: actions/setup-node@v3 with: node-version: ${{ inputs.NODE_VERSION }} + registry-url: 'https://npmjs.artifacts.twilio.com/artifactory/api/npm/virtual-npm-thirdparty' - name: Override localhost to IPv4 in Linux for Node 18 run: | sudo sed -i '/localhost/s/::1/#::1/' /etc/hosts diff --git a/.github/workflows/~reusable_public_publish.yaml b/.github/workflows/~reusable_public_publish.yaml index 46d15aa30..294808f77 100644 --- a/.github/workflows/~reusable_public_publish.yaml +++ b/.github/workflows/~reusable_public_publish.yaml @@ -44,7 +44,7 @@ jobs: - uses: actions/setup-node@v3 with: node-version: '22' - registry-url: 'https://registry.npmjs.org' + registry-url: 'https://npmjs.artifacts.twilio.com/artifactory/api/npm/virtual-npm-thirdparty' - name: Install dependencies run: | echo "Starting npm ci with a 10-minute timeout" @@ -61,6 +61,8 @@ jobs: SLACK_TITLE: 'Flex Plugins CLI' SLACK_MESSAGE: ':ship_it_parrot: Releasing new public *version* of `flex-plugin-builder`' MSG_MINIMAL: actions url + - name: Configure npm for publish + run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NODE_AUTH_TOKEN }}" >> ~/.npmrc - name: Publish Version run: | git config user.name github-actions diff --git a/.github/workflows/~reusable_publish.yaml b/.github/workflows/~reusable_publish.yaml index 8ce1f3736..d1ed95688 100644 --- a/.github/workflows/~reusable_publish.yaml +++ b/.github/workflows/~reusable_publish.yaml @@ -33,13 +33,15 @@ jobs: - uses: actions/setup-node@v3 with: node-version: "22" - registry-url: "https://registry.npmjs.org" + registry-url: "https://npmjs.artifacts.twilio.com/artifactory/api/npm/virtual-npm-thirdparty" - name: Install dependencies run: | echo "Starting npm ci with a 10-minute timeout" for i in 1 2 3; do # Retry logic, retry 3 times timeout 10m npm ci --verbose && break || echo "npm ci failed, retrying ($i/3)..." done + - name: Configure npm for publish + run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NODE_AUTH_TOKEN }}" >> ~/.npmrc - name: Publish Version run: npm run publish:${{ inputs.TAG }} ${{ inputs.VERSION }} env: From 039311bfbc0fa5d580b0c2a147a42e7cd50c4931 Mon Sep 17 00:00:00 2001 From: shyamasish-twilio <114460196+shyamasish-twilio@users.noreply.github.com> Date: Fri, 29 May 2026 13:33:48 +0530 Subject: [PATCH 2/2] FLEXY-0000 changes for pointing to private artifactory for flex plugin cli --- .npmrc | 1 + 1 file changed, 1 insertion(+) diff --git a/.npmrc b/.npmrc index 55163311b..6aaea8c76 100644 --- a/.npmrc +++ b/.npmrc @@ -1 +1,2 @@ +registry=https://npmjs.artifacts.twilio.com/artifactory/api/npm/virtual-npm-thirdparty/ message=":bookmark: Release v%s"