Giter VIP home page Giter VIP logo

dynamic-branch-builder's Introduction

Project CI/CD Pipeline

This repository uses Bitbucket Pipelines for Continuous Integration and Continuous Deployment (CI/CD). The pipeline builds and pushes Docker images and manages dynamic branches for development.

Table of Contents

Pipeline Overview

The CI/CD pipeline is designed to automate the build and deployment processes, ensuring that the application is consistently built, tested, and deployed across different environments. The pipeline has two main sections:

  1. Branches: Executes the pipeline when code is pushed to the master branch.
  2. Pull Requests: Executes the pipeline for any pull requests, managing dynamic branches for development.

Pipeline Configuration

Definitions

The definitions section defines reusable steps for the pipeline.

alt text

Pipelines

The pipelines section defines the triggers and steps for different events.

Branches

For the master branch, the pipeline builds and pushes a Docker image to the AWS ECR repository.

alt text

Pull Requests

For any pull request, the pipeline builds the project in development mode and transfers the built files to a remote server, creating a dynamic directory based on the branch name.

alt text

Environment Variables

Ensure the following environment variables are set in your Bitbucket repository settings:

  • AWS_KEY: AWS Access Key ID.
  • AWS_SECRET: AWS Secret Access Key.
  • AWS_DEFAULT_REGION: AWS Region (e.g., sa-east-1).
  • SSH_PRIVATE_KEY: Base64-encoded SSH private key for accessing the remote server.

Nginx Configuration

To serve the dynamically created branches, add the following configuration to your Nginx server block:

location /branch {
    root /var/www/projeto/;
    index index.html;
    try_files $uri $uri/ /index.html;
}

This configuration sets up Nginx to serve files from the /var/www/projeto/ directory for any requests to /branch, falling back to index.html for single-page application (SPA) routing.

Prerequisites

  • Bitbucket account with Pipelines enabled.
  • AWS account with ECR repository created.
  • Remote server with SSH access configured.
  • Nginx server properly set up to serve your application.

Conclusion

This CI/CD pipeline ensures that your application is built, tested, and deployed efficiently. Feel free to customize the pipeline configuration to fit your project’s specific requirements.

dynamic-branch-builder's People

Contributors

gustavoguarda avatar

Stargazers

 avatar

Watchers

Lucian avatar  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.