-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #888 from heroku/cnb
Cloud Native Buildpack Support
- Loading branch information
Showing
25 changed files
with
702 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
version: 2.1 | ||
orbs: | ||
buildpacks: jkutner/buildpacks@0.0.7 | ||
ruby: circleci/ruby@0.2.1 | ||
jobs: | ||
build: | ||
machine: true | ||
steps: | ||
- buildpacks/install-pack: | ||
version: "0.7.0" | ||
- checkout | ||
- run: | ||
command: | | ||
rvm install 2.6.5 | ||
rvm use ruby-2.6.5 | ||
export PATH="/opt/circleci/.rvm/rubies/ruby-2.6.5/bin:$PATH" | ||
export GEM_HOME="/opt/circleci/.rvm/gems/ruby-2.6.5" | ||
export GEM_PATH="/opt/circleci/.rvm/gems/ruby-2.6.5" | ||
gem install bundler -v 2.1.0 | ||
bundle install | ||
bundle exec rake hatchet:setup_ci | ||
rspec spec/cnb/ | ||
workflows: | ||
main: | ||
jobs: | ||
- build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bash | ||
|
||
LAYERS_DIR=$1 | ||
PLATFORM_DIR=$2 | ||
ENV_DIR="$PLATFORM_DIR/env" | ||
PLAN=$3 | ||
APP_DIR=$(pwd) | ||
BIN_DIR=$(cd $(dirname $0); pwd) | ||
BUILDPACK_DIR=$(dirname $BIN_DIR) | ||
|
||
# legacy buildpack uses $STACK | ||
STACK=$CNB_STACK_ID | ||
|
||
source "$BIN_DIR/support/bash_functions.sh" | ||
heroku_buildpack_ruby_install_ruby "$BIN_DIR" "$BUILDPACK_DIR" | ||
|
||
$heroku_buildpack_ruby_dir/bin/ruby $BIN_DIR/support/ruby_build $APP_DIR $LAYERS_DIR $PLATFORM_DIR $PLAN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env ruby | ||
|
||
# This script compiles an application so it can run on Heroku. | ||
# It will install the application's specified version of Ruby, it's dependencies | ||
# and certain framework specific requirements (such as calling `rake assets:precompile` | ||
# for rails apps). You can see all features described in the devcenter | ||
# https://devcenter.heroku.com/articles/ruby-support | ||
$stdout.sync = true | ||
|
||
$:.unshift File.expand_path("../../../lib", __FILE__) | ||
require "language_pack" | ||
require "language_pack/shell_helpers" | ||
|
||
APP_DIR=ARGV[0] | ||
LAYER_DIR=ARGV[1] | ||
PLATFORM_DIR=ARGV[2] | ||
ENV_DIR="#{PLATFORM_DIR}/env" | ||
PLAN=ARGV[3] | ||
|
||
begin | ||
LanguagePack::Instrument.trace 'compile', 'app.compile' do | ||
LanguagePack::ShellHelpers.initialize_env(ENV_DIR) | ||
if pack = LanguagePack.detect(ARGV[0], nil, LAYER_DIR) | ||
pack.topic("Compiling #{pack.name}") | ||
pack.log("compile") do | ||
pack.build | ||
end | ||
end | ||
end | ||
rescue Exception => e | ||
LanguagePack::ShellHelpers.display_error_and_exit(e) | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.