Skip to main content

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:

  1. Test the application code on each commit and pull request using Github Actions
  • Tests are written in test_app.py and run with Pytest
  1. Implement the decode function in app.py.
  • There are tests in test_app.py that can help you validate your solution.
  • Feel free to add additional tests as well.
  1. 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.
  1. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

my-pipeline-package-1.1.17.tar.gz (2.1 kB view hashes)

Uploaded Source

Built Distribution

my_pipeline_package-1.1.17-py3-none-any.whl (2.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page