1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-29 06:34:08 +00:00
catalog/task/upload-pypi/0.1
PuneetPunamiya c172b04cce Modifies python task according to the new reorg proposal
Changes include:
  - adds version label
  - adds a minimum pipeline versions supported by the task
  - adds display name for task
  - adds tags for task
  - modified description to add a summary

This patch moves the python files to the task directory and
renames the yaml file and the directory
  - The yaml filename and directory is changed to match the resource name
  - Modifies the path for install task command in readme file

Issue: #386

Signed-off-by: Puneet Punamiya <ppunamiy@redhat.com>
2020-07-10 22:06:57 +01:00
..
example Modifies python task according to the new reorg proposal 2020-07-10 22:06:57 +01:00
tests Modifies python task according to the new reorg proposal 2020-07-10 22:06:57 +01:00
README.md Modifies python task according to the new reorg proposal 2020-07-10 22:06:57 +01:00
upload-pypi.yaml Modifies python task according to the new reorg proposal 2020-07-10 22:06:57 +01:00

Publish-Python-Package

This Task publishes Python packages to PyPI index using Twine utility module. It provides build system independent uploads of source and binary distribution artifacts for both new and existing projects.

Install the Task

kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/v1beta1/task/upload-pypi/0.1/upload-pypi.yaml

Requirement

Secret is needed with Twine credentials(TWINE_USERNAME:TWINE_PASSWORD) to be provided for python module publishing to PyPI index.

  • username: The username to authenticate to the repository (package index).
  • password: The password to authenticate to the repository (package index).
apiVersion: v1
kind: Secret
metadata:
  name: pypi-secret
type: kubernetes.io/basic-auth
stringData:
  username: foo
  password: bar

Workspaces

  • source: A Workspace volume containing the source to build.

Usage

This TaskRun runs the Task to fetch a Git repo, and build and publishes a python module.

apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
  name: publish-package
spec:
  taskRef:
    name: upload-pypi
  workspaces:
  - name: source
    persistentVolumeClaim:
      claimName: my-source

In this example, the Git repo being used is expected to have a setup.py file at the root of the repository. setup.py is build script for setuptools