GithubHelp home page GithubHelp logo

julesdj / ci-cd-intro Goto Github PK

View Code? Open in Web Editor NEW

This project forked from link-/ci-cd-intro

0.0 0.0 0.0 2.51 MB

Intro to CI/CD ๐Ÿ’ป โ˜๏ธ

Home Page: https://glich.stream

License: MIT License

Shell 37.26% JavaScript 32.69% CSS 0.90% HCL 26.63% Pug 2.36% Procfile 0.16%

ci-cd-intro's Introduction

Intro to CI/CD ๐Ÿ’ป โ˜๏ธ

TLDR; This repository is a sample project demonstrating a basic continuous integration (CI) / continuous deployment (CD) setup. This project is in READ ONLY mode.

Continuous Deployment Workflow Continuous Integration Workflow Code scanning

Course attachement

This repository is best consumed while or after following the course attachment ๐Ÿ‘‡

Project structure

# You can generate this tree with:
# $ tree -a -I '.git|assets|.github|venv|node_modules|images|.DS_Store|*.tfvars|.terraform'
.
โ”œโ”€โ”€ .gitignore
โ”œโ”€โ”€ CODEOWNERS
โ”œโ”€โ”€ LICENSE
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ infra
โ”‚ย ย  โ”œโ”€โ”€ README.md
โ”‚ย ย  โ””โ”€โ”€ instances
โ”‚ย ย      โ”œโ”€โ”€ production
โ”‚ย ย      โ”‚ย ย  โ”œโ”€โ”€ .terraform.lock.hcl
โ”‚ย ย      โ”‚ย ย  โ”œโ”€โ”€ main.tf
โ”‚ย ย      โ”‚ย ย  โ””โ”€โ”€ terraform.auto.tfvars.example
โ”‚ย ย      โ””โ”€โ”€ staging
โ”‚ย ย          โ”œโ”€โ”€ .terraform.lock.hcl
โ”‚ย ย          โ”œโ”€โ”€ create_staging_resource.sh
โ”‚ย ย          โ”œโ”€โ”€ extra_staging.tf.example
โ”‚ย ย          โ”œโ”€โ”€ main.tf
โ”‚ย ย          โ””โ”€โ”€ terraform.tfvars.auto.example
โ””โ”€โ”€ web
    โ”œโ”€โ”€ README.md
    โ”œโ”€โ”€ app.js
    โ”œโ”€โ”€ bin
    โ”‚ย ย  โ””โ”€โ”€ www
    โ”œโ”€โ”€ package-lock.json
    โ”œโ”€โ”€ package.json
    โ”œโ”€โ”€ public
    โ”‚ย ย  โ”œโ”€โ”€ javascripts
    โ”‚ย ย  โ””โ”€โ”€ stylesheets
    โ”‚ย ย      โ””โ”€โ”€ style.css
    โ”œโ”€โ”€ routes
    โ”‚ย ย  โ”œโ”€โ”€ index.js
    โ”‚ย ย  โ””โ”€โ”€ users.js
    โ”œโ”€โ”€ tests
    โ”‚ย ย  โ”œโ”€โ”€ app.test.js
    โ”‚ย ย  โ””โ”€โ”€ routes.test.js
    โ””โ”€โ”€ views
        โ”œโ”€โ”€ error.jade
        โ”œโ”€โ”€ index.jade
        โ””โ”€โ”€ layout.jade

12 directories, 26 files
  • infra/images: contains Packer template to build our AWS EC2 AMI
  • infra/instances: contains our Terraform templates to setup our staging and production EC2 instances
  • web: contains our simple Express web application

Setup

Configure your GitHub repository to run the workflows

Click to expand
  1. Navigate to the Settings in your repository then to Environments 37EE1AFF-BDBC-405E-8D43-672E09CA87D5

  2. Add a new environment and call it staging (or anything else you like) F1BC0A94-3BB5-4409-B057-6E6FC241C78A

  3. Enable required reviewers and add your secrets 085BF9C1-552E-46C5-91D0-687A9634A885

  4. Enable branch protection on the main branch 2E8B02F5-CD8E-40C1-B03C-5FD7074C1C77 955A1F29-D628-46C4-86A4-8F614A712CFF

Test your setup

  1. Create a new branch from the main branch and make some changes to the app
  2. Push the new branch to GitHub
  3. Watch the CI workflow being triggered
  4. Troubleshoot issues as they rise

LICENSE

Copyright (c) 2021 Bassem Dghaidi (@Link-)

ci-cd-intro's People

Contributors

link- avatar link-ghost avatar dependabot[bot] 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.