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

continued

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

continued

Monitor merge requests to continuous deployment

  • 0.1.21
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

mr

package to help deploy merge requests project on test environment with docker, and provide a page to view these projects

this package can listen your project, and auto clone source code to deploy in docker for each merge request. When a merge request is closed or merged, this program will remove docker image and container which used by the closed or merged request.

Each time this program run, it will get all merge_requests are opened and try to deploy them.

finally, you can view them on localhost:8099(of course you can set this port)

Install

  npm install test-mr-server

Before use

To use this package with docker-compose or docker build, we hope you provide a configuration file named continued.json in your project to us to know some details about your project like language .etc. Besides, if you had build artifacts before deploy, we hope you can provide a script in your project to us to get these artifacts, otherwise, we would just clone this project and install dependence, build, this process may be very long... Finally, you should open the gitlab or github web hooks to send request for this program to listen to your project. At least, you should open Job events and merge requests.

the continued.json maybe like this

  {
    "artifacts": {
      "fetch": true
    },
    "scripts": {
      "prebuild": "./scripts/install.sh",
      "build": "./scripts/build.sh",
      "postbuild": "./scripts/post-build.sh"
    },
    "deployment": {
      "env": {
        "NODE_DEBUG": "xxx"
      },
      "compose": {
        "file": "docker-compose.yml", //  docker-compose file path
        "entry": "web" //  docker service name, such as mr-server
      }
    }
  }

Usage

  mr ~/Document/continued.config.json

you can run this program with this command, which means set config file link to ~/Document/continued.config.json, about this .json, like this:

{
  "project": "owner/repo",
  "server": {
    "hostname": "localhost",
    "url": "localhost:8099",
    "http": {
      "port": 8099
    }
  },
  "repository": {
    "name": "gitlab",
    "url": "https://gitlab.com",
    "credentials": {
      "privateToken": "123"
    },
    "polling": {
      "interval": 600000
    }
  },
  "ci": {
    "name": "gitlab",
    "url": "https://gitlab.com",
    "credentials": {
      "privateToken": "123"
    },
    "polling": {
      "interval": 10000
    }
  },
  "branches": {
    "colors": {
      "feature": "green",
      "fix": "red"
    }
  },
  "build": {
    "env": {
      "ENV_BUILD_SCRIPT_NEEDS": "test"
    }
  },
  "deployment": {
    "env": {
      "ENV_DOCKER_COMPOSE_NEEDS": "test",
    }
  },
  "tasking": {
    "concurrency": 2
  }
}

And then, this program would run as a resident process, it would output some message on the shell like docker building info, unzip file info, error message .etc.

FAQs

Package last updated on 19 Dec 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