Git Product home page Git Product logo

debalin / devops-ci-pipeline Goto Github PK

View Code? Open in Web Editor NEW
1.0 4.0 0.0 87.69 MB

Term project for DevOps (CSC 591) at NC State, Fall '16. It involves making a complete Continuous Integration pipeline including a build server, running unit tests, test coverage, container deployment, monitoring and flamegraphs. All of these were implemented in separate milestones (present as different branches).

Shell 1.52% JavaScript 3.88% HTML 0.72% CSS 93.88%
devops continuous-integration nodejs

devops-ci-pipeline's Introduction

DevOps Project Milestone M1

This repository holds the first milestone build for the DevOps (CSC 591) course at NC State, Fall '16. The specification for this milestone can be found here: https://github.com/CSC-DevOps/Course/blob/milestone1/Project/M1.md.

Build section

  • Capabilities:
    • The ability to trigger a build in response to a git commit via a git hook.
      • Server-side Github Webhook (click to see webhook) for the Complexity project calls build server by making a POST request at /postreceive, passing what branch has had a change pushed to it. Build server app.js catches this request (through the express module) and runs the build script applicable to that branch.
        • webhook
      • post-commit client-side hook can also be used to tell the build server to build a branch but this method will force a push on commit which is not a normal or expected function of build servers.
    • The ability to execute a build job via a script or build manager (e.g., shell, maven), which ensures a clean build each time.
      • Build scripts build-dev and build-release called by express server handles removing old libraries, switching branches, pulling new code, and building that code. The sample Complexity project is a Node.js application, so for now we have done a simple npm install to build all dependencies of the project.
    • The ability to determine failure or success of a build job, and as a result trigger an external event (run post-build task, send email, etc).
      • We have executed a child process where we run specific shell scripts to build specific branches. That script returns an error if something went wrong in the build. This is used in the Node.js buildserver to trigger an email script, which reads the email IDs from a file and sends a build status mail using the mailutils module.
    • The ability to have multiple jobs corresponding to multiple branches in a repository. Specifically, a commit to a branch, release, will trigger a release build job. A commit to a branch, dev, will trigger a dev build job.
      • The Github post-receive webhook sends the branch pushed to, based on the branch sent different build jobs are run from the build server app.js (as long as the branch is an acceptable branch to the build server).
    • The ability to track and display a history of past builds (a simple list works) via http.
      • We create one log file for each build, where we verbosely note down whatever happened in the build process. The build history can be seen here. This is basically a simple GET request to the root directory of the build server. We parse the log files present in the log directory on that request and present it as a list of logs, with date, branch and build status, using a Jade template. The log files are click-able. You can click on a log file link to view its contents.

Workflow diagram

Submission

  • Code
    • in buildserver folder
  • Team Member Unity IDs and Contributions
    • ddas4 (Debalin Das)
    • kkapoor (Kunal Kapoor)
    • pmukher (Pratik Mukherjee)
    • izdrosos (Ian Drosos)
  • README.md
    • this file
  • Screencast

devops-ci-pipeline's People

Contributors

debalin avatar pmukher avatar wddlz avatar

Stargazers

 avatar

Watchers

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