From 081b96f232b814ec3264bf0887a07ffffdd769d4 Mon Sep 17 00:00:00 2001 From: Mauro Antonio Sanz Date: Tue, 28 Jul 2026 12:08:27 -0300 Subject: [PATCH 1/5] ci: add Harness CI pipeline for python-client AI-Session-Id: 92557858-9e44-4359-b6ec-a5219bd4bd6c AI-Tool: claude-code AI-Model: unknown --- .../input_sets/pythonclientinputset.yaml | 14 ++ .harness/pipeline.yaml | 167 ++++++++++++++++++ 2 files changed, 181 insertions(+) create mode 100644 .harness/orgs/PROD/projects/Harness_Split/pipelines/pythonclient/input_sets/pythonclientinputset.yaml create mode 100644 .harness/pipeline.yaml diff --git a/.harness/orgs/PROD/projects/Harness_Split/pipelines/pythonclient/input_sets/pythonclientinputset.yaml b/.harness/orgs/PROD/projects/Harness_Split/pipelines/pythonclient/input_sets/pythonclientinputset.yaml new file mode 100644 index 00000000..fca4ec2e --- /dev/null +++ b/.harness/orgs/PROD/projects/Harness_Split/pipelines/pythonclient/input_sets/pythonclientinputset.yaml @@ -0,0 +1,14 @@ +inputSet: + name: pythonclientinputset + identifier: pythonclientinputset + orgIdentifier: PROD + projectIdentifier: Harness_Split + pipeline: + identifier: pythonclient + 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 00000000..c9e6cc09 --- /dev/null +++ b/.harness/pipeline.yaml @@ -0,0 +1,167 @@ +pipeline: + name: python-client-repo + identifier: pythonclient + projectIdentifier: Harness_Split + orgIdentifier: PROD + tags: {} + properties: + ci: + codebase: + connectorRef: fmegithubharnessgitops + repoName: python-client + 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 Python + identifier: Install_Python + spec: + shell: Bash + command: |- + curl https://mise.run | sh + export PATH="$HOME/.local/bin:$PATH" + mise use --global python@<+matrix.pythonVersion> + eval "$(mise activate bash)" + python --version + pip --version + - step: + type: Run + name: Start Redis + identifier: Start_Redis + spec: + shell: Sh + command: |- + apt-get install -y redis-server -qq + redis-server --daemonize yes --port 6379 + redis-cli ping + - step: + type: Run + name: Wait for Redis + identifier: Wait_for_Redis + spec: + shell: Sh + command: |- + for i in $(seq 1 15); do + redis-cli ping && break + echo "Waiting for Redis... attempt $i" + sleep 1 + done + - step: + type: Run + name: Install Dependencies + identifier: Install_Dependencies + spec: + shell: Bash + command: |- + export PATH="$HOME/.local/bin:$PATH" + eval "$(mise activate bash)" + apt-get install -y libkrb5-dev musl-dev libffi-dev build-essential -qq + pip install --upgrade pip setuptools wheel + pip install Cython + pip install aiohttp + pip install cryptography + pip install pycparser + pip install redis + pip install -e . + - step: + type: Run + name: Run Tests + identifier: Run_Tests + spec: + shell: Bash + command: |- + export PATH="$HOME/.local/bin:$PATH" + eval "$(mise activate bash)" + python setup.py test + - step: + type: Run + name: SonarQube Scan + identifier: SonarQube_Scan + when: + stageStatus: Success + condition: <+matrix.pythonVersion> == "3.7.16" + spec: + shell: Sh + command: |- + docker run --rm \ + -e SONAR_HOST_URL="https://sonar.harness.io" \ + -e SONAR_TOKEN="<+secrets.getValue("sonarqube-token")>" \ + -v "$(pwd):/usr/src" \ + sonarsource/sonar-scanner-cli \ + -Dsonar.projectKey=python-client \ + -Dsonar.sources=splitio \ + -Dsonar.tests=tests \ + -Dsonar.python.coverage.reportPaths=coverage.xml \ + -Dsonar.pullrequest.key=<+codebase.prNumber> \ + -Dsonar.pullrequest.branch=<+codebase.branch> \ + -Dsonar.pullrequest.base=development \ + -Dsonar.branch.name=<+codebase.branch> + - step: + type: Run + name: Post Quality Gate + identifier: Post_Quality_Gate + when: + stageStatus: Success + condition: <+matrix.pythonVersion> == "3.7.16" + spec: + shell: Bash + command: |- + #!/bin/bash + set -e + + SONAR_TOKEN="<+secrets.getValue("sonarqube-token")>" + SONAR_URL="https://sonar.harness.io" + SONAR_PROJECT_KEY="python-client" + GITHUB_TOKEN="<+secrets.getValue("github-devops-token")>" + GITHUB_REPO="python-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: + pythonVersion: + - "3.7.16" From befa2951554783c3a812f2ad1e79e2ae7d5cc915 Mon Sep 17 00:00:00 2001 From: Mauro Antonio Sanz Date: Tue, 28 Jul 2026 15:28:03 -0300 Subject: [PATCH 2/5] ci: consolidate python-client Harness pipeline into single registered file Replace the legacy Alpine/apk-based pipeline content with the mise-based matrix pipeline, and remove duplicate pipeline/input-set files that were not wired to the registered pythonclient pipeline. AI-Session-Id: c742c077-a969-465d-9d1f-06b64f8eee99 AI-Tool: claude-code AI-Model: unknown --- .../Harness_Split/pipelines/pythonclient.yaml | 233 ++++++++++-------- .../input_sets/pythonclientinputset.yaml | 14 -- .harness/pipeline.yaml | 167 ------------- 3 files changed, 124 insertions(+), 290 deletions(-) delete mode 100644 .harness/orgs/PROD/projects/Harness_Split/pipelines/pythonclient/input_sets/pythonclientinputset.yaml delete mode 100644 .harness/pipeline.yaml diff --git a/.harness/orgs/PROD/projects/Harness_Split/pipelines/pythonclient.yaml b/.harness/orgs/PROD/projects/Harness_Split/pipelines/pythonclient.yaml index 2be61cb1..d6768823 100644 --- a/.harness/orgs/PROD/projects/Harness_Split/pipelines/pythonclient.yaml +++ b/.harness/orgs/PROD/projects/Harness_Split/pipelines/pythonclient.yaml @@ -3,147 +3,162 @@ pipeline: identifier: pythonclient projectIdentifier: Harness_Split orgIdentifier: PROD - tags: - ai_generated: "true" + tags: {} properties: ci: codebase: connectorRef: <+input> repoName: <+input> build: <+input> - variables: - - name: sonarqube_token - type: Secret - value: <+secrets.getValue('sonarqube-token')> - - name: github_token - type: Secret - value: <+secrets.getValue('github-devops-token')> stages: - stage: name: Build and Test - identifier: ci_stage + identifier: Build_and_Test + description: "" type: CI spec: cloneCodebase: true - runtime: - type: Cloud - spec: - size: medium - nestedVirtualization: true + caching: + enabled: true + override: true platform: os: Linux arch: Amd64 + runtime: + type: Cloud + spec: + size: flex execution: steps: - step: - timeout: 30m - type: Test - name: Run Python Tests - identifier: run_tests + type: Run + name: Install Python + identifier: Install_Python + spec: + shell: Bash + command: |- + curl https://mise.run | sh + export PATH="$HOME/.local/bin:$PATH" + mise use --global python@<+matrix.pythonVersion> + eval "$(mise activate bash)" + python --version + pip --version + - step: + type: Run + name: Start Redis + identifier: Start_Redis spec: - connectorRef: account.harnessImage - image: python:3.7.16-alpine shell: Sh command: |- - apk update - apk add --no-cache krb5-dev musl-dev libffi-dev build-base - - # Run pytest with JUnit XML report output - cd /harness - pip install --upgrade pip - pip install -U setuptools pip wheel - pip install Cython==3.0.12 - pip install aiohttp==3.8.4 - pip install cryptography==45.0.7 - pip install pycparser==2.21 - - apk add redis - redis-server /etc/redis.conf & - - pip install redis==5.0.8 - python setup.py test - envVariables: - PYTHONPATH: ${PYTHONPATH}:. - PYTEST_ADDOPTS: "--verbose" + apt-get install -y redis-server -qq + redis-server --daemonize yes --port 6379 + redis-cli ping - step: type: Run - name: Install and Run SonarQube Scanner - identifier: install_sonarqube_scanner + name: Wait for Redis + identifier: Wait_for_Redis + spec: + shell: Sh + command: |- + for i in $(seq 1 15); do + redis-cli ping && break + echo "Waiting for Redis... attempt $i" + sleep 1 + done + - step: + type: Run + name: Install Dependencies + identifier: Install_Dependencies spec: - connectorRef: account.harnessImage - image: sonarsource/sonar-scanner-cli shell: Bash - command: | - cd /harness - if [ "<+codebase.prNumber>" != "" ]; then - echo "Pull Request Analysis" - sonar-scanner -X \ - -Dsonar.host.url=https://sonar.harness.io \ - -Dsonar.token=<+secrets.getValue('sonarqube-token')> \ - -Dsonar.projectKey=python-client \ - -Dsonar.scanner.skipJreProvisioning=true \ - -Dsonar.pullrequest.key=<+codebase.prNumber> \ - -Dsonar.pullrequest.branch=<+codebase.sourceBranch> \ - -Dsonar.pullrequest.base=<+codebase.targetBranch> \ - -Dsonar.scanner.skipSystemTruststore=true - else - echo "Branch Analysis" - sonar-scanner \ - -Dsonar.host.url=https://sonar.harness.io \ - -Dsonar.token=<+secrets.getValue('sonarqube-token')> \ - -Dsonar.projectKey=python-client \ - -Dsonar.scanner.skipJreProvisioning=true \ - -Dsonar.branch.name=<+codebase.branch> \ - -Dsonar.scanner.skipSystemTruststore=true - fi - envVariables: - SONAR_TOKEN: <+pipeline.variables.sonarqube_token> - outputVariables: - - name: SONAR_SCANNER_PATH - timeout: 10m + command: |- + export PATH="$HOME/.local/bin:$PATH" + eval "$(mise activate bash)" + apt-get install -y libkrb5-dev musl-dev libffi-dev build-essential -qq + pip install --upgrade pip setuptools wheel + pip install Cython + pip install aiohttp + pip install cryptography + pip install pycparser + pip install redis + pip install -e . + - step: + type: Run + name: Run Tests + identifier: Run_Tests + spec: + shell: Bash + command: |- + export PATH="$HOME/.local/bin:$PATH" + eval "$(mise activate bash)" + python setup.py test - step: type: Run - name: Post Quality Gate to GitHub - identifier: Post_Quality_Gate_to_GitHub + name: SonarQube Scan + identifier: SonarQube_Scan + when: + stageStatus: Success + condition: <+matrix.pythonVersion> == "3.7.16" spec: shell: Sh command: |- - # Get SonarQube quality gate status - curl -u <+secrets.getValue('sonarqube-token')>: \ - -s "https://sonar.harness.io/api/qualitygates/project_status?projectKey=python-client&pullRequest=${<+codebase.prNumber>}" + docker run --rm \ + -e SONAR_HOST_URL="https://sonar.harness.io" \ + -e SONAR_TOKEN="<+secrets.getValue("sonarqube-token")>" \ + -v "$(pwd):/usr/src" \ + sonarsource/sonar-scanner-cli \ + -Dsonar.projectKey=python-client \ + -Dsonar.sources=splitio \ + -Dsonar.tests=tests \ + -Dsonar.python.coverage.reportPaths=coverage.xml \ + -Dsonar.pullrequest.key=<+codebase.prNumber> \ + -Dsonar.pullrequest.branch=<+codebase.branch> \ + -Dsonar.pullrequest.base=development \ + -Dsonar.branch.name=<+codebase.branch> + - step: + type: Run + name: Post Quality Gate + identifier: Post_Quality_Gate + when: + stageStatus: Success + condition: <+matrix.pythonVersion> == "3.7.16" + spec: + shell: Bash + command: |- + #!/bin/bash + set -e - curl -u <+secrets.getValue('sonarqube-token')>: -s 'https://sonar.harness.io/api/qualitygates/project_status?projectKey=python-client&pullRequest=${<+codebase.prNumber>}' | jq -r .projectStatus.status + SONAR_TOKEN="<+secrets.getValue("sonarqube-token")>" + SONAR_URL="https://sonar.harness.io" + SONAR_PROJECT_KEY="python-client" + GITHUB_TOKEN="<+secrets.getValue("github-devops-token")>" + GITHUB_REPO="python-client" + COMMIT_SHA="<+codebase.commitSha>" - QUALITY_GATE_STATUS=$(curl -u <+secrets.getValue('sonarqube-token')>: -s 'https://sonar.harness.io/api/qualitygates/project_status?projectKey=python-client&pullRequest=${<+codebase.prNumber>}' | jq -r .projectStatus.status) + STATUS_JSON=$(curl -sf \ + -H "Authorization: Bearer ${SONAR_TOKEN}" \ + "${SONAR_URL}/api/qualitygates/project_status?projectKey=${SONAR_PROJECT_KEY}") - echo "QUALITY_GATE_STATUS: $QUALITY_GATE_STATUS" + QG_STATUS=$(echo "$STATUS_JSON" | python3 -c "import sys,json; print(json.load(sys.stdin)['projectStatus']['status'])") - # Set GitHub status based on quality gate - if [ "$QUALITY_GATE_STATUS" = "OK" ]; then - STATE="success" - DESCRIPTION="SonarQube Quality Gate passed" - else - STATE="failure" - DESCRIPTION="SonarQube Quality Gate failed" - fi + 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 - # Post status to GitHub - curl -X POST \ - -H "Authorization: token ${<+secrets.getValue('github-devops-token')>}" \ - -H "Content-Type: application/json" \ - -d "{ - \"state\": \"${STATE}\", - \"description\": \"${DESCRIPTION}\", - \"context\": \"sonarqube/qualitygate\", - \"target_url\": \"https://sonar.harness.io/dashboard?id=python-client&pullRequest=${<+codebase.prNumber>}\" - }" \ - "https://api.github.com/repos/splitio/python-client/statuses/<+codebase.commitSha>" - rollbackSteps: [] - rollbackSteps: [] - caching: - enabled: false - paths: [] - buildIntelligence: - enabled: false - description: "" - description: This pipeline was updated by Harness AI on 2026-02-04 05:22:48 UTC by Bilal Al-Shahwany. + 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: + pythonVersion: + - "3.7.16" diff --git a/.harness/orgs/PROD/projects/Harness_Split/pipelines/pythonclient/input_sets/pythonclientinputset.yaml b/.harness/orgs/PROD/projects/Harness_Split/pipelines/pythonclient/input_sets/pythonclientinputset.yaml deleted file mode 100644 index fca4ec2e..00000000 --- a/.harness/orgs/PROD/projects/Harness_Split/pipelines/pythonclient/input_sets/pythonclientinputset.yaml +++ /dev/null @@ -1,14 +0,0 @@ -inputSet: - name: pythonclientinputset - identifier: pythonclientinputset - orgIdentifier: PROD - projectIdentifier: Harness_Split - pipeline: - identifier: pythonclient - properties: - ci: - codebase: - build: - type: PR - spec: - number: <+trigger.prNumber> diff --git a/.harness/pipeline.yaml b/.harness/pipeline.yaml deleted file mode 100644 index c9e6cc09..00000000 --- a/.harness/pipeline.yaml +++ /dev/null @@ -1,167 +0,0 @@ -pipeline: - name: python-client-repo - identifier: pythonclient - projectIdentifier: Harness_Split - orgIdentifier: PROD - tags: {} - properties: - ci: - codebase: - connectorRef: fmegithubharnessgitops - repoName: python-client - 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 Python - identifier: Install_Python - spec: - shell: Bash - command: |- - curl https://mise.run | sh - export PATH="$HOME/.local/bin:$PATH" - mise use --global python@<+matrix.pythonVersion> - eval "$(mise activate bash)" - python --version - pip --version - - step: - type: Run - name: Start Redis - identifier: Start_Redis - spec: - shell: Sh - command: |- - apt-get install -y redis-server -qq - redis-server --daemonize yes --port 6379 - redis-cli ping - - step: - type: Run - name: Wait for Redis - identifier: Wait_for_Redis - spec: - shell: Sh - command: |- - for i in $(seq 1 15); do - redis-cli ping && break - echo "Waiting for Redis... attempt $i" - sleep 1 - done - - step: - type: Run - name: Install Dependencies - identifier: Install_Dependencies - spec: - shell: Bash - command: |- - export PATH="$HOME/.local/bin:$PATH" - eval "$(mise activate bash)" - apt-get install -y libkrb5-dev musl-dev libffi-dev build-essential -qq - pip install --upgrade pip setuptools wheel - pip install Cython - pip install aiohttp - pip install cryptography - pip install pycparser - pip install redis - pip install -e . - - step: - type: Run - name: Run Tests - identifier: Run_Tests - spec: - shell: Bash - command: |- - export PATH="$HOME/.local/bin:$PATH" - eval "$(mise activate bash)" - python setup.py test - - step: - type: Run - name: SonarQube Scan - identifier: SonarQube_Scan - when: - stageStatus: Success - condition: <+matrix.pythonVersion> == "3.7.16" - spec: - shell: Sh - command: |- - docker run --rm \ - -e SONAR_HOST_URL="https://sonar.harness.io" \ - -e SONAR_TOKEN="<+secrets.getValue("sonarqube-token")>" \ - -v "$(pwd):/usr/src" \ - sonarsource/sonar-scanner-cli \ - -Dsonar.projectKey=python-client \ - -Dsonar.sources=splitio \ - -Dsonar.tests=tests \ - -Dsonar.python.coverage.reportPaths=coverage.xml \ - -Dsonar.pullrequest.key=<+codebase.prNumber> \ - -Dsonar.pullrequest.branch=<+codebase.branch> \ - -Dsonar.pullrequest.base=development \ - -Dsonar.branch.name=<+codebase.branch> - - step: - type: Run - name: Post Quality Gate - identifier: Post_Quality_Gate - when: - stageStatus: Success - condition: <+matrix.pythonVersion> == "3.7.16" - spec: - shell: Bash - command: |- - #!/bin/bash - set -e - - SONAR_TOKEN="<+secrets.getValue("sonarqube-token")>" - SONAR_URL="https://sonar.harness.io" - SONAR_PROJECT_KEY="python-client" - GITHUB_TOKEN="<+secrets.getValue("github-devops-token")>" - GITHUB_REPO="python-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: - pythonVersion: - - "3.7.16" From c03015a03405fbc30d34bd3137fec87859fb2676 Mon Sep 17 00:00:00 2001 From: Mauro Antonio Sanz Date: Tue, 28 Jul 2026 15:35:20 -0300 Subject: [PATCH 3/5] ci: run apt-get update before package installs to avoid stale index 404s AI-Session-Id: c742c077-a969-465d-9d1f-06b64f8eee99 AI-Tool: claude-code AI-Model: unknown --- .../orgs/PROD/projects/Harness_Split/pipelines/pythonclient.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.harness/orgs/PROD/projects/Harness_Split/pipelines/pythonclient.yaml b/.harness/orgs/PROD/projects/Harness_Split/pipelines/pythonclient.yaml index d6768823..a1d7cbbd 100644 --- a/.harness/orgs/PROD/projects/Harness_Split/pipelines/pythonclient.yaml +++ b/.harness/orgs/PROD/projects/Harness_Split/pipelines/pythonclient.yaml @@ -50,6 +50,7 @@ pipeline: spec: shell: Sh command: |- + apt-get update -qq apt-get install -y redis-server -qq redis-server --daemonize yes --port 6379 redis-cli ping From 6077e164429909e2230f45b9ce248513097da020 Mon Sep 17 00:00:00 2001 From: Mauro Antonio Sanz Date: Tue, 28 Jul 2026 15:51:23 -0300 Subject: [PATCH 4/5] ci: split SonarQube scan command for PR vs branch analysis Passing both sonar.pullrequest.* and sonar.branch.name in the same invocation is rejected by SonarQube. AI-Session-Id: c742c077-a969-465d-9d1f-06b64f8eee99 AI-Tool: claude-code AI-Model: unknown --- .../Harness_Split/pipelines/pythonclient.yaml | 38 ++++++++++++------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/.harness/orgs/PROD/projects/Harness_Split/pipelines/pythonclient.yaml b/.harness/orgs/PROD/projects/Harness_Split/pipelines/pythonclient.yaml index a1d7cbbd..c4773569 100644 --- a/.harness/orgs/PROD/projects/Harness_Split/pipelines/pythonclient.yaml +++ b/.harness/orgs/PROD/projects/Harness_Split/pipelines/pythonclient.yaml @@ -103,19 +103,31 @@ pipeline: spec: shell: Sh command: |- - docker run --rm \ - -e SONAR_HOST_URL="https://sonar.harness.io" \ - -e SONAR_TOKEN="<+secrets.getValue("sonarqube-token")>" \ - -v "$(pwd):/usr/src" \ - sonarsource/sonar-scanner-cli \ - -Dsonar.projectKey=python-client \ - -Dsonar.sources=splitio \ - -Dsonar.tests=tests \ - -Dsonar.python.coverage.reportPaths=coverage.xml \ - -Dsonar.pullrequest.key=<+codebase.prNumber> \ - -Dsonar.pullrequest.branch=<+codebase.branch> \ - -Dsonar.pullrequest.base=development \ - -Dsonar.branch.name=<+codebase.branch> + if [ "<+codebase.prNumber>" != "" ]; then + docker run --rm \ + -e SONAR_HOST_URL="https://sonar.harness.io" \ + -e SONAR_TOKEN="<+secrets.getValue("sonarqube-token")>" \ + -v "$(pwd):/usr/src" \ + sonarsource/sonar-scanner-cli \ + -Dsonar.projectKey=python-client \ + -Dsonar.sources=splitio \ + -Dsonar.tests=tests \ + -Dsonar.python.coverage.reportPaths=coverage.xml \ + -Dsonar.pullrequest.key=<+codebase.prNumber> \ + -Dsonar.pullrequest.branch=<+codebase.sourceBranch> \ + -Dsonar.pullrequest.base=<+codebase.targetBranch> + else + docker run --rm \ + -e SONAR_HOST_URL="https://sonar.harness.io" \ + -e SONAR_TOKEN="<+secrets.getValue("sonarqube-token")>" \ + -v "$(pwd):/usr/src" \ + sonarsource/sonar-scanner-cli \ + -Dsonar.projectKey=python-client \ + -Dsonar.sources=splitio \ + -Dsonar.tests=tests \ + -Dsonar.python.coverage.reportPaths=coverage.xml \ + -Dsonar.branch.name=<+codebase.branch> + fi - step: type: Run name: Post Quality Gate From 5dfaf12817cd880724564667161113226193f87b Mon Sep 17 00:00:00 2001 From: Mauro Antonio Sanz Date: Tue, 28 Jul 2026 16:14:43 -0300 Subject: [PATCH 5/5] ci: remove .github folder, superseded by Harness pipeline AI-Session-Id: c742c077-a969-465d-9d1f-06b64f8eee99 AI-Tool: claude-code AI-Model: unknown --- .github/CODEOWNERS | 1 - .github/pull_request_template.md | 7 ------- 2 files changed, 8 deletions(-) delete mode 100644 .github/CODEOWNERS delete mode 100644 .github/pull_request_template.md diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index 9e319810..00000000 --- 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 95efd4c7..00000000 --- a/.github/pull_request_template.md +++ /dev/null @@ -1,7 +0,0 @@ -# Python SDK - -## What did you accomplish? - -## How do we test the changes introduced in this PR? - -## Extra Notes