Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

frack-deployment

Package Overview
Dependencies
Maintainers
1
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

frack-deployment

  • 3.6.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-25%
Maintainers
1
Weekly downloads
 
Created
Source

[frack-deployment]

Installation

To install the stable version:

npm install --save frack-deployment

Integration to project

  1. Setup Jenkins CI environment

  2. Add these lines to package.json:

"deploy:preview": "frack-deployment request-deploy-allbranch",
"deploy:staging": "frack-deployment request-deploy staging",
"deploy:production": "frack-deployment request-deploy production",
"ci-deploy-preview": "frack-deployment ci-deploy-allbranch",
"ci-deploy-staging": "frack-deployment ci-deploy staging",
"ci-deploy-production": "frack-deployment ci-deploy production",
"ci-rollback": "frack-deployment ci-rollback",
"ci-clean": "frack-deployment ci-clean",
"pm2-startup": "frack-deployment pm2-startup",
"pm2-startup-allbranch": "frack-deployment pm2-startup-allbranch",
"pm2-delete-allbranch": "frack-deployment pm2-delete-allbranch",
  1. Create in project root file deploy.config.js:
  module.exports = {
    jenkins: {
      jobName: 'abc',
      token: 'def',
    },
    ci: {
      preview: {
        projectName: 'myProject',
        config: 'configSection',
        domainBase: 'preview.project.com',
        reinstallWithProductionDependencies: true,
        mattermost: {
          endpoint: 'https://mattermost.siteone.cz/hooks/or3pupgictyz5gydrmkdsri5gy',
          channel: 'test',
        },
      },
      staging: {
        projectName: 'myProject-staging',
        config: 'configSection'
      },
      production: {
        projectName: 'myProject',
        config: 'configSection'
      },
      checkAfterDeploy: function (next, { sshDsn, port }) {
        return next();
      }
    },
    deploy: {
      'configSection': {
        sshBaseDir: '/home/deploy',
        sshSubDir: '',
        sshDsns: [
          'user@mysshserver'
        ],
        excludeFile: '.rsyncignore',
        releasesBackupCount: 3,
        allbranchLeaveDaysCount: 20,
        vhostApiUrl: 'http://xyz'
      }
    }
  }
  1. Add to your .env file these variables (with real values of course):
  JENKINS_DEPLOY_ALLBRANCH_JOB=jenkinsJobNameXyz
  JENKINS_DEPLOY_PRODUCTION_JOB=jenkinsJobNameXyz
  JENKINS_DEPLOY_STAGING_JOB=jenkinsJobNameXyz
  JENKINS_DEPLOY_ALLBRANCH_TOKEN=xyz
  JENKINS_DEPLOY_PRODUCTION_TOKEN=xyz
  JENKINS_DEPLOY_STAGING_TOKEN=xyz

Usage

After integration run in project:

npm run deploy:preview npm run deploy:production npm run deploy:staging

FAQs

Package last updated on 27 Feb 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc