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

@financial-times/origami-service-makefile

v7.0.3

Published

Common tools for building and running Origami services

Downloads

35,537

Readme

Origami Service Makefile

Common tools for building and running Origami services.

NPM version Build status MIT licensed

Table Of Contents

Usage

Origami Service Makefile provides a set of common tools that are required for building and running Origami services. To use the Makefile, copy the boilerplate.mk file to the root of your repo and name it Makefile:

curl https://raw.githubusercontent.com/Financial-Times/origami-service-makefile/master/boilerplate.mk > Makefile

Now install this module and save it to your package.json file:

npm install --save @financial-times/origami-service-makefile

You should now be able to run the following commands:

make install       # Install application dependencies
make verify        # Verify code using static analysis
make test          # Run unit and integration tests
make run           # Run the application as if in production
make run-dev       # Run the application and restart when files change
make deploy        # Deploy the application to QA
make release       # Run required tasks before a release goes live
make promote       # Promote a QA deploy to production
make auto-version  # Auto-version the repo and create a GitHub release
make cmdb-update   # Update CMDB endpoints for the application
make release-log   # Create a release log for the application in Salesforce
make grafana-pull  # Pull changes from the Grafana dashboard
make grafana-push  # Push changes to the Grafana dashboard

Configuration

The Origami Service Makefile can be configured with [environment variables] either in an extending Makefiles or externally. Some configurations are required to never be committed for security reasons, these have been separated below.

Safe Configurations

These configurations are safe to include in your extending Makefile, and should be kept there to avoid repetition of their values:

  • SERVICE_NAME: The human readable name for this service, used in many of the tasks. E.g. Origami Image Service
  • SERVICE_SYSTEM_CODE: The system code for this service, used in many of the tasks. E.g. origami-image-service
  • SERVICE_SALESFORCE_ID: The Salesforce ID associated with this service, used to create release logs
  • HEROKU_APP_QA: The Heroku application ID for QA. E.g. origami-image-service-qa
  • HEROKU_APP_EU: The Heroku application ID for production EU. E.g. origami-image-service-eu
  • HEROKU_APP_US: The Heroku application ID for production US. E.g. origami-image-service-us
  • EXPECTED_COVERAGE: A number indicating the expected code coverage of the application's unit tests. Defaults to 90
  • INTEGRATION_TIMEOUT: The time in milliseconds that each integration test is allowed to run for. Defaults to 5000
  • INTEGRATION_SLOW: The time in milliseconds at which each integration test is considered slow. Defaults to 4000
  • INTEGRATION_FLAGS: Any additional flags that must be passed to mocha when running the integration tests.
  • REGION: The region the application is running in, used in release logs and determining which release tasks are required. One of QA, EU, or US
  • RELEASE_LOG_ENVIRONMENT: The Salesforce environment to include in release logs. One of Test or Production
  • GRAFANA_DASHBOARD: The Grafana dashboard ID for the application
  • GITHUB_RELEASE_REPO: The GitHub repository in owner/name format. This is used for auto-versioning

Private Configurations

These configurations must never appear in your source code, and so should be set in CI, or Heroku, or an .env file locally:

  • CMDB_API_KEY: The API key to use when performing CMDB operations
  • RELEASE_LOG_API_KEY: The change request API key to use when creating and closing release logs
  • GRAFANA_API_KEY: The API key to use when performing Grafana operations
  • GITHUB_RELEASE_USER: The user who will create releases on GitHub for repositories which use the auto-version task. This user must have write access to GITHUB_RELEASE_REPO
  • GITHUB_RELEASE_TOKEN: A token for GITHUB_RELEASE_USER which has repo level access

Contact

If you have any questions or comments about this module, or need help using it, please either raise an issue, visit #origami-support or email Origami Support.

Licence

This software is published by the Financial Times under the MIT licence.