Git Product home page Git Product logo

azure-pipelines-python's Introduction

page_type languages products description urlFragment
sample
python
azure
This repo contains tested reference examples of using Python with Azure Pipelines.
azure-pipelines-python

azure-pipelines-python

This repo contains tested reference examples of using Python with Azure Pipelines.

Pipelines

This sample contains several Azure Pipelines for Python developers that showcase useful end-to-end patterns of varying complexity. All pipelines are in the .azure-pipelines folder and have been fully annotated and validated.

Pipeline results and sample Artifacts for the definitions contained in this repo can be viewed at the following Azure DevOps organization: az-samples

simple_package

simple_package is a pure Python package with no external dependencies. It exists to give just-enough structure to show how to use Azure Pipelines with Python.

0-basic-build

Build Status

Build a simple package against a single Python version

Concepts:

  • Building for a project contained in a repo subfolder (separate src/tests folders)
  • Choosing a Python version
  • Installing build dependencies
  • Linting (pylint and flake8)
  • Running tests (pytest)
  • Building a source archive and built distribution
  • Capturing build artifacts

1-multi-target

Build Status

Build a simple package against multiple Python versions

Concepts:

  • Building for multiple Python versions
  • Capturing multiple artifacts per build

2-artifacts

Build Status

Build a simple package against multiple Python versions, then upload it to Azure Artifacts (private PyPI)

Concepts:

  • Setting job dependency order
  • Conditionally running pipeline jobs
  • Disabling code checkout to control the pipeline environment
  • Downloading previously uploaded build artifacts
  • Authenticating to Azure Artifacts
  • Publishing to a private Artifacts feed

simple_server

simple_server is a minimal Flask application that takes a dependency on simple_package from the Azure Artifacts feed. It can be run as a standalone Python application, or can be built as a Docker container image.

0-consume-artifacts

Build Status

Build a Python application that has a dependency on a package sourced from Azure Artifacts

Concepts:

  • Authenticating to Azure Artifacts for pip
  • Installing private dependencies
  • Distinguish between Python versions in pytest output

1-docker

Build Status

Build a Docker image using an application that pulls dependencies from Azure Artifacts

Concepts:

  • Customizing the build artifact download path
  • Building a containerized Python app with Azure Artifacts
  • Using multi-stage builds with pip

Development

This project has been configured for Python development with VS Code using the following extensions:

To get started, clone the repo, and run the following commands to get started with a new environment

# Clone the repo
git clone https://github.com/Azure-Samples/azure-pipelines-python.git
cd azure-pipelines-python

# Create a virtual environment at .venv
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.dev.txt -U --upgrade-strategy eager

# Install packages in editable mode
python -m pip install -e src/simple_package
python -m pip install -e src/simple_server

# Start coding! :)
code .

Resources

azure-pipelines-python's People

Contributors

microsoftopensource avatar msftgits avatar noelbundick avatar v-rajagt-zz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.