API for searching and reading the Buildpack Registry
Go to file
Joe Kutner 80338fd5b0
Merge pull request #145 from schneems/schneems/redact-print
Redact credentials before printing to logs
2025-07-15 16:43:35 -05:00
.github/workflows Use Ruby 3.1.6 in CI as well 2024-09-03 08:26:26 -05:00
app fix: Fix Registery Page Look and feel 2025-02-17 22:55:39 -06:00
bin Eject webpacker for jsbundling-rails 2024-08-21 15:48:59 -05:00
cmd Redact image and config errors 2025-05-27 16:59:03 -05:00
config Eject webpacker for jsbundling-rails 2024-08-21 15:48:59 -05:00
db Parse version into component columns in the database 2020-12-17 15:08:41 -06:00
internal/mocks initial commit 2020-12-14 14:58:56 -07:00
lib Update lib/tasks/report.rake 2021-05-21 17:27:22 -05:00
log Set Go version, and delete logs 2020-12-16 17:14:52 -06:00
public Remove default public assets 2020-12-17 07:47:43 -06:00
test Cast buildpack semver parts to integer when sorting 2022-03-15 13:32:25 -07:00
.browserslistrc setup react project 2021-01-14 14:00:15 -07:00
.gitattributes Added dotfiles 2020-12-16 16:35:53 -06:00
.gitignore Eject webpacker for jsbundling-rails 2024-08-21 15:48:59 -05:00
.ruby-version Upgrade Ruby to 3.1, Rails to 6.1.7 2024-08-29 12:52:04 -05:00
Gemfile Upgrade Ruby to 3.1, Rails to 6.1.7 2024-08-29 12:52:04 -05:00
Gemfile.lock Upgrade Ruby to 3.1, Rails to 6.1.7 2024-08-29 12:52:04 -05:00
LICENSE Update LICENSE (#22) 2021-02-08 15:54:06 -07:00
Procfile Update procfile with web and release commands 2020-12-16 16:36:44 -06:00
Procfile.dev Eject webpacker for jsbundling-rails 2024-08-21 15:48:59 -05:00
README.md Eject webpacker for jsbundling-rails 2024-08-21 15:48:59 -05:00
Rakefile Added rails app to implement search app 2020-12-16 16:32:34 -06:00
app.json Specify buildpack order to ensure the correct node version is installed 2022-02-14 13:20:36 -06:00
babel.config.js setup react project 2021-01-14 14:00:15 -07:00
config.ru Added rails app to implement search app 2020-12-16 16:32:34 -06:00
go.mod Update to go1.23 2024-08-19 16:46:10 -05:00
go.sum Update to go1.23 2024-08-19 16:46:10 -05:00
makefile Add new makefile targets 2020-12-17 13:15:22 -06:00
package.json Eject webpacker for jsbundling-rails 2024-08-21 15:48:59 -05:00
postcss.config.js setup react project 2021-01-14 14:00:15 -07:00
tsconfig.json setup react project 2021-01-14 14:00:15 -07:00
yarn.lock Eject webpacker for jsbundling-rails 2024-08-21 15:48:59 -05:00

README.md

Buildpack Registry API

CI CII Best Practices

This repository contains an application that exposes an API for interacting with the Buildpack Registry.

Endpoints

Search for a buildpack by keyword(s).

GET /search

Required Parameters

Name Type Description Example
matches string keyword(s) to search for "ruby"

Request Example

$ curl "https://registry.buildpacks.io/api/v1/search?matches=ruby"

Response Example

[
  {
    "latest": {
      "id": "a52bd991-0e17-46c0-a413-229b35943765",
      "namespace": "heroku",
      "name": "ruby",
      "version": "0.1.0",
      "addr": "public.ecr.aws/r2f9u0w4/heroku-ruby-buildpack@sha256:0f05ccc534c20fb54cc6f0c71df9b21b2952f74f528ed98f55d81c40434844fd",
      "yanked": false,
      "description": "",
      "homepage": "",
      "licenses": null,
      "stacks": [
        "heroku-18",
        "heroku-20"
      ],
      "created_at": "2021-03-04T16:20:27.189Z",
      "updated_at": "2021-05-16T04:24:52.556Z",
      "version_major": "0",
      "version_minor": "1",
      "version_patch": "0"
    },
    "versions": [
      {
        "version": "0.1.0",
        "_link": "https://registry.buildpacks.io/api/v1/buildpacks/heroku/ruby/0.1.0"
      }
    ]
  }
]

Buildpack Version List

Search for a buildpack by keyword(s).

GET /buildpacks/:namespace/:name

Required Parameters

Name Type Description Example
namespace string the namespace component from the ID of the buildpack "heroku"
name string the name component from the ID of the buildpack "ruby"

Request Example

$ curl "https://registry.buildpacks.io/api/v1/buildpacks/heroku/ruby"

Response Example

{
  "latest": {
    "version": "0.1.0",
    "namespace": "heroku",
    "name": "ruby",
    "description": "",
    "homepage": "",
    "licenses": null,
    "stacks": [
      "heroku-18",
      "heroku-20"
    ],
    "id": "a52bd991-0e17-46c0-a413-229b35943765"
  },
  "versions": [
    {
      "version": "0.1.0",
      "_link": "https://registry.buildpacks.io//api/v1/buildpacks/heroku/ruby/0.1.0"
    }
  ]
}

Buildpack Version Info

Search for a buildpack by keyword(s).

GET /buildpacks/:namespace/:name/:version

Required Parameters

Name Type Description Example
namespace string the namespace component from the ID of the buildpack "heroku"
name string the name component from the ID of the buildpack "ruby"
version string the version of the buildpack "0.1.0"

Request Example

$ curl "https://registry.buildpacks.io/api/v1/buildpacks/heroku/ruby/0.1.0"

Response Example

{
  "id": "a52bd991-0e17-46c0-a413-229b35943765",
  "namespace": "heroku",
  "name": "ruby",
  "version": "0.1.0",
  "addr": "public.ecr.aws/r2f9u0w4/heroku-ruby-buildpack@sha256:0f05ccc534c20fb54cc6f0c71df9b21b2952f74f528ed98f55d81c40434844fd",
  "yanked": false,
  "description": "",
  "homepage": "",
  "licenses": null,
  "stacks": [
    "heroku-18",
    "heroku-20"
  ],
  "created_at": "2021-03-04T16:20:27.189Z",
  "updated_at": "2021-05-16T04:30:10.652Z",
  "version_major": "0",
  "version_minor": "1",
  "version_patch": "0"
}

Development

This project requires Ruby, Rails and Golang tooling.

  1. Install Ruby determined by .ruby-version file.
  2. Install Rails and Golang.
  3. bundle install to install all the dependencies in your Gemfile
  4. yarn install to install all the dependencies in yarn.lock file

This app uses PostgreSQL. To set up the database, run:

$ bundle exec rake db:create
$ bundle exec rake db:migrate

Run the tests:

$ make test

Then run the Rails app and asset watcher/compiler with:

$ ./bin/dev

In other terminal session, run the background worker to create the index:

$ make index