From b6844bfaf922571e8f43e2119a8cb4163f42e6c0 Mon Sep 17 00:00:00 2001 From: Mauro Antonio Sanz Date: Tue, 28 Jul 2026 15:38:13 -0300 Subject: [PATCH 1/6] ci: add Harness CI pipeline for split-openfeature-provider-web-js AI-Session-Id: 707cde61-7e1b-49ca-a01f-c0676f02c549 AI-Tool: claude-code AI-Model: unknown --- ...splitopenfeatureproviderwebjsinputset.yaml | 14 ++ .harness/pipeline.yaml | 148 ++++++++++++++++++ 2 files changed, 162 insertions(+) create mode 100644 .harness/orgs/PROD/projects/Harness_Split/pipelines/splitopenfeatureproviderwe/input_sets/splitopenfeatureproviderwebjsinputset.yaml create mode 100644 .harness/pipeline.yaml diff --git a/.harness/orgs/PROD/projects/Harness_Split/pipelines/splitopenfeatureproviderwe/input_sets/splitopenfeatureproviderwebjsinputset.yaml b/.harness/orgs/PROD/projects/Harness_Split/pipelines/splitopenfeatureproviderwe/input_sets/splitopenfeatureproviderwebjsinputset.yaml new file mode 100644 index 0000000..e9088eb --- /dev/null +++ b/.harness/orgs/PROD/projects/Harness_Split/pipelines/splitopenfeatureproviderwe/input_sets/splitopenfeatureproviderwebjsinputset.yaml @@ -0,0 +1,14 @@ +inputSet: + name: splitopenfeatureproviderwe input set + identifier: splitopenfeatureproviderwebjsinputset + orgIdentifier: PROD + projectIdentifier: Harness_Split + pipeline: + identifier: splitopenfeatureproviderwe + properties: + ci: + codebase: + build: + type: PR + spec: + number: <+trigger.prNumber> diff --git a/.harness/pipeline.yaml b/.harness/pipeline.yaml new file mode 100644 index 0000000..423a040 --- /dev/null +++ b/.harness/pipeline.yaml @@ -0,0 +1,148 @@ +pipeline: + name: split-openfeature-provider-web-js + identifier: splitopenfeatureproviderwe + projectIdentifier: Harness_Split + orgIdentifier: PROD + tags: {} + properties: + ci: + codebase: + connectorRef: fmegithubharnessgitops + repoName: split-openfeature-provider-web-js + build: + type: branch + spec: + branch: <+input> + 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 Lint + identifier: Run_Lint + 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: SonarQube Scan + identifier: SonarQube_Scan + when: + stageStatus: Success + condition: <+matrix.nodeVersion> == "lts/*" + spec: + shell: Sh + command: |- + export SONAR_SCANNER_VERSION=5.0.1.3006 + curl -sSLo sonar-scanner.zip \ + "https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${SONAR_SCANNER_VERSION}-linux.zip" + unzip -q sonar-scanner.zip + export PATH="$PWD/sonar-scanner-${SONAR_SCANNER_VERSION}-linux/bin:$PATH" + apt-get install -y openjdk-17-jdk -qq + sonar-scanner \ + -Dsonar.projectKey=split-openfeature-provider-web-js \ + -Dsonar.sources=src \ + -Dsonar.tests=src \ + -Dsonar.test.inclusions="**/*.spec.ts,**/*.test.ts,**/__tests__/**" \ + -Dsonar.host.url=https://sonar.harness.io \ + -Dsonar.token=<+secrets.getValue("sonarqube-token")> \ + -Dsonar.exclusions="**/node_modules/**,**/.git/**,**/lib/**,**/es/**,**/cjs/**" + - 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="split-openfeature-provider-web-js" + GITHUB_TOKEN="<+secrets.getValue("github-devops-token")>" + GITHUB_REPO="split-openfeature-provider-web-js" + 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/*" From 42fb491882d659d72421aaf85b048691587fca6b Mon Sep 17 00:00:00 2001 From: Mauro Antonio Sanz Date: Tue, 28 Jul 2026 15:49:34 -0300 Subject: [PATCH 2/6] Fix pipeline codebase build type to PR to match input set AI-Session-Id: 707cde61-7e1b-49ca-a01f-c0676f02c549 AI-Tool: claude-code AI-Model: unknown --- .harness/pipeline.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.harness/pipeline.yaml b/.harness/pipeline.yaml index 423a040..5c9cd1a 100644 --- a/.harness/pipeline.yaml +++ b/.harness/pipeline.yaml @@ -10,9 +10,9 @@ pipeline: connectorRef: fmegithubharnessgitops repoName: split-openfeature-provider-web-js build: - type: branch + type: PR spec: - branch: <+input> + number: <+input> stages: - stage: name: Build and Test From c25296de7bcd6f7a94503bd75446c2e1af9e3577 Mon Sep 17 00:00:00 2001 From: Mauro Antonio Sanz Date: Tue, 28 Jul 2026 15:52:21 -0300 Subject: [PATCH 3/6] Remove input set file to let Harness API register it AI-Session-Id: 707cde61-7e1b-49ca-a01f-c0676f02c549 AI-Tool: claude-code AI-Model: unknown --- .../splitopenfeatureproviderwebjsinputset.yaml | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 .harness/orgs/PROD/projects/Harness_Split/pipelines/splitopenfeatureproviderwe/input_sets/splitopenfeatureproviderwebjsinputset.yaml diff --git a/.harness/orgs/PROD/projects/Harness_Split/pipelines/splitopenfeatureproviderwe/input_sets/splitopenfeatureproviderwebjsinputset.yaml b/.harness/orgs/PROD/projects/Harness_Split/pipelines/splitopenfeatureproviderwe/input_sets/splitopenfeatureproviderwebjsinputset.yaml deleted file mode 100644 index e9088eb..0000000 --- a/.harness/orgs/PROD/projects/Harness_Split/pipelines/splitopenfeatureproviderwe/input_sets/splitopenfeatureproviderwebjsinputset.yaml +++ /dev/null @@ -1,14 +0,0 @@ -inputSet: - name: splitopenfeatureproviderwe input set - identifier: splitopenfeatureproviderwebjsinputset - orgIdentifier: PROD - projectIdentifier: Harness_Split - pipeline: - identifier: splitopenfeatureproviderwe - properties: - ci: - codebase: - build: - type: PR - spec: - number: <+trigger.prNumber> From 377e4c70fa24dfa573459f8d4345917917c9620e Mon Sep 17 00:00:00 2001 From: Mauro Sanz Date: Tue, 28 Jul 2026 18:52:49 +0000 Subject: [PATCH 4/6] Harness.io Git Commit --- .../splitopenfeatureproviderwebjsinputset.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .harness/orgs/PROD/projects/Harness_Split/pipelines/splitopenfeatureproviderwe/input_sets/splitopenfeatureproviderwebjsinputset.yaml diff --git a/.harness/orgs/PROD/projects/Harness_Split/pipelines/splitopenfeatureproviderwe/input_sets/splitopenfeatureproviderwebjsinputset.yaml b/.harness/orgs/PROD/projects/Harness_Split/pipelines/splitopenfeatureproviderwe/input_sets/splitopenfeatureproviderwebjsinputset.yaml new file mode 100644 index 0000000..e9088eb --- /dev/null +++ b/.harness/orgs/PROD/projects/Harness_Split/pipelines/splitopenfeatureproviderwe/input_sets/splitopenfeatureproviderwebjsinputset.yaml @@ -0,0 +1,14 @@ +inputSet: + name: splitopenfeatureproviderwe input set + identifier: splitopenfeatureproviderwebjsinputset + orgIdentifier: PROD + projectIdentifier: Harness_Split + pipeline: + identifier: splitopenfeatureproviderwe + properties: + ci: + codebase: + build: + type: PR + spec: + number: <+trigger.prNumber> From 1627ec282744159314c7d2f41b99372798b5d954 Mon Sep 17 00:00:00 2001 From: Mauro Antonio Sanz Date: Tue, 28 Jul 2026 15:59:46 -0300 Subject: [PATCH 5/6] Use mise-compatible node version alias (lts, not lts/*) AI-Session-Id: 707cde61-7e1b-49ca-a01f-c0676f02c549 AI-Tool: claude-code AI-Model: unknown --- .harness/pipeline.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.harness/pipeline.yaml b/.harness/pipeline.yaml index 5c9cd1a..c865ffe 100644 --- a/.harness/pipeline.yaml +++ b/.harness/pipeline.yaml @@ -81,7 +81,7 @@ pipeline: identifier: SonarQube_Scan when: stageStatus: Success - condition: <+matrix.nodeVersion> == "lts/*" + condition: <+matrix.nodeVersion> == "lts" spec: shell: Sh command: |- @@ -105,7 +105,7 @@ pipeline: identifier: Post_Quality_Gate when: stageStatus: Success - condition: <+matrix.nodeVersion> == "lts/*" + condition: <+matrix.nodeVersion> == "lts" spec: shell: Bash command: |- @@ -145,4 +145,4 @@ pipeline: strategy: matrix: nodeVersion: - - "lts/*" + - "lts" From be03497be032c7817a3f0018c04fc672ca849500 Mon Sep 17 00:00:00 2001 From: Mauro Antonio Sanz Date: Tue, 28 Jul 2026 16:08:47 -0300 Subject: [PATCH 6/6] Remove GitHub Actions workflow in favor of Harness CI pipeline AI-Session-Id: 707cde61-7e1b-49ca-a01f-c0676f02c549 AI-Tool: claude-code AI-Model: unknown --- .github/CODEOWNERS | 1 - .github/workflows/test.yml | 32 -------------------------------- 2 files changed, 33 deletions(-) delete mode 100644 .github/CODEOWNERS delete mode 100644 .github/workflows/test.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/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 3eac060..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: test -on: - pull_request: - branches: - - '*' - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number }} - cancel-in-progress: true - -jobs: - build: - name: Run tests - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v5 - - - name: Setup Node.js - uses: actions/setup-node@v4 - 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