saurabhsy8 / python-flask-demo

Razorops CI/CD pipeline demo in Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Razorops CI/CD pipeline demo with Python

If you have forked this repo, then connect with Razorops to create your demo pipeline by following the below button

Connect

This is an example code to demonstrate how to create Python based pipeline on Razorops.

It's a simple API written in Flask framework in Python and includes a test suite.

Local Setup

  1. Use pip to install the dependencies -

     pip install -r requirements.txt
    
  2. To start the server in development mode run -

     python app.py
    

Execute tests

Run following commands to execute the test suite -

    python test.py

CI/CD pipeline

If you're new to Razorops, feel free to fork this repository and use it to create a project.

.razorops.yaml contains the pipeline code to build and execute the tests for this project. To know more about how to write and customize, refer to the documentation. Here is the link of the pipeline workflows page.

Recommended links

  • This example uses the Ubuntu based Linux-VM build envirement, which has a subset of python versions available. If you want to customize version, you can use Docker based build envioronment. For more details, please refer to "Choose Python version"
  • How to integrate Junit reports with Razorops.
  • How to cache dependencies to speed-up the workflow.

License

Copyright (c) 2021 Razorops LLC

Distributed under the MIT License. See the file LICENSE.md.

About

Razorops CI/CD pipeline demo in Python

License:MIT License


Languages

Language:Python 100.0%