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

@bufferapp/buffer-service-brigade-scripts

v0.0.3

Published

Buffer Service Brigade Scripts

Downloads

55

Readme

buffer-service-brigade-scripts

NPM Package for brigade scripts

Table Of Contents

Quickstart

Create A Brigade Project

A brigade project uses a secret to be used as configuration, sensitive information can be stored in the file that can be used during the deployment phase -- things like ENV vars with keys.

Create an example brigade secret file (lets call in my-app-secrets.yaml): https://github.com/Azure/brigade/blob/master/docs/topics/github.md#configuring-your-project

Deploy the brigade project with helm

helm upgrade --install my-app-secrets brigade/brigade-project -f my-app-secrets.yaml --namespace brigade

Hook Up The Webhook on github

Follow these instructions on the repo you'd like to deploy with https://brigade-gateway.buffer.com/events/github as YOUR_HOSTNAME:

https://github.com/Azure/brigade/blob/master/docs/topics/github.md#configuring-github

Configure The Repo

There are usually three parts to this

A full list of configuration options for this package can be found in the Example Configuration section.

Example Configuration

brigade.js

This script gets called that triggers deployments

const brigade = require('brigadier')
const brigadeScripts = require('@bufferapp/buffer-service-brigade-scripts')

brigadeScripts({
  brigade,
  chartmuseumUrl: 'http://chartmuseum-chartmuseum.default', // default
  valuesPath: 'values.yaml', // default
  helmChart: 'buffer-service', // default
  // environment vars to set on container
  // (on top of any set in the values.yaml)
  envVars: [
    {
      name: 'MONGO_URL',
      projectSecret: 'MONGO_URL',
    },
    {
      name: 'MONGO_DATABASE',
      projectSecret: 'MONGO_DATABASE',
    },
    {
      name: 'BUGSNAG_KEY',
      projectSecret: 'BUGSNAG_KEY',
    },
    // can also specify a value if you wanted to
    // {
    //   name: 'SOME_ENV_VAR_NAME',
    //   value: 'SOME_ENV_VAR_VALUE',
    // },
  ],
  // deploy to a namespace when a branch PR is opened or synced
  // destroys when the PR is closed
  // chooses the first namespace in the list where the branch matches the regex
  // this one does all dev deploys onto the dev namespace
  devDeploys: [
    // {
    //   branch: /^reply-dev$/,
    //   namespace: 'reply-dev',
    // },
    {
      branch: /.*/,
      namespace: 'dev',
    },
  ],
  // set to true to do a dry run on PR opened or synced
  // overrides devDeploys
  // does not change default branch behavior
  deployDryRun: false,
})

brigade.json

Describes which version of the scripts to use

{
  "dependencies": {
    "@bufferapp/buffer-service-brigade-scripts": "0.0.1"
  }
}