GithubHelp home page GithubHelp logo

voting-app's Introduction

Writing tests

To make sure my app is ready for a production workload I have to test at least:

  1. My code is in compliance with conventions (public or company conventions)
  2. My code doesn't have an identified security breach (I don't want to expose my customer data)
  3. I'm able to execute my code in a controlled environment
  4. I'm able to make a request to get vote (I must have a 200 code as return on my GET request), since i'm in a controlled environment I must have 0 for each categories
  5. I'm able to make a request to publish vote (I must have a 200 code as return on my POST request), since i'm in a controlled environment I must have 1 for the one i've voted and 0 to the other

Workflows

Open Pull Request

This workflow works when you're working on differents branches, and you want to merge your branch with main

  1. Pull Request is Opened
  2. I'm checking if the code respect the Python convention using Flake8 (Because I'm respecting python writing conventions)
  3. I'm checking if there is any CVEs opened, to make sure my code is secure. The last thing I want is to send security breach on my production environment
  4. I'm making sure in a controlled environment (Here using docker-compose), my system is working as expected and i'm able to interact it
  5. If and only if, all these requirements are meet, I'm able to merge into main my code

Flow

Merge Pull Request

This workflow will be triggered when a reviewer or my self gonna click on the merge button

  1. Semantic release bot is triggered, it analyze commit messages to calculate the version number, when done, it publish a version on github https://www.conventionalcommits.org/en/v1.0.0/
  2. I'm logging in my Docker Registry to being able to push my Docker image
  3. I'm preparing the environment to being able to build my Dockerfile
  4. I'm building my Dockerfile and name it using this format <Docker Registry>/<Repository Name>:<Semantic Release version> (eg. joffreydupire/simplon-vote-app:v1.0.0) then i'm pushing it to the registry.
  5. Finally using helm upgrade command I'm deploying my Azure-Vote-App workload into my K8s cluster

NOTES: From there, I could decide to deploy a canary or used a Blue/Green line

Flow

voting-app's People

Contributors

nomaddevops avatar

Stargazers

Adrien avatar

Watchers

 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.