JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 20
  • Score
    100M100P100Q49723F
  • License ISC

Automate creation and deployement of your application on gitlab

Package Exports

  • gitlabcicd

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gitlabcicd) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Automatically Set up Gitlab CICD

Generate gitlab.yml file automatically along with the bash script files which will automatically setup Gitlab CICD Using Docker and Gitlab Runner For You.

STEP 1

prerequisites : Install gitlab runner and docker on server (https://docs.gitlab.com/runner/install/)

Add Private key of your server to Environment Variable of gitlab

            PRIVATE_KEY : "private key"

##STEP 2

# install the bin script
npm install -g gitlabcicd


# Quick Start(Build Cicd interactively on command line)

## Run gitlabcicd from your Command Line
gitlabcicd

##OR

Give path of json file to app

# install the bin script
npm install -g gitlabcicd
gitlabcicd ./path.json

#Format of json file
  {
  image: 'nodeimage version',
  gitlabUsername: 'Gitlab Username',
  gitlabPassword: 'Gitlab Password',
  gitlabRepository: 'Repository_Name',
    servers: 
   [ 
     { 
       buildScript: ["build command 1" ...... ," build command N","Test Command one"...."Test Command N"],
       deployScript: ["Deploy command 1" ,"Deploy command 2" ...... ," Deploy command N"],
       address: 'ip or address of your server',
       username: 'Server User name',
       brachName: 'Name of branch you wannt to deploy on server' 
       
       },

        {
       buildScript: ["build command 1" ...... ," build command N","Test Command one"...."Test Command N"],
       deployScript: ["Deploy command 1" ,"Deploy command 2" ...... ," Deploy command N"],
       address: 'ip or address of your server',
       username: 'Server User name',
       brachName: 'Name of branch you wannt to deploy on server'
        } 
       ]
   }

#Example Json

    { 
       image: '',
  gitlabUsername: 'git_username',
  gitlabPassword: 'password',
  gitlabRepository: 'example_backend',

      servers: 
   [ 
     {
      buildScript: [
                    "npm install",
                    "npm install lint",
                    "node node-lint",
                    "npm install pm2 -g",
                    "pm2 start app"
                    ],
       deployScript: [
                      "npm install",
                      "sudo pm2 start app.js"
                      ],
       address: 'exampleServer1.com',
       username: 'ubuntuExampleserver',
       brachName: 'dev'
        },
        {
      buildScript: [
                    "npm install",
                    "npm install lint",
                    "node node-lint",
                    "npm install pm2 -g",
                    "pm2 start app"
                    ],
       deployScript: [
                      "npm install",
                      "sudo pm2 start app.js"
                      ],
       address: 'exampleServer2.com',
       username: 'ubuntuExampleserver2',
       brachName: 'prod'
        },

        ]
       }

  #run gitlabcicd from command line and give path of json file
  gitlabcicd path.json