Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

Commit

Permalink
Merge 8dff55c into de06cd4
Browse files Browse the repository at this point in the history
  • Loading branch information
aermakov-zalando committed Mar 24, 2020
2 parents de06cd4 + 8dff55c commit 3963e85
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 41 deletions.
13 changes: 13 additions & 0 deletions Dockerfile
@@ -0,0 +1,13 @@
FROM registry.opensource.zalan.do/stups/python AS builder
ARG VERSION
RUN apt-get update && \
apt-get install -q -y python3-pip && \
pip3 install -U setuptools black
COPY . /build
WORKDIR /build
RUN sed -i "s/__version__ = .*/__version__ = \"${VERSION}\"/" */__init__.py
RUN python3 setup.py sdist bdist_wheel
RUN tar xf /build/dist/*.tar.gz -C /tmp && cat /tmp/stups-piu*/PKG-INFO | egrep '^Version: ' | sed 's/Version: //' > /build/dist/.version

FROM pierone.stups.zalan.do/teapot/python-cdp-release:latest
COPY --from=builder /build/dist /pydist
6 changes: 0 additions & 6 deletions README.rst
Expand Up @@ -49,9 +49,3 @@ Running Unit Tests
$ python3 setup.py test --cov-html=true
Releasing
=========

.. code-block:: bash
$ ./release.sh <NEW-VERSION>
51 changes: 51 additions & 0 deletions delivery.yaml
@@ -0,0 +1,51 @@
version: "2017-09-20"
pipeline:
- id: build
type: script
overlay: ci/python
commands:
- desc: Check formatting
cmd: |
pip3 install black rstvalidator
python3 -m rstvalidator README.rst
black --check .
- desc: Test
cmd: python3 setup.py test
- desc: Build the package
cmd: |
if [[ -z "${CDP_PULL_REQUEST_NUMBER}" ]]; then
VERSION="1.2.${CDP_TARGET_BRANCH_COUNTER}"
else
VERSION="0.0.1-dev"
fi
DOCKER_IMAGE="pierone.stups.zalan.do/teapot/stups-piu-release:${CDP_TARGET_REPOSITORY_COUNTER}"
docker build --build-arg VERSION="${VERSION}" -t "$DOCKER_IMAGE" .
VERSION="$(docker run --entrypoint cat --rm "$DOCKER_IMAGE" /pydist/.version)"
if [[ "${CDP_TARGET_BRANCH}" = "master" && -z "${CDP_PULL_REQUEST_NUMBER}" ]]; then
docker push "$DOCKER_IMAGE"
git gh-tag "$VERSION"
fi
- id: release
type: process
desc: Release to TestPyPI
target: stups
process: microservice_standard_deployment
config:
apply_permanent_resources:
image: pierone.stups.zalan.do/teapot/stups-piu-release:#{CDP_TARGET_REPOSITORY_COUNTER}
env:
- name: USERNAME
valueFrom:
secretKeyRef:
name: teapot-pypi-credentials
key: username
- name: PASSWORD
valueFrom:
secretKeyRef:
name: teapot-pypi-credentials
key: password

35 changes: 0 additions & 35 deletions release.sh

This file was deleted.

0 comments on commit 3963e85

Please sign in to comment.