Build package from python tests.
Project description
DevOps Homework
Welcome to the Postscript DevOps take home task! This task should take you an hour or less to complete. You will be working with a simplified service with a minimal feature set.
Background
At Postscript, we run a link shortening microservice that converts long URLs into short URLs (like an in-house Bitly). To shorten links, we take the numeric identifier of the link and encode it using the Base62 encoding scheme.
This microservice is a simplified version of the encoding and decoding logic our link shortener uses. The service exposes two endpoints, encode
and decode
, as part of its API that another service could use to implement the link shortening logic.
Requirements
As the next step to get this microservice into production, you are working on implementing a CI/CD pipeline to test and "deploy" the service as a Docker container. Your goal is to accomplish the following with your pipeline:
- Test the application code on each commit and pull request using Github Actions
- Tests are written in
test_app.py
and run with Pytest
- Implement the
decode
function inapp.py
.
- There are tests in
test_app.py
that can help you validate your solution. - Feel free to add additional tests as well.
- Build a container image that runs the application as part of the CI pipeline.
- A
Dockerfile
is included to use as a starting point or inspiration. - The container should run without errors and work as reasonably expected.
- Publish the container image to a container registry.
- Any container registry (Github Packages, ECR, Dockerhub, etc.) is OK.
- If you cannot integrate with a live container registry due to cost, authentication, or other constraints, that's OK- comment out the uploading step of your pipeline and explain how it works instead.
You can change any of the code in the application, the tests, or the Dockerfile
at your discretion. You can use any tools or resources you'd like to help you accomplish this task.
At the end of the task, please summarize your experience in summary.md
. Outline the steps you took and how you solved problems as they came up.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for my-pipeline-package-1.1.17.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92eb4075094665fa9b8298fb730992d6e20fc349d1cc6eb0515eb2a0a44f0be0 |
|
MD5 | 27d98e2f75cbb42446d19c1eecdfa47d |
|
BLAKE2b-256 | 31b3011593a60b419ac4a8af867245ec1842ef65fd823dd99e9b770e2a497f56 |
Hashes for my_pipeline_package-1.1.17-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | deea53d06a3fbb3a7f75eb46e5d526fbae208b55e57fd4f10f94610a4a5a9527 |
|
MD5 | 9202da43c6f1ba82ac99fc263e997c1d |
|
BLAKE2b-256 | a1d1e968a8ebd35113014674714c0a44e8b052e3cba80b83f9299941913e155f |