Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create inputset python-sdk-publish #328

Merged
merged 8 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 24 additions & 3 deletions .harness/publish_python_sdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pipeline:
namespace: harness
automountServiceAccountToken: true
nodeSelector:
node_group: <+input>
node_group: cpu
harnessImageConnectorRef: account.dockerhubproxy
os: Linux
execution:
Expand Down Expand Up @@ -259,7 +259,12 @@ pipeline:
connectorRef: account.harbor
image: harbor.devops.indico.io/indico/<+pipeline.variables.service>:<+pipeline.stages.build_info.spec.execution.steps.build_info.output.outputVariables.TEST_IMAGE_TAG>
shell: Sh
command: echo "prerelease"
command: |-
#!/bin/bash
rm -rf /indico-client/dist
pip install twine==3.3.0
python setup.py sdist
twine upload -u __token__ -p <+stage.variables.pypi_token> /indico-client/dist/*
when:
stageStatus: Success
condition: <+<+execution.steps.Info.output.outputVariables.RUN_PRELEASE> == "true">
Expand All @@ -281,6 +286,12 @@ pipeline:
when:
pipelineStatus: Success
condition: <+stage.variables.RUN_PUBLISH> == "TRUE"
variables:
- name: pypi_token
type: Secret
description: ""
required: false
value: pypi_publish_token
variables:
- name: repo
type: String
Expand All @@ -297,8 +308,18 @@ pipeline:
description: ""
required: true
value: <+input>.default(TRUE).allowedValues(TRUE,FALSE)
- name: RUN_PRERELEASE
type: String
description: Publish alpha/prerelease to pypi
value: <+input>.default(FALSE).allowedValues(TRUE,FALSE)
- name: RUN_RELEASE
type: String
description: ""
required: false
value: <+input>.default(FALSE).allowedValues(TRUE,FALSE)
- name: RUN_PUBLISH
type: String
description: Publish to pypi
description: Run the publish step for release or pre-release
required: false
value: <+input>.default(FALSE).allowedValues(TRUE,FALSE)
tags: {}
87 changes: 87 additions & 0 deletions .harness/pythonsdkpublish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
inputSet:
name: python-sdk-prerelease
tags: {}
identifier: pythonsdkpublish
orgIdentifier: default
projectIdentifier: IPA_Release
pipeline:
identifier: publish_python_sdk
properties:
ci:
codebase:
build:
type: tag
spec:
tag: <+trigger.tag>
stages:
- parallel:
- stage:
identifier: code_checks
template:
templateInputs:
type: CI
variables:
- name: RUN_LINTER
type: String
value: "TRUE"
- name: isort
type: String
value: <+input>
- name: black
type: String
value: <+input>
- name: ruff
type: String
value: <+input>
- name: mypy
type: String
value: <+input>
- name: pylint
type: String
value: <+input>
- stage:
identifier: build_containers
type: CI
variables:
- name: test_poetry_args
type: String
value: <+input>
- name: deploy_poetry_args
type: String
value: <+input>
- name: test_ram
type: String
value: 2G
- name: deploy_ram
type: String
value: 2G
- parallel:
- stage:
identifier: snyk_tests
type: CI
variables:
- name: RUN_SNYK
type: String
value: "FALSE"
- name: container_ram
type: String
value: 2G
variables:
- name: repo
type: String
value: indico-client-python
- name: service
type: String
value: indico-client-python
- name: RUN_UNITTESTS
type: String
value: "TRUE"
- name: RUN_PRERELEASE
type: String
value: "TRUE"
- name: RUN_RELEASE
type: String
value: "FALSE"
- name: RUN_PUBLISH
type: String
value: "TRUE"
83 changes: 83 additions & 0 deletions .harness/pythonsdkrelease.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
inputSet:
name: python-sdk-release
identifier: pythonsdkrelease
orgIdentifier: default
projectIdentifier: IPA_Release
pipeline:
identifier: publish_python_sdk
properties:
ci:
codebase:
build:
type: tag
spec:
tag: <+trigger.tag>
stages:
- parallel:
- stage:
identifier: code_checks
template:
templateInputs:
type: CI
variables:
- name: RUN_LINTER
type: String
value: "TRUE"
- name: isort
type: String
value: <+input>
- name: black
type: String
value: <+input>
- name: ruff
type: String
value: <+input>
- name: mypy
type: String
value: <+input>
- name: pylint
type: String
value: <+input>
- stage:
identifier: build_containers
type: CI
variables:
- name: test_poetry_args
type: String
value: <+input>
- name: deploy_poetry_args
type: String
value: <+input>
- name: test_ram
type: String
value: 2G
- name: deploy_ram
type: String
value: 2G
- parallel:
- stage:
identifier: snyk_tests
type: CI
variables:
- name: RUN_SNYK
type: String
value: "FALSE"
- name: container_ram
type: String
value: 2G
variables:
- name: repo
type: String
value: indico-client-python
- name: service
type: String
value: indico-client-python
- name: RUN_UNITTESTS
type: String
value: "TRUE"
- name: RUN_PRERELEASE
type: String
value: "FALSE"
- name: RUN_RELEASE
type: String
value: "TRUE"