npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

continued

v0.1.25

Published

Monitor merge requests to continuous deployment

Downloads

65

Readme

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.