vacaramin / basic-ci-cd

basic CI/CD pipeline for a web application. The application consists of a simple static website and a basic RESTful API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Basic CI-CD Test

setting up a basic CI/CD pipeline for a web application. The application consists of a simple static website and a basic RESTful API.

Workflows Status

Frontend Container Deploy Dev Frontend Container Deploy Dev Deploy backend Azure Deploy to Firebase Hosting on merge Deploy to Firebase Hosting DEV Frontend Deploy backend Azure

Tasks

  1. Version Control (Git):

    • Create a Git repository for any test web application.
    • Commit the initial codebase including the static website and any sample test API.
  2. CI/CD Pipeline

    • Choose a CI/CD tool (e.g., GitHub Actions, Jenkins).
      • Github Actions
    • Set up a basic pipeline that triggers on each commit to the develop branch.
      • Implemented for both develop and main branch
    • Include stages for building and deploying both the static website and API.
      • Stages implemented:
        • Testing(for backend only)
        • Build and push image to Dockerhub
        • Deploy Containers to Azure
  3. Automated Testing:

    • Implement a simple automated test for the API (e.g., a basic endpoint response check).
      • Tests written in Go
    • Ensure that the CI/CD pipeline fails if the test fails.
      • Tested to fail if the test cases fail
  4. Deployment:

    • Deploy the static website to a simple web server.
      • Firebase deployment done
      • Nginx server container deployment to azure
    • Deploy the API to a server, ensuring that it can handle basic HTTP requests.
      • Containerized API Server deployed to azure

Project Structure

Architecture diagram - Draw.io

Deployments

About

basic CI/CD pipeline for a web application. The application consists of a simple static website and a basic RESTful API


Languages

Language:Go 55.6%Language:HTML 22.2%Language:JavaScript 10.7%Language:CSS 6.4%Language:Dockerfile 5.2%