From 2e7f2f58702305d6159cca4cdf70f06a73097bb9 Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Wed, 6 May 2026 02:50:29 +0900 Subject: [PATCH 01/14] Create pipeline example-python --- .harness/pipelines/example-python.yaml | 41 ++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .harness/pipelines/example-python.yaml diff --git a/.harness/pipelines/example-python.yaml b/.harness/pipelines/example-python.yaml new file mode 100644 index 00000000..75c70223 --- /dev/null +++ b/.harness/pipelines/example-python.yaml @@ -0,0 +1,41 @@ +pipeline: + name: example-python + identifier: examplepython + projectIdentifier: default_project + orgIdentifier: default + tags: {} + stages: + - stage: + name: Build + identifier: Build + type: CI + spec: + cloneCodebase: true + execution: + steps: + - step: + type: Run + name: Install deps + identifier: Install_Deps + spec: + shell: Sh + command: pip install -r requirements.txt + - step: + type: Run + name: Pytest + identifier: Pytest + spec: + shell: Sh + command: pytest --cov app + platform: + os: Linux + arch: Amd64 + runtime: + type: Cloud + spec: {} + properties: + ci: + codebase: + connectorRef: account.Github_OAuth_1778001905690 + repoName: codecov/example-python + build: <+input> From 8401eb98e3860beda0bcc63cb8d018e42d4edea3 Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Wed, 6 May 2026 03:01:48 +0900 Subject: [PATCH 02/14] Update pipeline example-python --- .harness/pipelines/example-python.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.harness/pipelines/example-python.yaml b/.harness/pipelines/example-python.yaml index 75c70223..620301de 100644 --- a/.harness/pipelines/example-python.yaml +++ b/.harness/pipelines/example-python.yaml @@ -27,6 +27,19 @@ pipeline: spec: shell: Sh command: pytest --cov app + - step: + type: Run + name: Upload to Codecov + identifier: Codecov + spec: + shell: Sh + command: | + curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import # One-time step curl -Os https://cli.codecov.io/latest/linux/codecov curl -Os https://cli.codecov.io/latest/linux/codecov.SHA256SUM curl -Os https://cli.codecov.io/latest/linux/codecov.SHA256SUM.sig + gpgv codecov.SHA256SUM.sig codecov.SHA256SUM + shasum -a 256 -c codecov.SHA256SUM + ./codecov --verbose upload-process -t $CODECOV_TOKEN + envVariables: + CODECOV_TOKEN: <+secrets.getValue("CODECOV_TOKEN")> platform: os: Linux arch: Amd64 From a55ee550e1d13278eb5dac8ba8f31d4e6be55889 Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Wed, 6 May 2026 03:11:29 +0900 Subject: [PATCH 03/14] Create inputset inputset --- .../examplepython/input_sets/inputset.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .harness/orgs/default/projects/default_project/pipelines/examplepython/input_sets/inputset.yaml diff --git a/.harness/orgs/default/projects/default_project/pipelines/examplepython/input_sets/inputset.yaml b/.harness/orgs/default/projects/default_project/pipelines/examplepython/input_sets/inputset.yaml new file mode 100644 index 00000000..18042271 --- /dev/null +++ b/.harness/orgs/default/projects/default_project/pipelines/examplepython/input_sets/inputset.yaml @@ -0,0 +1,14 @@ +inputSet: + name: inputset + identifier: inputset + orgIdentifier: default + projectIdentifier: default_project + pipeline: + identifier: examplepython + properties: + ci: + codebase: + build: + type: PR + spec: + number: <+trigger.prNumber> From b971b11cfd8b598e37a346102d7527c5dfc52dd1 Mon Sep 17 00:00:00 2001 From: Tom Hu <88201630+thomasrockhu-codecov@users.noreply.github.com> Date: Thu, 7 May 2026 03:04:34 +0900 Subject: [PATCH 04/14] Apply suggestions from code review Co-authored-by: Tom Hu <88201630+thomasrockhu-codecov@users.noreply.github.com> --- .harness/pipelines/example-python.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.harness/pipelines/example-python.yaml b/.harness/pipelines/example-python.yaml index 620301de..dfaa0d15 100644 --- a/.harness/pipelines/example-python.yaml +++ b/.harness/pipelines/example-python.yaml @@ -34,7 +34,10 @@ pipeline: spec: shell: Sh command: | - curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import # One-time step curl -Os https://cli.codecov.io/latest/linux/codecov curl -Os https://cli.codecov.io/latest/linux/codecov.SHA256SUM curl -Os https://cli.codecov.io/latest/linux/codecov.SHA256SUM.sig + curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import # One-time step + curl -Os https://cli.codecov.io/latest/linux/codecov + curl -Os https://cli.codecov.io/latest/linux/codecov.SHA256SUM + curl -Os https://cli.codecov.io/latest/linux/codecov.SHA256SUM.sig gpgv codecov.SHA256SUM.sig codecov.SHA256SUM shasum -a 256 -c codecov.SHA256SUM ./codecov --verbose upload-process -t $CODECOV_TOKEN From c65413c13fd6f64036c036aa05ba489ebdab7c4d Mon Sep 17 00:00:00 2001 From: Tom Hu <88201630+thomasrockhu-codecov@users.noreply.github.com> Date: Thu, 7 May 2026 03:09:25 +0900 Subject: [PATCH 05/14] Apply suggestions from code review Co-authored-by: Tom Hu <88201630+thomasrockhu-codecov@users.noreply.github.com> --- .harness/pipelines/example-python.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.harness/pipelines/example-python.yaml b/.harness/pipelines/example-python.yaml index dfaa0d15..cfdc7b5b 100644 --- a/.harness/pipelines/example-python.yaml +++ b/.harness/pipelines/example-python.yaml @@ -40,6 +40,7 @@ pipeline: curl -Os https://cli.codecov.io/latest/linux/codecov.SHA256SUM.sig gpgv codecov.SHA256SUM.sig codecov.SHA256SUM shasum -a 256 -c codecov.SHA256SUM + chmod u+x ./codecov ./codecov --verbose upload-process -t $CODECOV_TOKEN envVariables: CODECOV_TOKEN: <+secrets.getValue("CODECOV_TOKEN")> From dcd8e6e49d7e14148f0ef255d3f96947b1dad3c6 Mon Sep 17 00:00:00 2001 From: Tom Hu <88201630+thomasrockhu-codecov@users.noreply.github.com> Date: Thu, 7 May 2026 03:31:27 +0900 Subject: [PATCH 06/14] Apply suggestions from code review Co-authored-by: Tom Hu <88201630+thomasrockhu-codecov@users.noreply.github.com> --- .harness/pipelines/example-python.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.harness/pipelines/example-python.yaml b/.harness/pipelines/example-python.yaml index cfdc7b5b..7c36970d 100644 --- a/.harness/pipelines/example-python.yaml +++ b/.harness/pipelines/example-python.yaml @@ -41,7 +41,7 @@ pipeline: gpgv codecov.SHA256SUM.sig codecov.SHA256SUM shasum -a 256 -c codecov.SHA256SUM chmod u+x ./codecov - ./codecov --verbose upload-process -t $CODECOV_TOKEN + ./codecov --verbose upload-process -t $CODECOV_TOKEN -f harness envVariables: CODECOV_TOKEN: <+secrets.getValue("CODECOV_TOKEN")> platform: From ae0460604f735752f26b3b84ec6a756a3b3db800 Mon Sep 17 00:00:00 2001 From: Tom Hu <88201630+thomasrockhu-codecov@users.noreply.github.com> Date: Thu, 7 May 2026 03:40:43 +0900 Subject: [PATCH 07/14] Update .harness/pipelines/example-python.yaml --- .harness/pipelines/example-python.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.harness/pipelines/example-python.yaml b/.harness/pipelines/example-python.yaml index 7c36970d..50c0675f 100644 --- a/.harness/pipelines/example-python.yaml +++ b/.harness/pipelines/example-python.yaml @@ -19,7 +19,9 @@ pipeline: identifier: Install_Deps spec: shell: Sh - command: pip install -r requirements.txt + command: | + pip install -r requirements.txt + pip install -v git+https://github.com/codecov/codecov-cli.git@cy/harness_ci#subdirectory=codecov-cli - step: type: Run name: Pytest From f168889c472a58c016f8a7eea1c08cfa00fa287c Mon Sep 17 00:00:00 2001 From: Tom Hu <88201630+thomasrockhu-codecov@users.noreply.github.com> Date: Thu, 7 May 2026 03:40:58 +0900 Subject: [PATCH 08/14] Update .harness/pipelines/example-python.yaml --- .harness/pipelines/example-python.yaml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.harness/pipelines/example-python.yaml b/.harness/pipelines/example-python.yaml index 50c0675f..1a0c869f 100644 --- a/.harness/pipelines/example-python.yaml +++ b/.harness/pipelines/example-python.yaml @@ -36,14 +36,7 @@ pipeline: spec: shell: Sh command: | - curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import # One-time step - curl -Os https://cli.codecov.io/latest/linux/codecov - curl -Os https://cli.codecov.io/latest/linux/codecov.SHA256SUM - curl -Os https://cli.codecov.io/latest/linux/codecov.SHA256SUM.sig - gpgv codecov.SHA256SUM.sig codecov.SHA256SUM - shasum -a 256 -c codecov.SHA256SUM - chmod u+x ./codecov - ./codecov --verbose upload-process -t $CODECOV_TOKEN -f harness + codecov-cli --verbose upload-process -t $CODECOV_TOKEN -f harness envVariables: CODECOV_TOKEN: <+secrets.getValue("CODECOV_TOKEN")> platform: From 3164cd5dffe012694125b041cbe24c00e77fb295 Mon Sep 17 00:00:00 2001 From: Tom Hu <88201630+thomasrockhu-codecov@users.noreply.github.com> Date: Thu, 7 May 2026 03:47:06 +0900 Subject: [PATCH 09/14] Update .harness/pipelines/example-python.yaml --- .harness/pipelines/example-python.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.harness/pipelines/example-python.yaml b/.harness/pipelines/example-python.yaml index 1a0c869f..f6c5061e 100644 --- a/.harness/pipelines/example-python.yaml +++ b/.harness/pipelines/example-python.yaml @@ -21,7 +21,10 @@ pipeline: shell: Sh command: | pip install -r requirements.txt - pip install -v git+https://github.com/codecov/codecov-cli.git@cy/harness_ci#subdirectory=codecov-cli + git clone https://github.com/codecov/codecov-cli.git + git checkout cy/harness_ci + cd codecov-cli/codecov-cli + pip install . - step: type: Run name: Pytest From 8fec5d488909a88d5bf9f89e349a0fc8952f681a Mon Sep 17 00:00:00 2001 From: Tom Hu <88201630+thomasrockhu-codecov@users.noreply.github.com> Date: Thu, 7 May 2026 03:51:57 +0900 Subject: [PATCH 10/14] Apply suggestions from code review Co-authored-by: Tom Hu <88201630+thomasrockhu-codecov@users.noreply.github.com> --- .harness/pipelines/example-python.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.harness/pipelines/example-python.yaml b/.harness/pipelines/example-python.yaml index f6c5061e..07f609ca 100644 --- a/.harness/pipelines/example-python.yaml +++ b/.harness/pipelines/example-python.yaml @@ -22,8 +22,9 @@ pipeline: command: | pip install -r requirements.txt git clone https://github.com/codecov/codecov-cli.git + cd codecov-cli git checkout cy/harness_ci - cd codecov-cli/codecov-cli + cd codecov-cli pip install . - step: type: Run From 28caec5eee30b4814a765527120856279c353958 Mon Sep 17 00:00:00 2001 From: Tom Hu <88201630+thomasrockhu-codecov@users.noreply.github.com> Date: Thu, 7 May 2026 03:54:26 +0900 Subject: [PATCH 11/14] Apply suggestion from @thomasrockhu-codecov --- .harness/pipelines/example-python.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.harness/pipelines/example-python.yaml b/.harness/pipelines/example-python.yaml index 07f609ca..567ad4e0 100644 --- a/.harness/pipelines/example-python.yaml +++ b/.harness/pipelines/example-python.yaml @@ -26,6 +26,7 @@ pipeline: git checkout cy/harness_ci cd codecov-cli pip install . + cd ../.. - step: type: Run name: Pytest From 314ea9cdea4f81278d5af66bb831123e186d7b20 Mon Sep 17 00:00:00 2001 From: Tom Hu <88201630+thomasrockhu-codecov@users.noreply.github.com> Date: Thu, 7 May 2026 03:59:32 +0900 Subject: [PATCH 12/14] Apply suggestion from @thomasrockhu-codecov --- .harness/pipelines/example-python.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.harness/pipelines/example-python.yaml b/.harness/pipelines/example-python.yaml index 567ad4e0..f7394b71 100644 --- a/.harness/pipelines/example-python.yaml +++ b/.harness/pipelines/example-python.yaml @@ -27,6 +27,7 @@ pipeline: cd codecov-cli pip install . cd ../.. + rm -rf codecov-cli - step: type: Run name: Pytest From 28c7d9e62ff1af88d03291a4e078c46b37977775 Mon Sep 17 00:00:00 2001 From: Tom Hu <88201630+thomasrockhu-codecov@users.noreply.github.com> Date: Thu, 7 May 2026 04:21:53 +0900 Subject: [PATCH 13/14] Apply suggestion from @thomasrockhu-codecov --- .harness/pipelines/example-python.yaml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.harness/pipelines/example-python.yaml b/.harness/pipelines/example-python.yaml index f7394b71..a3d0b8a3 100644 --- a/.harness/pipelines/example-python.yaml +++ b/.harness/pipelines/example-python.yaml @@ -21,13 +21,7 @@ pipeline: shell: Sh command: | pip install -r requirements.txt - git clone https://github.com/codecov/codecov-cli.git - cd codecov-cli - git checkout cy/harness_ci - cd codecov-cli - pip install . - cd ../.. - rm -rf codecov-cli + pip install "git+https://github.com/codecov/codecov-cli@cy/harness_ci#subdirectory=codecov-cli" - step: type: Run name: Pytest From 78baebe7c786defa1f4ffe5597a02297556f2860 Mon Sep 17 00:00:00 2001 From: Tom Hu <88201630+thomasrockhu-codecov@users.noreply.github.com> Date: Thu, 7 May 2026 04:31:04 +0900 Subject: [PATCH 14/14] Apply suggestion from @thomasrockhu-codecov --- .harness/pipelines/example-python.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.harness/pipelines/example-python.yaml b/.harness/pipelines/example-python.yaml index a3d0b8a3..a188a2c0 100644 --- a/.harness/pipelines/example-python.yaml +++ b/.harness/pipelines/example-python.yaml @@ -20,6 +20,7 @@ pipeline: spec: shell: Sh command: | + pip install --upgrade pip setuptools wheel pip install -r requirements.txt pip install "git+https://github.com/codecov/codecov-cli@cy/harness_ci#subdirectory=codecov-cli" - step: