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> diff --git a/.harness/pipelines/example-python.yaml b/.harness/pipelines/example-python.yaml new file mode 100644 index 00000000..a188a2c0 --- /dev/null +++ b/.harness/pipelines/example-python.yaml @@ -0,0 +1,54 @@ +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 --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: + type: Run + name: Pytest + identifier: Pytest + spec: + shell: Sh + command: pytest --cov app + - step: + type: Run + name: Upload to Codecov + identifier: Codecov + spec: + shell: Sh + command: | + codecov-cli --verbose upload-process -t $CODECOV_TOKEN -f harness + envVariables: + CODECOV_TOKEN: <+secrets.getValue("CODECOV_TOKEN")> + platform: + os: Linux + arch: Amd64 + runtime: + type: Cloud + spec: {} + properties: + ci: + codebase: + connectorRef: account.Github_OAuth_1778001905690 + repoName: codecov/example-python + build: <+input>