From 5e478c7a6ee1aac7ce7e43505221afa74914f264 Mon Sep 17 00:00:00 2001 From: Nadia Mayor Date: Fri, 31 Jul 2026 11:34:33 -0300 Subject: [PATCH 01/17] Add harness ci --- .../Harness_Split/pipelines/reactclient.yaml | 173 ++++++++++++++++++ .../input_sets/reactclient_push.yaml | 14 ++ .../input_sets/reactclientinputset.yaml | 14 ++ .../pipelines/reactclient_cd_s3.yaml | 115 ++++++++++++ .../input_sets/reactclient_cd_s3_push.yaml | 14 ++ 5 files changed, 330 insertions(+) create mode 100644 .harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml create mode 100644 .harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient/input_sets/reactclient_push.yaml create mode 100644 .harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient/input_sets/reactclientinputset.yaml create mode 100644 .harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient_cd_s3.yaml create mode 100644 .harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient_cd_s3/input_sets/reactclient_cd_s3_push.yaml diff --git a/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml b/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml new file mode 100644 index 0000000..64634e7 --- /dev/null +++ b/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml @@ -0,0 +1,173 @@ +pipeline: + name: react-client-repo + identifier: reactclient + projectIdentifier: Harness_Split + orgIdentifier: PROD + tags: {} + properties: + ci: + codebase: + connectorRef: fmegithubharnessgitops + repoName: react-client + build: <+input> + depth: 0 + stages: + - stage: + name: Build and Test + identifier: Build_and_Test + description: "" + type: CI + spec: + cloneCodebase: true + caching: + enabled: true + override: true + platform: + os: Linux + arch: Amd64 + runtime: + type: Cloud + spec: + size: flex + execution: + steps: + - step: + type: Run + name: Install Node + identifier: Install_Node + spec: + shell: Bash + command: |- + curl https://mise.run | sh + export PATH="$HOME/.local/bin:$PATH" + mise use --global node@<+matrix.nodeVersion> + node --version + npm --version + - step: + type: Run + name: Install Dependencies + identifier: Install_Dependencies + spec: + shell: Bash + command: |- + export PATH="$HOME/.local/bin:$PATH" + eval "$(mise activate bash)" + npm ci + - step: + type: Run + name: Run Checks + identifier: Run_Checks + spec: + shell: Bash + command: |- + export PATH="$HOME/.local/bin:$PATH" + eval "$(mise activate bash)" + npm run check + - step: + type: Run + name: Run Tests + identifier: Run_Tests + spec: + shell: Bash + command: |- + export PATH="$HOME/.local/bin:$PATH" + eval "$(mise activate bash)" + npm run test + - step: + type: Run + name: Run Build + identifier: Run_Build + spec: + shell: Bash + command: |- + export PATH="$HOME/.local/bin:$PATH" + eval "$(mise activate bash)" + BUILD_BRANCH=<+codebase.branch> npm run build + - step: + type: Run + name: SonarQube Scan + identifier: SonarQube_Scan + when: + stageStatus: Success + condition: <+matrix.nodeVersion> == "lts" + spec: + connectorRef: account.harnessImage + image: sonarsource/sonar-scanner-cli + shell: Bash + command: | + set -euo pipefail + + COMMON_ARGS=" + -Dsonar.host.url=https://sonar.harness.io + -Dsonar.token=$SONAR_TOKEN + -Dsonar.projectKey=react-client + -Dsonar.sources=src + -Dsonar.tests=src/__tests__ + -Dsonar.exclusions=**/node_modules/**,**/umd/**,**/es/**,**/lib/**,src/__tests__/** + -Dsonar.scanner.skipJreProvisioning=true + -Dsonar.scanner.skipSystemTruststore=true + " + + if [ "<+codebase.prNumber>" != "" ] && [ "<+codebase.prNumber>" != "null" ]; then + echo "Pull Request Analysis" + sonar-scanner \ + $COMMON_ARGS \ + -Dsonar.pullrequest.key=<+codebase.prNumber> \ + -Dsonar.pullrequest.branch=<+codebase.sourceBranch> \ + -Dsonar.pullrequest.base=<+codebase.targetBranch> + else + echo "Branch Analysis" + sonar-scanner \ + $COMMON_ARGS \ + -Dsonar.branch.name=<+codebase.branch> + fi + envVariables: + SONAR_TOKEN: <+secrets.getValue("sonarqube-token")> + timeout: 10m + - step: + type: Run + name: Post Quality Gate + identifier: Post_Quality_Gate + when: + stageStatus: Success + condition: <+matrix.nodeVersion> == "lts" + spec: + shell: Bash + command: |- + #!/bin/bash + set -e + + SONAR_TOKEN="<+secrets.getValue("sonarqube-token")>" + SONAR_URL="https://sonar.harness.io" + SONAR_PROJECT_KEY="react-client" + GITHUB_TOKEN="<+secrets.getValue("github-devops-token")>" + GITHUB_REPO="react-client" + COMMIT_SHA="<+codebase.commitSha>" + + STATUS_JSON=$(curl -sf \ + -H "Authorization: Bearer ${SONAR_TOKEN}" \ + "${SONAR_URL}/api/qualitygates/project_status?projectKey=${SONAR_PROJECT_KEY}") + + QG_STATUS=$(echo "$STATUS_JSON" | python3 -c "import sys,json; print(json.load(sys.stdin)['projectStatus']['status'])") + + case "$QG_STATUS" in + OK) GH_STATE="success"; DESCRIPTION="Quality gate passed" ;; + ERROR) GH_STATE="failure"; DESCRIPTION="Quality gate failed" ;; + WARN) GH_STATE="success"; DESCRIPTION="Quality gate passed with warnings" ;; + *) GH_STATE="pending"; DESCRIPTION="Quality gate status unknown" ;; + esac + + TARGET_URL="${SONAR_URL}/dashboard?id=${SONAR_PROJECT_KEY}" + + curl -sf -X POST \ + -H "Authorization: token ${GITHUB_TOKEN}" \ + -H "Accept: application/vnd.github.v3+json" \ + -H "Content-Type: application/json" \ + -d "{\"state\":\"${GH_STATE}\",\"description\":\"${DESCRIPTION}\",\"context\":\"sonarqube/quality-gate\",\"target_url\":\"${TARGET_URL}\"}" \ + "https://api.github.com/repos/splitio/${GITHUB_REPO}/statuses/${COMMIT_SHA}" + + echo "Posted SonarQube quality gate status: ${GH_STATE}" + strategy: + matrix: + nodeVersion: + - "lts" diff --git a/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient/input_sets/reactclient_push.yaml b/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient/input_sets/reactclient_push.yaml new file mode 100644 index 0000000..d768ae6 --- /dev/null +++ b/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient/input_sets/reactclient_push.yaml @@ -0,0 +1,14 @@ +inputSet: + name: reactclient_push + identifier: reactclient_push + orgIdentifier: PROD + projectIdentifier: Harness_Split + pipeline: + identifier: reactclient + properties: + ci: + codebase: + build: + type: branch + spec: + branch: <+trigger.branch> diff --git a/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient/input_sets/reactclientinputset.yaml b/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient/input_sets/reactclientinputset.yaml new file mode 100644 index 0000000..34a0290 --- /dev/null +++ b/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient/input_sets/reactclientinputset.yaml @@ -0,0 +1,14 @@ +inputSet: + name: reactclientinputset + identifier: reactclientinputset + orgIdentifier: PROD + projectIdentifier: Harness_Split + pipeline: + identifier: reactclient + properties: + ci: + codebase: + build: + type: PR + spec: + number: <+trigger.prNumber> diff --git a/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient_cd_s3.yaml b/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient_cd_s3.yaml new file mode 100644 index 0000000..1f56797 --- /dev/null +++ b/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient_cd_s3.yaml @@ -0,0 +1,115 @@ +pipeline: + name: reactclient_cd_s3 + identifier: reactclient_cd_s3 + projectIdentifier: Harness_Split + orgIdentifier: PROD + tags: {} + properties: + ci: + codebase: + connectorRef: fmegithubharnessgitops + repoName: react-client + build: <+input> + stages: + - stage: + name: Deploy to Stage + identifier: Deploy_to_Stage + type: CI + when: + pipelineStatus: Success + condition: <+codebase.branch> == "development" + spec: + cloneCodebase: true + buildIntelligence: + enabled: false + execution: + steps: + - step: + type: Run + name: Build Release Assets + identifier: Build_Release_Assets + spec: + connectorRef: account.harnessImage + image: node:lts + shell: Bash + command: |- + npm ci + npm run build + - step: + type: Run + name: Deploy to S3 + identifier: Deploy_to_S3 + when: + stageStatus: Success + condition: <+trigger.event> == "PUSH" + spec: + connectorRef: account.harnessImage + image: amazon/aws-cli:2.31.5 + shell: Bash + command: |- + aws s3 sync ./umd s3://split-public-stage/sdk \ + --acl public-read --follow-symlinks --cache-control max-age=31536000,public + envVariables: + AWS_DEFAULT_REGION: us-east-1 + infrastructure: + type: KubernetesDirect + spec: + connectorRef: use1prod1cd + namespace: harness-delegate + serviceAccountName: use1-prod-1-reactclient-stage + automountServiceAccountToken: false + nodeSelector: {} + os: Linux + delegateSelectors: + - use1-prod-1-cd + - stage: + name: Deploy to Prod + identifier: Deploy_to_Prod + type: CI + when: + pipelineStatus: Success + condition: <+codebase.branch> == "main" + spec: + cloneCodebase: true + buildIntelligence: + enabled: false + execution: + steps: + - step: + type: Run + name: Build Release Assets + identifier: Build_Release_Assets + spec: + connectorRef: account.harnessImage + image: node:lts + shell: Bash + command: |- + npm ci + npm run build + - step: + type: Run + name: Deploy to S3 + identifier: Deploy_to_S3 + when: + stageStatus: Success + condition: <+trigger.event> == "PUSH" + spec: + connectorRef: account.harnessImage + image: amazon/aws-cli:2.31.5 + shell: Bash + command: |- + aws s3 sync ./umd s3://split-public/sdk \ + --acl public-read --follow-symlinks --cache-control max-age=31536000,public + envVariables: + AWS_DEFAULT_REGION: us-east-1 + infrastructure: + type: KubernetesDirect + spec: + connectorRef: use1prod1cd + namespace: harness-delegate + serviceAccountName: use1-prod-1-reactclient-prod + automountServiceAccountToken: false + nodeSelector: {} + os: Linux + delegateSelectors: + - use1-prod-1-cd diff --git a/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient_cd_s3/input_sets/reactclient_cd_s3_push.yaml b/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient_cd_s3/input_sets/reactclient_cd_s3_push.yaml new file mode 100644 index 0000000..afc8d83 --- /dev/null +++ b/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient_cd_s3/input_sets/reactclient_cd_s3_push.yaml @@ -0,0 +1,14 @@ +inputSet: + name: reactclient_cd_s3_push + identifier: reactclient_cd_s3_push + orgIdentifier: PROD + projectIdentifier: Harness_Split + pipeline: + identifier: reactclient_cd_s3 + properties: + ci: + codebase: + build: + type: branch + spec: + branch: <+trigger.branch> From da49ea0d5cd075304767e45bec39f71f6c55ef0e Mon Sep 17 00:00:00 2001 From: Nadia Mayor Date: Fri, 31 Jul 2026 11:47:23 -0300 Subject: [PATCH 02/17] Updated ci --- .../Harness_Split/pipelines/reactclient.yaml | 96 +++++++++++++++ .../pipelines/reactclient_cd_s3.yaml | 115 ------------------ .../input_sets/reactclient_cd_s3_push.yaml | 14 --- 3 files changed, 96 insertions(+), 129 deletions(-) delete mode 100644 .harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient_cd_s3.yaml delete mode 100644 .harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient_cd_s3/input_sets/reactclient_cd_s3_push.yaml diff --git a/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml b/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml index 64634e7..e40c215 100644 --- a/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml +++ b/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml @@ -171,3 +171,99 @@ pipeline: matrix: nodeVersion: - "lts" + - stage: + name: Deploy to Stage + identifier: Deploy_to_Stage + type: CI + when: + pipelineStatus: Success + condition: <+codebase.branch> == "development" && <+trigger.event> == "PUSH" + spec: + cloneCodebase: true + buildIntelligence: + enabled: false + execution: + steps: + - step: + type: Run + name: Build Release Assets + identifier: Build_Release_Assets + spec: + connectorRef: account.harnessImage + image: node:lts + shell: Bash + command: |- + npm ci + npm run build + - step: + type: Run + name: Deploy to S3 + identifier: Deploy_to_S3 + spec: + connectorRef: account.harnessImage + image: amazon/aws-cli:2.31.5 + shell: Bash + command: |- + aws s3 sync ./umd s3://split-public-stage/sdk \ + --acl public-read --follow-symlinks --cache-control max-age=31536000,public + envVariables: + AWS_DEFAULT_REGION: us-east-1 + infrastructure: + type: KubernetesDirect + spec: + connectorRef: use1prod1cd + namespace: harness-delegate + serviceAccountName: use1-prod-1-reactclient-stage + automountServiceAccountToken: false + nodeSelector: {} + os: Linux + delegateSelectors: + - use1-prod-1-cd + - stage: + name: Deploy to Prod + identifier: Deploy_to_Prod + type: CI + when: + pipelineStatus: Success + condition: <+codebase.branch> == "main" && <+trigger.event> == "PUSH" + spec: + cloneCodebase: true + buildIntelligence: + enabled: false + execution: + steps: + - step: + type: Run + name: Build Release Assets + identifier: Build_Release_Assets + spec: + connectorRef: account.harnessImage + image: node:lts + shell: Bash + command: |- + npm ci + npm run build + - step: + type: Run + name: Deploy to S3 + identifier: Deploy_to_S3 + spec: + connectorRef: account.harnessImage + image: amazon/aws-cli:2.31.5 + shell: Bash + command: |- + aws s3 sync ./umd s3://split-public/sdk \ + --acl public-read --follow-symlinks --cache-control max-age=31536000,public + envVariables: + AWS_DEFAULT_REGION: us-east-1 + infrastructure: + type: KubernetesDirect + spec: + connectorRef: use1prod1cd + namespace: harness-delegate + serviceAccountName: use1-prod-1-reactclient-prod + automountServiceAccountToken: false + nodeSelector: {} + os: Linux + delegateSelectors: + - use1-prod-1-cd diff --git a/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient_cd_s3.yaml b/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient_cd_s3.yaml deleted file mode 100644 index 1f56797..0000000 --- a/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient_cd_s3.yaml +++ /dev/null @@ -1,115 +0,0 @@ -pipeline: - name: reactclient_cd_s3 - identifier: reactclient_cd_s3 - projectIdentifier: Harness_Split - orgIdentifier: PROD - tags: {} - properties: - ci: - codebase: - connectorRef: fmegithubharnessgitops - repoName: react-client - build: <+input> - stages: - - stage: - name: Deploy to Stage - identifier: Deploy_to_Stage - type: CI - when: - pipelineStatus: Success - condition: <+codebase.branch> == "development" - spec: - cloneCodebase: true - buildIntelligence: - enabled: false - execution: - steps: - - step: - type: Run - name: Build Release Assets - identifier: Build_Release_Assets - spec: - connectorRef: account.harnessImage - image: node:lts - shell: Bash - command: |- - npm ci - npm run build - - step: - type: Run - name: Deploy to S3 - identifier: Deploy_to_S3 - when: - stageStatus: Success - condition: <+trigger.event> == "PUSH" - spec: - connectorRef: account.harnessImage - image: amazon/aws-cli:2.31.5 - shell: Bash - command: |- - aws s3 sync ./umd s3://split-public-stage/sdk \ - --acl public-read --follow-symlinks --cache-control max-age=31536000,public - envVariables: - AWS_DEFAULT_REGION: us-east-1 - infrastructure: - type: KubernetesDirect - spec: - connectorRef: use1prod1cd - namespace: harness-delegate - serviceAccountName: use1-prod-1-reactclient-stage - automountServiceAccountToken: false - nodeSelector: {} - os: Linux - delegateSelectors: - - use1-prod-1-cd - - stage: - name: Deploy to Prod - identifier: Deploy_to_Prod - type: CI - when: - pipelineStatus: Success - condition: <+codebase.branch> == "main" - spec: - cloneCodebase: true - buildIntelligence: - enabled: false - execution: - steps: - - step: - type: Run - name: Build Release Assets - identifier: Build_Release_Assets - spec: - connectorRef: account.harnessImage - image: node:lts - shell: Bash - command: |- - npm ci - npm run build - - step: - type: Run - name: Deploy to S3 - identifier: Deploy_to_S3 - when: - stageStatus: Success - condition: <+trigger.event> == "PUSH" - spec: - connectorRef: account.harnessImage - image: amazon/aws-cli:2.31.5 - shell: Bash - command: |- - aws s3 sync ./umd s3://split-public/sdk \ - --acl public-read --follow-symlinks --cache-control max-age=31536000,public - envVariables: - AWS_DEFAULT_REGION: us-east-1 - infrastructure: - type: KubernetesDirect - spec: - connectorRef: use1prod1cd - namespace: harness-delegate - serviceAccountName: use1-prod-1-reactclient-prod - automountServiceAccountToken: false - nodeSelector: {} - os: Linux - delegateSelectors: - - use1-prod-1-cd diff --git a/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient_cd_s3/input_sets/reactclient_cd_s3_push.yaml b/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient_cd_s3/input_sets/reactclient_cd_s3_push.yaml deleted file mode 100644 index afc8d83..0000000 --- a/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient_cd_s3/input_sets/reactclient_cd_s3_push.yaml +++ /dev/null @@ -1,14 +0,0 @@ -inputSet: - name: reactclient_cd_s3_push - identifier: reactclient_cd_s3_push - orgIdentifier: PROD - projectIdentifier: Harness_Split - pipeline: - identifier: reactclient_cd_s3 - properties: - ci: - codebase: - build: - type: branch - spec: - branch: <+trigger.branch> From 2f03a2949404658947e3452da1fab065b9691c84 Mon Sep 17 00:00:00 2001 From: Emiliano Sanchez Date: Fri, 31 Jul 2026 12:09:21 -0300 Subject: [PATCH 03/17] Simplify CI --- .../Harness_Split/pipelines/reactclient.yaml | 129 +++++------------- 1 file changed, 33 insertions(+), 96 deletions(-) diff --git a/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml b/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml index e40c215..231dd25 100644 --- a/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml +++ b/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml @@ -167,103 +167,40 @@ pipeline: "https://api.github.com/repos/splitio/${GITHUB_REPO}/statuses/${COMMIT_SHA}" echo "Posted SonarQube quality gate status: ${GH_STATE}" + - parallel: + - step: + type: Run + name: Deploy to Stage S3 + identifier: Deploy_to_Stage_S3 + when: + stageStatus: Success + condition: <+matrix.nodeVersion> == "lts" && <+codebase.branch> == "development" && <+trigger.event> == "PUSH" + spec: + connectorRef: account.harnessImage + image: amazon/aws-cli:2.31.5 + shell: Bash + command: |- + aws s3 sync ./umd s3://split-public-stage/sdk \ + --acl public-read --follow-symlinks --cache-control max-age=31536000,public + envVariables: + AWS_DEFAULT_REGION: us-east-1 + - step: + type: Run + name: Deploy to Prod S3 + identifier: Deploy_to_Prod_S3 + when: + stageStatus: Success + condition: <+matrix.nodeVersion> == "lts" && <+codebase.branch> == "main" && <+trigger.event> == "PUSH" + spec: + connectorRef: account.harnessImage + image: amazon/aws-cli:2.31.5 + shell: Bash + command: |- + aws s3 sync ./umd s3://split-public/sdk \ + --acl public-read --follow-symlinks --cache-control max-age=31536000,public + envVariables: + AWS_DEFAULT_REGION: us-east-1 strategy: matrix: nodeVersion: - "lts" - - stage: - name: Deploy to Stage - identifier: Deploy_to_Stage - type: CI - when: - pipelineStatus: Success - condition: <+codebase.branch> == "development" && <+trigger.event> == "PUSH" - spec: - cloneCodebase: true - buildIntelligence: - enabled: false - execution: - steps: - - step: - type: Run - name: Build Release Assets - identifier: Build_Release_Assets - spec: - connectorRef: account.harnessImage - image: node:lts - shell: Bash - command: |- - npm ci - npm run build - - step: - type: Run - name: Deploy to S3 - identifier: Deploy_to_S3 - spec: - connectorRef: account.harnessImage - image: amazon/aws-cli:2.31.5 - shell: Bash - command: |- - aws s3 sync ./umd s3://split-public-stage/sdk \ - --acl public-read --follow-symlinks --cache-control max-age=31536000,public - envVariables: - AWS_DEFAULT_REGION: us-east-1 - infrastructure: - type: KubernetesDirect - spec: - connectorRef: use1prod1cd - namespace: harness-delegate - serviceAccountName: use1-prod-1-reactclient-stage - automountServiceAccountToken: false - nodeSelector: {} - os: Linux - delegateSelectors: - - use1-prod-1-cd - - stage: - name: Deploy to Prod - identifier: Deploy_to_Prod - type: CI - when: - pipelineStatus: Success - condition: <+codebase.branch> == "main" && <+trigger.event> == "PUSH" - spec: - cloneCodebase: true - buildIntelligence: - enabled: false - execution: - steps: - - step: - type: Run - name: Build Release Assets - identifier: Build_Release_Assets - spec: - connectorRef: account.harnessImage - image: node:lts - shell: Bash - command: |- - npm ci - npm run build - - step: - type: Run - name: Deploy to S3 - identifier: Deploy_to_S3 - spec: - connectorRef: account.harnessImage - image: amazon/aws-cli:2.31.5 - shell: Bash - command: |- - aws s3 sync ./umd s3://split-public/sdk \ - --acl public-read --follow-symlinks --cache-control max-age=31536000,public - envVariables: - AWS_DEFAULT_REGION: us-east-1 - infrastructure: - type: KubernetesDirect - spec: - connectorRef: use1prod1cd - namespace: harness-delegate - serviceAccountName: use1-prod-1-reactclient-prod - automountServiceAccountToken: false - nodeSelector: {} - os: Linux - delegateSelectors: - - use1-prod-1-cd From 9dbd07e7cfb6858638594f44dd3bed016bae269d Mon Sep 17 00:00:00 2001 From: Nadia Mayor Date: Fri, 31 Jul 2026 12:20:06 -0300 Subject: [PATCH 04/17] ci: trigger validation Co-Authored-By: Claude Sonnet 4.6 AI-Session-Id: f0f3d103-4dc6-4518-ad97-997b6285a5bb AI-Tool: claude-code AI-Model: unknown From ccec3bcf59ade4d9b84642129a68dd6682c00651 Mon Sep 17 00:00:00 2001 From: Emiliano Sanchez Date: Fri, 31 Jul 2026 13:19:30 -0300 Subject: [PATCH 05/17] Remove GitHub actions --- .github/CODEOWNERS | 1 - .github/pull_request_template.md | 7 -- .github/workflows/ci-cd.yml | 135 ----------------------- .github/workflows/update-notice-year.yml | 45 -------- 4 files changed, 188 deletions(-) delete mode 100644 .github/CODEOWNERS delete mode 100644 .github/pull_request_template.md delete mode 100644 .github/workflows/ci-cd.yml delete mode 100644 .github/workflows/update-notice-year.yml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index 9e31981..0000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1 +0,0 @@ -* @splitio/sdk diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md deleted file mode 100644 index f51e2c7..0000000 --- a/.github/pull_request_template.md +++ /dev/null @@ -1,7 +0,0 @@ -# React SDK - -## What did you accomplish? - -## How do we test the changes introduced in this PR? - -## Extra Notes diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml deleted file mode 100644 index 6fc6399..0000000 --- a/.github/workflows/ci-cd.yml +++ /dev/null @@ -1,135 +0,0 @@ -name: ci - -on: - push: - branches: - - '**' - pull_request: - branches: - - main - - development - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number }} - cancel-in-progress: true - -permissions: - contents: read - id-token: write - -jobs: - build: - name: Build - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v5 - with: - fetch-depth: 0 - - - name: Set up Node.js - uses: actions/setup-node@v6 - with: - node-version: 'lts/*' - cache: 'npm' - - - name: npm ci - run: npm ci - - - name: npm check - run: npm run check - - - name: npm test - run: npm run test - - - name: npm build - run: BUILD_BRANCH=$(echo "${GITHUB_REF#refs/heads/}") npm run build - - - name: Set VERSION env - run: echo "VERSION=$(cat package.json | jq -r .version)" >> $GITHUB_ENV - - - name: Store assets - if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/development') - uses: actions/upload-artifact@v5 - with: - name: assets - path: umd/ - retention-days: 1 - - upload-stage: - name: Upload assets - runs-on: ubuntu-latest - needs: build - if: github.event_name == 'push' && github.ref == 'refs/heads/development' - strategy: - matrix: - environment: - - stage - include: - - environment: stage - account_id: "079419646996" - bucket: split-public-stage - - steps: - - name: Download assets - uses: actions/download-artifact@v6 - with: - name: assets - path: umd - - - name: Display structure of assets - run: ls -R - working-directory: umd - - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: arn:aws:iam::${{ matrix.account_id }}:role/gha-public-assets-role - aws-region: us-east-1 - - - name: Upload to S3 - run: aws s3 sync $SOURCE_DIR s3://$BUCKET/$DEST_DIR $ARGS - env: - BUCKET: ${{ matrix.bucket }} - SOURCE_DIR: ./umd - DEST_DIR: sdk - ARGS: --acl public-read --follow-symlinks --cache-control max-age=31536000,public - - upload-prod: - name: Upload assets - runs-on: ubuntu-latest - needs: build - if: github.event_name == 'push' && github.ref == 'refs/heads/main' - strategy: - matrix: - environment: - - prod - include: - - environment: prod - account_id: "825951051969" - bucket: split-public - - steps: - - name: Download assets - uses: actions/download-artifact@v6 - with: - name: assets - path: umd - - - name: Display structure of assets - run: ls -R - working-directory: umd - - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: arn:aws:iam::${{ matrix.account_id }}:role/gha-public-assets-role - aws-region: us-east-1 - - - name: Upload to S3 - run: aws s3 sync $SOURCE_DIR s3://$BUCKET/$DEST_DIR $ARGS - env: - BUCKET: ${{ matrix.bucket }} - SOURCE_DIR: ./umd - DEST_DIR: sdk - ARGS: --acl public-read --follow-symlinks --cache-control max-age=31536000,public diff --git a/.github/workflows/update-notice-year.yml b/.github/workflows/update-notice-year.yml deleted file mode 100644 index 7043f6f..0000000 --- a/.github/workflows/update-notice-year.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: Update Notice Year - -on: - schedule: - - cron: "0 3 1 1 *" # 03:00 AM on January 1 - -permissions: - contents: write - pull-requests: write - -jobs: - test: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v5 - with: - fetch-depth: 0 - - - name: Set Current year - run: "echo CURRENT=$(date +%Y) >> $GITHUB_ENV" - - - name: Set Previous Year - run: "echo PREVIOUS=$(($CURRENT-1)) >> $GITHUB_ENV" - - - name: Update NOTICE - uses: jacobtomlinson/gha-find-replace@v3 - with: - find: ${{ env.PREVIOUS }} - replace: ${{ env.CURRENT }} - include: "NOTICE" - regex: false - - - name: Commit files - run: | - git config user.name 'github-actions[bot]' - git config user.email 'github-actions[bot]@users.noreply.github.com' - git commit -m "Updated Notice Year" -a - - - name: Create Pull Request - uses: peter-evans/create-pull-request@v5 - with: - token: ${{ secrets.GITHUB_TOKEN }} - title: Update Notice Year - branch: update-notice From 771f7179af7b7c0c01ff201cfcfd568182a7f2d6 Mon Sep 17 00:00:00 2001 From: Emiliano Sanchez Date: Fri, 31 Jul 2026 13:50:35 -0300 Subject: [PATCH 06/17] =?UTF-8?q?connectorRef:=20artifacts=20=E2=80=94=20A?= =?UTF-8?q?WS=20auth,=20same=20as=20javascript-client?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PROD/projects/Harness_Split/pipelines/reactclient.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml b/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml index 231dd25..f58cca4 100644 --- a/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml +++ b/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml @@ -176,8 +176,7 @@ pipeline: stageStatus: Success condition: <+matrix.nodeVersion> == "lts" && <+codebase.branch> == "development" && <+trigger.event> == "PUSH" spec: - connectorRef: account.harnessImage - image: amazon/aws-cli:2.31.5 + connectorRef: artifacts shell: Bash command: |- aws s3 sync ./umd s3://split-public-stage/sdk \ @@ -192,8 +191,7 @@ pipeline: stageStatus: Success condition: <+matrix.nodeVersion> == "lts" && <+codebase.branch> == "main" && <+trigger.event> == "PUSH" spec: - connectorRef: account.harnessImage - image: amazon/aws-cli:2.31.5 + connectorRef: artifacts shell: Bash command: |- aws s3 sync ./umd s3://split-public/sdk \ From b14e093b7b15a61d5651ac006e672f8940f0da02 Mon Sep 17 00:00:00 2001 From: Nadia Mayor Date: Fri, 31 Jul 2026 14:17:26 -0300 Subject: [PATCH 07/17] ci: trigger validation Co-Authored-By: Claude Sonnet 4.6 AI-Session-Id: f0f3d103-4dc6-4518-ad97-997b6285a5bb AI-Tool: claude-code AI-Model: unknown From 97133a275e204914f35facff9020024d55d957e7 Mon Sep 17 00:00:00 2001 From: Emiliano Sanchez Date: Fri, 31 Jul 2026 17:51:07 -0300 Subject: [PATCH 08/17] Simplify pipeline --- .../Harness_Split/pipelines/reactclient.yaml | 43 +++++-------------- 1 file changed, 10 insertions(+), 33 deletions(-) diff --git a/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml b/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml index f58cca4..0dd6417 100644 --- a/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml +++ b/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml @@ -33,14 +33,13 @@ pipeline: steps: - step: type: Run - name: Install Node - identifier: Install_Node + name: Set up Node.js + identifier: Set_up_Nodejs spec: shell: Bash command: |- - curl https://mise.run | sh - export PATH="$HOME/.local/bin:$PATH" - mise use --global node@<+matrix.nodeVersion> + curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - + sudo apt-get install -y nodejs node --version npm --version - step: @@ -49,47 +48,32 @@ pipeline: identifier: Install_Dependencies spec: shell: Bash - command: |- - export PATH="$HOME/.local/bin:$PATH" - eval "$(mise activate bash)" - npm ci + command: npm ci - step: type: Run name: Run Checks identifier: Run_Checks spec: shell: Bash - command: |- - export PATH="$HOME/.local/bin:$PATH" - eval "$(mise activate bash)" - npm run check + command: npm run check - step: type: Run name: Run Tests identifier: Run_Tests spec: shell: Bash - command: |- - export PATH="$HOME/.local/bin:$PATH" - eval "$(mise activate bash)" - npm run test + command: npm run test - step: type: Run name: Run Build identifier: Run_Build spec: shell: Bash - command: |- - export PATH="$HOME/.local/bin:$PATH" - eval "$(mise activate bash)" - BUILD_BRANCH=<+codebase.branch> npm run build + command: BUILD_BRANCH=<+codebase.branch> npm run build - step: type: Run name: SonarQube Scan identifier: SonarQube_Scan - when: - stageStatus: Success - condition: <+matrix.nodeVersion> == "lts" spec: connectorRef: account.harnessImage image: sonarsource/sonar-scanner-cli @@ -128,9 +112,6 @@ pipeline: type: Run name: Post Quality Gate identifier: Post_Quality_Gate - when: - stageStatus: Success - condition: <+matrix.nodeVersion> == "lts" spec: shell: Bash command: |- @@ -174,7 +155,7 @@ pipeline: identifier: Deploy_to_Stage_S3 when: stageStatus: Success - condition: <+matrix.nodeVersion> == "lts" && <+codebase.branch> == "development" && <+trigger.event> == "PUSH" + condition: <+codebase.branch> == "development" && <+trigger.event> == "PUSH" spec: connectorRef: artifacts shell: Bash @@ -189,7 +170,7 @@ pipeline: identifier: Deploy_to_Prod_S3 when: stageStatus: Success - condition: <+matrix.nodeVersion> == "lts" && <+codebase.branch> == "main" && <+trigger.event> == "PUSH" + condition: <+codebase.branch> == "main" && <+trigger.event> == "PUSH" spec: connectorRef: artifacts shell: Bash @@ -198,7 +179,3 @@ pipeline: --acl public-read --follow-symlinks --cache-control max-age=31536000,public envVariables: AWS_DEFAULT_REGION: us-east-1 - strategy: - matrix: - nodeVersion: - - "lts" From 5a346044491e48a660673b2484fb691001026945 Mon Sep 17 00:00:00 2001 From: Emiliano Sanchez Date: Fri, 31 Jul 2026 18:19:11 -0300 Subject: [PATCH 09/17] Migrate Harness CI as in js-client --- .../Harness_Split/pipelines/reactclient.yaml | 103 +++++++++--------- 1 file changed, 54 insertions(+), 49 deletions(-) diff --git a/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml b/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml index 0dd6417..cd5d5ca 100644 --- a/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml +++ b/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml @@ -10,11 +10,10 @@ pipeline: connectorRef: fmegithubharnessgitops repoName: react-client build: <+input> - depth: 0 stages: - stage: - name: Build and Test - identifier: Build_and_Test + name: Check-Test-Build-Upload + identifier: Check_Test_Build_Upload description: "" type: CI spec: @@ -22,52 +21,49 @@ pipeline: caching: enabled: true override: true - platform: - os: Linux - arch: Amd64 - runtime: - type: Cloud - spec: - size: flex + paths: [] + buildIntelligence: + enabled: false execution: steps: - step: type: Run - name: Set up Node.js - identifier: Set_up_Nodejs - spec: - shell: Bash - command: |- - curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - - sudo apt-get install -y nodejs - node --version - npm --version - - step: - type: Run - name: Install Dependencies - identifier: Install_Dependencies + name: npm ci + identifier: npm_ci spec: + connectorRef: dockerhub + image: node:lts shell: Bash command: npm ci - step: type: Run - name: Run Checks - identifier: Run_Checks + name: npm run check + identifier: npm_run_check spec: + connectorRef: dockerhub + image: node:lts shell: Bash command: npm run check - step: type: Run - name: Run Tests - identifier: Run_Tests + name: npm run test + identifier: npm_run_test spec: + connectorRef: dockerhub + image: node:lts shell: Bash - command: npm run test + command: npm run test -- --maxWorkers=2 + resources: + limits: + memory: 4Gi + cpu: "2" - step: type: Run - name: Run Build - identifier: Run_Build + name: npm run build + identifier: npm_run_build spec: + connectorRef: dockerhub + image: node:lts shell: Bash command: BUILD_BRANCH=<+codebase.branch> npm run build - step: @@ -75,7 +71,7 @@ pipeline: name: SonarQube Scan identifier: SonarQube_Scan spec: - connectorRef: account.harnessImage + connectorRef: dockerhub image: sonarsource/sonar-scanner-cli shell: Bash command: | @@ -113,6 +109,8 @@ pipeline: name: Post Quality Gate identifier: Post_Quality_Gate spec: + connectorRef: dockerhub + image: python:3 shell: Bash command: |- #!/bin/bash @@ -151,31 +149,38 @@ pipeline: - parallel: - step: type: Run - name: Deploy to Stage S3 - identifier: Deploy_to_Stage_S3 - when: - stageStatus: Success - condition: <+codebase.branch> == "development" && <+trigger.event> == "PUSH" + name: upload dev assets to CDN + identifier: upload_dev_assets_to_CDN spec: - connectorRef: artifacts + connectorRef: dockerhub + image: amazon/aws-cli:2.31.5 shell: Bash - command: |- - aws s3 sync ./umd s3://split-public-stage/sdk \ - --acl public-read --follow-symlinks --cache-control max-age=31536000,public + command: aws s3 sync ./umd s3://split-public-stage/sdk --acl public-read --follow-symlinks --cache-control max-age=31536000,public envVariables: AWS_DEFAULT_REGION: us-east-1 - - step: - type: Run - name: Deploy to Prod S3 - identifier: Deploy_to_Prod_S3 when: stageStatus: Success - condition: <+codebase.branch> == "main" && <+trigger.event> == "PUSH" + condition: <+trigger.event> == "PUSH" && <+trigger.branch> == "development" + - step: + type: Run + name: upload prod assets to CDN + identifier: upload_prod_assets_to_CDN spec: - connectorRef: artifacts + connectorRef: dockerhub + image: amazon/aws-cli:2.31.5 shell: Bash - command: |- - aws s3 sync ./umd s3://split-public/sdk \ - --acl public-read --follow-symlinks --cache-control max-age=31536000,public + command: aws s3 sync ./umd s3://split-public/sdk --acl public-read --follow-symlinks --cache-control max-age=31536000,public envVariables: AWS_DEFAULT_REGION: us-east-1 + when: + stageStatus: Success + condition: <+trigger.event> == "PUSH" && <+trigger.branch> == "main" + infrastructure: + type: KubernetesDirect + spec: + connectorRef: "<+codebase.branch == \"main\" ? \"use1prod1cd\" : \"use1stage1cd\">" + namespace: harness-delegate + serviceAccountName: "<+codebase.branch == \"main\" ? \"use1-prod-1-public-assets\" : \"use1-stage-1-public-assets\">" + automountServiceAccountToken: false + nodeSelector: {} + os: Linux From f577173ce15bcad2242f1e970bf2655b51d4fc59 Mon Sep 17 00:00:00 2001 From: Luis Sanchez Date: Mon, 3 Aug 2026 13:54:41 +0000 Subject: [PATCH 10/17] Update pipeline react-client-repo --- .../orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml b/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml index cd5d5ca..42d10cc 100644 --- a/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml +++ b/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml @@ -184,3 +184,5 @@ pipeline: automountServiceAccountToken: false nodeSelector: {} os: Linux + delegateSelectors: + - "<+codebase.branch == \"main\" ? \"use1-prod-1-cd\" : \"use1-stage-1-cd\">" From 9814a5c9527455f74b3d9f08b73d767ddc8923b4 Mon Sep 17 00:00:00 2001 From: Emiliano Sanchez Date: Mon, 3 Aug 2026 11:37:38 -0300 Subject: [PATCH 11/17] Fix SonarQube Scan step --- .../PROD/projects/Harness_Split/pipelines/reactclient.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml b/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml index 42d10cc..411e285 100644 --- a/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml +++ b/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml @@ -182,7 +182,8 @@ pipeline: namespace: harness-delegate serviceAccountName: "<+codebase.branch == \"main\" ? \"use1-prod-1-public-assets\" : \"use1-stage-1-public-assets\">" automountServiceAccountToken: false - nodeSelector: {} + nodeSelector: + kubernetes.io/arch: amd64 os: Linux delegateSelectors: - "<+codebase.branch == \"main\" ? \"use1-prod-1-cd\" : \"use1-stage-1-cd\">" From 9f43a18862c9a8156fbab592bc77005be37db9cf Mon Sep 17 00:00:00 2001 From: Emiliano Sanchez Date: Mon, 3 Aug 2026 11:57:49 -0300 Subject: [PATCH 12/17] Fix SonarQube Scan step --- .../PROD/projects/Harness_Split/pipelines/reactclient.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml b/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml index 411e285..96515f7 100644 --- a/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml +++ b/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml @@ -72,7 +72,8 @@ pipeline: identifier: SonarQube_Scan spec: connectorRef: dockerhub - image: sonarsource/sonar-scanner-cli + image: sonarsource/sonar-scanner-cli:11.3 + imagePullPolicy: Always shell: Bash command: | set -euo pipefail From 959fa1a37b77b7deebfc1616331f43cc844b8b6d Mon Sep 17 00:00:00 2001 From: Emiliano Sanchez Date: Mon, 3 Aug 2026 12:23:15 -0300 Subject: [PATCH 13/17] Skip failing SonarQube Scan steps --- .../Harness_Split/pipelines/reactclient.yaml | 148 +++++++++--------- 1 file changed, 74 insertions(+), 74 deletions(-) diff --git a/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml b/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml index 96515f7..1b64dc0 100644 --- a/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml +++ b/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml @@ -66,87 +66,87 @@ pipeline: image: node:lts shell: Bash command: BUILD_BRANCH=<+codebase.branch> npm run build - - step: - type: Run - name: SonarQube Scan - identifier: SonarQube_Scan - spec: - connectorRef: dockerhub - image: sonarsource/sonar-scanner-cli:11.3 - imagePullPolicy: Always - shell: Bash - command: | - set -euo pipefail + # - step: + # type: Run + # name: SonarQube Scan + # identifier: SonarQube_Scan + # spec: + # connectorRef: dockerhub + # image: sonarsource/sonar-scanner-cli:11.3 + # imagePullPolicy: Always + # shell: Bash + # command: | + # set -euo pipefail - COMMON_ARGS=" - -Dsonar.host.url=https://sonar.harness.io - -Dsonar.token=$SONAR_TOKEN - -Dsonar.projectKey=react-client - -Dsonar.sources=src - -Dsonar.tests=src/__tests__ - -Dsonar.exclusions=**/node_modules/**,**/umd/**,**/es/**,**/lib/**,src/__tests__/** - -Dsonar.scanner.skipJreProvisioning=true - -Dsonar.scanner.skipSystemTruststore=true - " + # COMMON_ARGS=" + # -Dsonar.host.url=https://sonar.harness.io + # -Dsonar.token=$SONAR_TOKEN + # -Dsonar.projectKey=react-client + # -Dsonar.sources=src + # -Dsonar.tests=src/__tests__ + # -Dsonar.exclusions=**/node_modules/**,**/umd/**,**/es/**,**/lib/**,src/__tests__/** + # -Dsonar.scanner.skipJreProvisioning=true + # -Dsonar.scanner.skipSystemTruststore=true + # " - if [ "<+codebase.prNumber>" != "" ] && [ "<+codebase.prNumber>" != "null" ]; then - echo "Pull Request Analysis" - sonar-scanner \ - $COMMON_ARGS \ - -Dsonar.pullrequest.key=<+codebase.prNumber> \ - -Dsonar.pullrequest.branch=<+codebase.sourceBranch> \ - -Dsonar.pullrequest.base=<+codebase.targetBranch> - else - echo "Branch Analysis" - sonar-scanner \ - $COMMON_ARGS \ - -Dsonar.branch.name=<+codebase.branch> - fi - envVariables: - SONAR_TOKEN: <+secrets.getValue("sonarqube-token")> - timeout: 10m - - step: - type: Run - name: Post Quality Gate - identifier: Post_Quality_Gate - spec: - connectorRef: dockerhub - image: python:3 - shell: Bash - command: |- - #!/bin/bash - set -e + # if [ "<+codebase.prNumber>" != "" ] && [ "<+codebase.prNumber>" != "null" ]; then + # echo "Pull Request Analysis" + # sonar-scanner \ + # $COMMON_ARGS \ + # -Dsonar.pullrequest.key=<+codebase.prNumber> \ + # -Dsonar.pullrequest.branch=<+codebase.sourceBranch> \ + # -Dsonar.pullrequest.base=<+codebase.targetBranch> + # else + # echo "Branch Analysis" + # sonar-scanner \ + # $COMMON_ARGS \ + # -Dsonar.branch.name=<+codebase.branch> + # fi + # envVariables: + # SONAR_TOKEN: <+secrets.getValue("sonarqube-token")> + # timeout: 10m + # - step: + # type: Run + # name: Post Quality Gate + # identifier: Post_Quality_Gate + # spec: + # connectorRef: dockerhub + # image: python:3 + # shell: Bash + # command: |- + # #!/bin/bash + # set -e - SONAR_TOKEN="<+secrets.getValue("sonarqube-token")>" - SONAR_URL="https://sonar.harness.io" - SONAR_PROJECT_KEY="react-client" - GITHUB_TOKEN="<+secrets.getValue("github-devops-token")>" - GITHUB_REPO="react-client" - COMMIT_SHA="<+codebase.commitSha>" + # SONAR_TOKEN="<+secrets.getValue("sonarqube-token")>" + # SONAR_URL="https://sonar.harness.io" + # SONAR_PROJECT_KEY="react-client" + # GITHUB_TOKEN="<+secrets.getValue("github-devops-token")>" + # GITHUB_REPO="react-client" + # COMMIT_SHA="<+codebase.commitSha>" - STATUS_JSON=$(curl -sf \ - -H "Authorization: Bearer ${SONAR_TOKEN}" \ - "${SONAR_URL}/api/qualitygates/project_status?projectKey=${SONAR_PROJECT_KEY}") + # STATUS_JSON=$(curl -sf \ + # -H "Authorization: Bearer ${SONAR_TOKEN}" \ + # "${SONAR_URL}/api/qualitygates/project_status?projectKey=${SONAR_PROJECT_KEY}") - QG_STATUS=$(echo "$STATUS_JSON" | python3 -c "import sys,json; print(json.load(sys.stdin)['projectStatus']['status'])") + # QG_STATUS=$(echo "$STATUS_JSON" | python3 -c "import sys,json; print(json.load(sys.stdin)['projectStatus']['status'])") - case "$QG_STATUS" in - OK) GH_STATE="success"; DESCRIPTION="Quality gate passed" ;; - ERROR) GH_STATE="failure"; DESCRIPTION="Quality gate failed" ;; - WARN) GH_STATE="success"; DESCRIPTION="Quality gate passed with warnings" ;; - *) GH_STATE="pending"; DESCRIPTION="Quality gate status unknown" ;; - esac + # case "$QG_STATUS" in + # OK) GH_STATE="success"; DESCRIPTION="Quality gate passed" ;; + # ERROR) GH_STATE="failure"; DESCRIPTION="Quality gate failed" ;; + # WARN) GH_STATE="success"; DESCRIPTION="Quality gate passed with warnings" ;; + # *) GH_STATE="pending"; DESCRIPTION="Quality gate status unknown" ;; + # esac - TARGET_URL="${SONAR_URL}/dashboard?id=${SONAR_PROJECT_KEY}" + # TARGET_URL="${SONAR_URL}/dashboard?id=${SONAR_PROJECT_KEY}" - curl -sf -X POST \ - -H "Authorization: token ${GITHUB_TOKEN}" \ - -H "Accept: application/vnd.github.v3+json" \ - -H "Content-Type: application/json" \ - -d "{\"state\":\"${GH_STATE}\",\"description\":\"${DESCRIPTION}\",\"context\":\"sonarqube/quality-gate\",\"target_url\":\"${TARGET_URL}\"}" \ - "https://api.github.com/repos/splitio/${GITHUB_REPO}/statuses/${COMMIT_SHA}" + # curl -sf -X POST \ + # -H "Authorization: token ${GITHUB_TOKEN}" \ + # -H "Accept: application/vnd.github.v3+json" \ + # -H "Content-Type: application/json" \ + # -d "{\"state\":\"${GH_STATE}\",\"description\":\"${DESCRIPTION}\",\"context\":\"sonarqube/quality-gate\",\"target_url\":\"${TARGET_URL}\"}" \ + # "https://api.github.com/repos/splitio/${GITHUB_REPO}/statuses/${COMMIT_SHA}" - echo "Posted SonarQube quality gate status: ${GH_STATE}" + # echo "Posted SonarQube quality gate status: ${GH_STATE}" - parallel: - step: type: Run @@ -183,8 +183,8 @@ pipeline: namespace: harness-delegate serviceAccountName: "<+codebase.branch == \"main\" ? \"use1-prod-1-public-assets\" : \"use1-stage-1-public-assets\">" automountServiceAccountToken: false - nodeSelector: - kubernetes.io/arch: amd64 + nodeSelector: {} + # kubernetes.io/arch: amd64 os: Linux delegateSelectors: - "<+codebase.branch == \"main\" ? \"use1-prod-1-cd\" : \"use1-stage-1-cd\">" From c7dedffaca0f8488d3bebe42aac7f3dfa14dcc12 Mon Sep 17 00:00:00 2001 From: Emiliano Sanchez Date: Mon, 3 Aug 2026 12:32:51 -0300 Subject: [PATCH 14/17] Trigger CDN step --- .../orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml b/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml index 1b64dc0..6527eea 100644 --- a/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml +++ b/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml @@ -161,7 +161,7 @@ pipeline: AWS_DEFAULT_REGION: us-east-1 when: stageStatus: Success - condition: <+trigger.event> == "PUSH" && <+trigger.branch> == "development" + condition: <+trigger.event> == "PR" && <+trigger.branch> == "FME-17146" - step: type: Run name: upload prod assets to CDN From df9b2f2dbde5e4c6936dd96e2ab9c4e34bc457d7 Mon Sep 17 00:00:00 2001 From: Emiliano Sanchez Date: Mon, 3 Aug 2026 13:20:24 -0300 Subject: [PATCH 15/17] Test RC --- .../Harness_Split/pipelines/reactclient.yaml | 82 ------------------- package-lock.json | 4 +- package.json | 2 +- 3 files changed, 3 insertions(+), 85 deletions(-) diff --git a/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml b/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml index 6527eea..8c1d7d7 100644 --- a/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml +++ b/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml @@ -66,87 +66,6 @@ pipeline: image: node:lts shell: Bash command: BUILD_BRANCH=<+codebase.branch> npm run build - # - step: - # type: Run - # name: SonarQube Scan - # identifier: SonarQube_Scan - # spec: - # connectorRef: dockerhub - # image: sonarsource/sonar-scanner-cli:11.3 - # imagePullPolicy: Always - # shell: Bash - # command: | - # set -euo pipefail - - # COMMON_ARGS=" - # -Dsonar.host.url=https://sonar.harness.io - # -Dsonar.token=$SONAR_TOKEN - # -Dsonar.projectKey=react-client - # -Dsonar.sources=src - # -Dsonar.tests=src/__tests__ - # -Dsonar.exclusions=**/node_modules/**,**/umd/**,**/es/**,**/lib/**,src/__tests__/** - # -Dsonar.scanner.skipJreProvisioning=true - # -Dsonar.scanner.skipSystemTruststore=true - # " - - # if [ "<+codebase.prNumber>" != "" ] && [ "<+codebase.prNumber>" != "null" ]; then - # echo "Pull Request Analysis" - # sonar-scanner \ - # $COMMON_ARGS \ - # -Dsonar.pullrequest.key=<+codebase.prNumber> \ - # -Dsonar.pullrequest.branch=<+codebase.sourceBranch> \ - # -Dsonar.pullrequest.base=<+codebase.targetBranch> - # else - # echo "Branch Analysis" - # sonar-scanner \ - # $COMMON_ARGS \ - # -Dsonar.branch.name=<+codebase.branch> - # fi - # envVariables: - # SONAR_TOKEN: <+secrets.getValue("sonarqube-token")> - # timeout: 10m - # - step: - # type: Run - # name: Post Quality Gate - # identifier: Post_Quality_Gate - # spec: - # connectorRef: dockerhub - # image: python:3 - # shell: Bash - # command: |- - # #!/bin/bash - # set -e - - # SONAR_TOKEN="<+secrets.getValue("sonarqube-token")>" - # SONAR_URL="https://sonar.harness.io" - # SONAR_PROJECT_KEY="react-client" - # GITHUB_TOKEN="<+secrets.getValue("github-devops-token")>" - # GITHUB_REPO="react-client" - # COMMIT_SHA="<+codebase.commitSha>" - - # STATUS_JSON=$(curl -sf \ - # -H "Authorization: Bearer ${SONAR_TOKEN}" \ - # "${SONAR_URL}/api/qualitygates/project_status?projectKey=${SONAR_PROJECT_KEY}") - - # QG_STATUS=$(echo "$STATUS_JSON" | python3 -c "import sys,json; print(json.load(sys.stdin)['projectStatus']['status'])") - - # case "$QG_STATUS" in - # OK) GH_STATE="success"; DESCRIPTION="Quality gate passed" ;; - # ERROR) GH_STATE="failure"; DESCRIPTION="Quality gate failed" ;; - # WARN) GH_STATE="success"; DESCRIPTION="Quality gate passed with warnings" ;; - # *) GH_STATE="pending"; DESCRIPTION="Quality gate status unknown" ;; - # esac - - # TARGET_URL="${SONAR_URL}/dashboard?id=${SONAR_PROJECT_KEY}" - - # curl -sf -X POST \ - # -H "Authorization: token ${GITHUB_TOKEN}" \ - # -H "Accept: application/vnd.github.v3+json" \ - # -H "Content-Type: application/json" \ - # -d "{\"state\":\"${GH_STATE}\",\"description\":\"${DESCRIPTION}\",\"context\":\"sonarqube/quality-gate\",\"target_url\":\"${TARGET_URL}\"}" \ - # "https://api.github.com/repos/splitio/${GITHUB_REPO}/statuses/${COMMIT_SHA}" - - # echo "Posted SonarQube quality gate status: ${GH_STATE}" - parallel: - step: type: Run @@ -184,7 +103,6 @@ pipeline: serviceAccountName: "<+codebase.branch == \"main\" ? \"use1-prod-1-public-assets\" : \"use1-stage-1-public-assets\">" automountServiceAccountToken: false nodeSelector: {} - # kubernetes.io/arch: amd64 os: Linux delegateSelectors: - "<+codebase.branch == \"main\" ? \"use1-prod-1-cd\" : \"use1-stage-1-cd\">" diff --git a/package-lock.json b/package-lock.json index d9fa4fb..732ac4d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@splitsoftware/splitio-react", - "version": "2.6.2", + "version": "2.6.2-rc.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@splitsoftware/splitio-react", - "version": "2.6.2", + "version": "2.6.2-rc.0", "license": "Apache-2.0", "dependencies": { "@splitsoftware/splitio": "11.11.2", diff --git a/package.json b/package.json index eb29038..3d59d0f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@splitsoftware/splitio-react", - "version": "2.6.2", + "version": "2.6.2-rc.0", "description": "A React library to easily integrate and use Split JS SDK", "main": "cjs/index.js", "module": "esm/index.js", From bdc0fb578e997949df9d03ba376b4cc3c4f2e93f Mon Sep 17 00:00:00 2001 From: Emiliano Sanchez Date: Mon, 3 Aug 2026 13:23:43 -0300 Subject: [PATCH 16/17] Polishing --- .../PROD/projects/Harness_Split/pipelines/reactclient.yaml | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml b/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml index 8c1d7d7..8179cd8 100644 --- a/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml +++ b/.harness/orgs/PROD/projects/Harness_Split/pipelines/reactclient.yaml @@ -80,7 +80,7 @@ pipeline: AWS_DEFAULT_REGION: us-east-1 when: stageStatus: Success - condition: <+trigger.event> == "PR" && <+trigger.branch> == "FME-17146" + condition: <+trigger.event> == "PUSH" && <+trigger.branch> == "development" - step: type: Run name: upload prod assets to CDN diff --git a/package-lock.json b/package-lock.json index 732ac4d..d9fa4fb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@splitsoftware/splitio-react", - "version": "2.6.2-rc.0", + "version": "2.6.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@splitsoftware/splitio-react", - "version": "2.6.2-rc.0", + "version": "2.6.2", "license": "Apache-2.0", "dependencies": { "@splitsoftware/splitio": "11.11.2", diff --git a/package.json b/package.json index 3d59d0f..eb29038 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@splitsoftware/splitio-react", - "version": "2.6.2-rc.0", + "version": "2.6.2", "description": "A React library to easily integrate and use Split JS SDK", "main": "cjs/index.js", "module": "esm/index.js", From 358ed4198e274feb723a9298346a78c46c690ea9 Mon Sep 17 00:00:00 2001 From: Emiliano Sanchez Date: Mon, 3 Aug 2026 13:26:08 -0300 Subject: [PATCH 17/17] Fix vulnerabilities --- package-lock.json | 60 +++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/package-lock.json b/package-lock.json index d9fa4fb..a4a0401 100644 --- a/package-lock.json +++ b/package-lock.json @@ -634,9 +634,9 @@ } }, "node_modules/@eslint/eslintrc/node_modules/js-yaml": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.2.0.tgz", - "integrity": "sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.1.tgz", + "integrity": "sha512-CY6crGq313MX8GkwvB7tzgp99vjQxY1++5y10/BKN/GUfHqWaOGQMNZkBvqSzsZKWk/ijwHlWzzkLulsGHhjWQ==", "dev": true, "funding": [ { @@ -1615,9 +1615,9 @@ "license": "Python-2.0" }, "node_modules/@splitsoftware/splitio/node_modules/js-yaml": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.2.0.tgz", - "integrity": "sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.1.tgz", + "integrity": "sha512-CY6crGq313MX8GkwvB7tzgp99vjQxY1++5y10/BKN/GUfHqWaOGQMNZkBvqSzsZKWk/ijwHlWzzkLulsGHhjWQ==", "funding": [ { "type": "github", @@ -3096,9 +3096,9 @@ } }, "node_modules/brace-expansion": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.15.tgz", - "integrity": "sha512-EwOCDEex4quD37XhqM3omwtMoJjr//isUZz1JopUNWms+4Z2ViyM/k1YIRePpoVNnQhENnxtFjLaxNHrT7xIUg==", + "version": "1.1.18", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.18.tgz", + "integrity": "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw==", "dev": true, "license": "MIT", "dependencies": { @@ -4594,9 +4594,9 @@ } }, "node_modules/eslint/node_modules/js-yaml": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.2.0.tgz", - "integrity": "sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.1.tgz", + "integrity": "sha512-CY6crGq313MX8GkwvB7tzgp99vjQxY1++5y10/BKN/GUfHqWaOGQMNZkBvqSzsZKWk/ijwHlWzzkLulsGHhjWQ==", "dev": true, "funding": [ { @@ -4974,9 +4974,9 @@ "dev": true }, "node_modules/fast-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.2.tgz", - "integrity": "sha512-rVjf7ArG3LTk+FS6Yw81V1DLuZl1bRbNrev6Tmd/9RaroeeRRJhAt7jg/6YFxbvAQXUCavSoZhPPj6oOx+5KjQ==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.5.tgz", + "integrity": "sha512-gHwA1O9LDIcKunMKhObS/HimwtehO1nPUECKAu5TpKgaO19fcWEl4bliWe1jWxVFvIXztJjjQ4L8XQ1EU9f7Jw==", "dev": true, "funding": [ { @@ -11681,9 +11681,9 @@ } }, "js-yaml": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.2.0.tgz", - "integrity": "sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.1.tgz", + "integrity": "sha512-CY6crGq313MX8GkwvB7tzgp99vjQxY1++5y10/BKN/GUfHqWaOGQMNZkBvqSzsZKWk/ijwHlWzzkLulsGHhjWQ==", "dev": true, "requires": { "argparse": "^2.0.1" @@ -12396,9 +12396,9 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, "js-yaml": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.2.0.tgz", - "integrity": "sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.1.tgz", + "integrity": "sha512-CY6crGq313MX8GkwvB7tzgp99vjQxY1++5y10/BKN/GUfHqWaOGQMNZkBvqSzsZKWk/ijwHlWzzkLulsGHhjWQ==", "requires": { "argparse": "^2.0.1" } @@ -13492,9 +13492,9 @@ } }, "brace-expansion": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.15.tgz", - "integrity": "sha512-EwOCDEex4quD37XhqM3omwtMoJjr//isUZz1JopUNWms+4Z2ViyM/k1YIRePpoVNnQhENnxtFjLaxNHrT7xIUg==", + "version": "1.1.18", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.18.tgz", + "integrity": "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw==", "dev": true, "requires": { "balanced-match": "^1.0.0", @@ -14342,9 +14342,9 @@ "dev": true }, "js-yaml": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.2.0.tgz", - "integrity": "sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.1.tgz", + "integrity": "sha512-CY6crGq313MX8GkwvB7tzgp99vjQxY1++5y10/BKN/GUfHqWaOGQMNZkBvqSzsZKWk/ijwHlWzzkLulsGHhjWQ==", "dev": true, "requires": { "argparse": "^2.0.1" @@ -14873,9 +14873,9 @@ "dev": true }, "fast-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.2.tgz", - "integrity": "sha512-rVjf7ArG3LTk+FS6Yw81V1DLuZl1bRbNrev6Tmd/9RaroeeRRJhAt7jg/6YFxbvAQXUCavSoZhPPj6oOx+5KjQ==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.5.tgz", + "integrity": "sha512-gHwA1O9LDIcKunMKhObS/HimwtehO1nPUECKAu5TpKgaO19fcWEl4bliWe1jWxVFvIXztJjjQ4L8XQ1EU9f7Jw==", "dev": true }, "fastest-levenshtein": {