A Concourse CI resource for Python PyPI packages.
Python
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
ci
pypi_resource Make sure functions don't send text to stdout Jun 13, 2018
test
.gitignore
Dockerfile
LICENSE
MANIFEST.in
NOTICE
README.md
requirements.txt
setup.py

README.md

PyPI Package Resource

A Concourse CI resource for Python PyPI packages.

Docker image publicly available on Docker Hub: https://hub.docker.com/r/cfplatformeng/concourse-pypi-resource/.

Source Configuration

  • name: Required The name of the package.
  • username: Required for out The username for PyPI server authentication.
  • password: Required for out The password for PyPI server authentication.
  • test: Optional, default false Set to true to use the PyPI test server.
  • repository_url: Optional Set to a another pypi server such as pypicloud.
  • repository: Optional Set to a special index-server if it is specified in ~/.pypirc.
  • python_version: Optional If multiple files have been uploaded for a package (e.g. source tarballs and wheels), download the file for the specified version instead of the file that was first uploaded.

Example

resource_types:
- name: pypi
  type: docker-image
  source:
    repository: cfplatformeng/concourse-pypi-resource

resources:
- name: my-pypi-package
  type: pypi
  source:
    name: my_package
    username: user
    password: pass
    test: false
    python_version: source

get: Download the latest version

No parameters.

Additional files populated

  • version: the latest version

Example

plan:
- get: my-pypi-package

put: Upload a new version

  • glob: Required A glob expression matching the package file to upload.

Example

plan:
- put: my-pypi-package
  params:
    glob: my_package-*.tar.gz

Development

To run the unit tests, go to the root of the repository and run:

PYTHONPATH=.:$PYTHONPATH python test/unittests.py

To build the docker image for the resource:

python setup.py sdist
docker build -t <username>/concourse-pypi-resource .