Skip to content

shashikanth-t/test-mbpipeline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

#This is a Master Branch Copy

Build and Deploy nodejs application on EC2 instance - Freestyle

Pre-requisites

  1. A Jenkins server
  2. A EC2 instance (Application server) and deploy node.js

Setup nodejs packages on jenkins (needed for build) and application server (needed to deploy)

  1. Enable nodejs packages on Linux server

    curl -sL https://rpm.nodesource.com/setup_15.x | bash -
  2. install development tools.

    yum groupinstall 'Development Tools'
  3. Install nodejs

    yum -y install nodejs

Setup Jenkins job

Fork nodejs applicaton onto your repository

Github URL: https://github.com/ravdy/nodejs.git

Using simple "hello world" application from the nodejs.org website

On Jenkins GUI

  1. Create the new FreeStyle Project
    Git URL - https://github.com/ravdy/nodejs.git

BUILD --> Execute Shell npm install

npm install
tar czf easyio.tar-$BUILD_NUMBER.gz node_modules main.js package.json public LICENSE

To Deploy on nodejs application server

About

Multi branch Pipeline Demo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published