setting up a basic CI/CD pipeline for a web application. The application consists of a simple static website and a basic RESTful API.
-
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.
-
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
- Stages implemented:
- Choose a CI/CD tool (e.g., GitHub Actions, Jenkins).
-
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
- Implement a simple automated test for the API (e.g., a basic endpoint response check).
-
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
- Deploy the static website to a simple web server.