Skip to content

Commit e190802

Browse files
committed
Port the buildpack for Scalingo PaaS
1 parent 63b2934 commit e190802

File tree

3 files changed

+39
-38
lines changed

3 files changed

+39
-38
lines changed

Makefile

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
default: cedar-14 heroku-16 heroku-18
1+
default: scalingo scalingo-18
22

33
VERSION := 5.1.0
44
ROOT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
@@ -11,31 +11,26 @@ src/jemalloc-%.tar.bz2:
1111
mkdir -p $$(dirname $@)
1212
curl -fsL https://github.com/jemalloc/jemalloc/releases/download/$*/jemalloc-$*.tar.bz2 -o $@
1313

14-
.PHONY: cedar-14 heroku-16 heroku-18
14+
.PHONY: scalingo scalingo-18
1515

16-
# Build for cedar-14 stack
17-
cedar-14: src/jemalloc-$(VERSION).tar.bz2
16+
# Build for scalingo stack
17+
scalingo: src/jemalloc-$(VERSION).tar.bz2
1818
docker run --rm -it --volume="$(ROOT_DIR):/wrk" \
19-
heroku/cedar:14 /wrk/build.sh $(VERSION) cedar-14
19+
scalingo/builder:v25 /wrk/build.sh $(VERSION) scalingo
2020

21-
# Build for heroku-16 stack
22-
heroku-16: src/jemalloc-$(VERSION).tar.bz2
21+
# Build for scalingo-18 stack
22+
scalingo-18: src/jemalloc-$(VERSION).tar.bz2
2323
docker run --rm -it --volume="$(ROOT_DIR):/wrk" \
24-
heroku/heroku:16-build /wrk/build.sh $(VERSION) heroku-16
25-
26-
# Build for heroku-18 stack
27-
heroku-18: src/jemalloc-$(VERSION).tar.bz2
28-
docker run --rm -it --volume="$(ROOT_DIR):/wrk" \
29-
heroku/heroku:18-build /wrk/build.sh $(VERSION) heroku-18
24+
scalingo/builder-18:v1 /wrk/build.sh $(VERSION) scalingo-18
3025

3126
# Build recent releases for all supported stacks
3227
all:
33-
$(MAKE) cedar-14 heroku-16 heroku-18 VERSION=3.6.0
34-
$(MAKE) cedar-14 heroku-16 heroku-18 VERSION=4.0.4
35-
$(MAKE) cedar-14 heroku-16 heroku-18 VERSION=4.1.1
36-
$(MAKE) cedar-14 heroku-16 heroku-18 VERSION=4.2.1
37-
$(MAKE) cedar-14 heroku-16 heroku-18 VERSION=4.3.1
38-
$(MAKE) cedar-14 heroku-16 heroku-18 VERSION=4.4.0
39-
$(MAKE) cedar-14 heroku-16 heroku-18 VERSION=4.5.0
40-
$(MAKE) cedar-14 heroku-16 heroku-18 VERSION=5.0.1
41-
$(MAKE) cedar-14 heroku-16 heroku-18 VERSION=5.1.0
28+
$(MAKE) scalingo scalingo-18 VERSION=3.6.0
29+
$(MAKE) scalingo scalingo-18 VERSION=4.0.4
30+
$(MAKE) scalingo scalingo-18 VERSION=4.1.1
31+
$(MAKE) scalingo scalingo-18 VERSION=4.2.1
32+
$(MAKE) scalingo scalingo-18 VERSION=4.3.1
33+
$(MAKE) scalingo scalingo-18 VERSION=4.4.0
34+
$(MAKE) scalingo scalingo-18 VERSION=4.5.0
35+
$(MAKE) scalingo scalingo-18 VERSION=5.0.1
36+
$(MAKE) scalingo scalingo-18 VERSION=5.1.0

README.md

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# heroku-buildpack-jemalloc
1+
# jemalloc Buildpack
22

33
[jemalloc](http://jemalloc.net/) is a general purpose malloc implementation
44
that works to avoid memory fragmentation in multithreaded applications. This
@@ -8,8 +8,14 @@ platforms.
88
## Install
99

1010
```console
11-
heroku buildpacks:add --index 1 https://github.com/gaffneyc/heroku-buildpack-jemalloc.git
12-
git push heroku master
11+
scalingo env-set BUILDPACK_URL=https://github.com/Scalingo/multi-buildpack.git
12+
```
13+
14+
And in a `.buildpacks` file (example with ruby):
15+
16+
```
17+
https://github.com/Scalingo/jemalloc-buildpack.git
18+
https://github.com/Scalingo/ruby-buildpack.git
1319
```
1420

1521
## Usage
@@ -20,7 +26,7 @@ Set the JEMALLOC_ENABLED config option to true and jemalloc will be used for
2026
all commands run inside of your dynos.
2127

2228
```console
23-
heroku config:set JEMALLOC_ENABLED=true
29+
scalingo env-set JEMALLOC_ENABLED=true
2430
```
2531

2632
### Per dyno
@@ -40,14 +46,14 @@ web: jemalloc.sh bundle exec puma -C config/puma.rb
4046
Set this to true to automatically enable jemalloc.
4147
4248
```console
43-
heroku config:set JEMALLOC_ENABLED=true
49+
scalingo env-set JEMALLOC_ENABLED=true
4450
```
4551

4652
To disable jemalloc set the option to false. This will cause the application to
4753
restart disabling jemalloc.
4854

4955
```console
50-
heroku config:set JEMALLOC_ENABLED=false
56+
scalingo env-set JEMALLOC_ENABLED=false
5157
```
5258

5359
### JEMALLOC_VERSION
@@ -62,7 +68,7 @@ mentioning tar if the version does not exist.
6268
require a code change to be deployed in order to take affect.
6369

6470
```console
65-
heroku config:set JEMALLOC_VERSION=3.6.0
71+
scalingo env-set JEMALLOC_VERSION=3.6.0
6672
```
6773

6874
#### Available Versions
@@ -80,7 +86,7 @@ heroku config:set JEMALLOC_VERSION=3.6.0
8086
| 5.1.0 |
8187

8288
The complete and most up to date list of supported versions and stacks is
83-
available on the [releases page.](https://github.com/gaffneyc/heroku-buildpack-jemalloc/releases)
89+
available on the [releases page.](https://github.com/Scalingo/jemalloc-buildpack/releases)
8490

8591
## Thanks
8692

@@ -95,26 +101,26 @@ Get started for free today with [Dead Man's Snitch on Heroku](http://github.com/
95101

96102
## Building
97103

98-
This uses Docker to build against Heroku
99-
[stack-image](https://github.com/heroku/stack-images)-like images.
104+
This uses Docker to build against Scalingo
105+
[stack-image](https://doc.scalingo.com/platform/internals/base-docker-image#top-of-page)-like images.
100106

101107
```console
102108
make VERSION=5.1.0
103109
```
104110

105-
Artifacts will be dropped in `dist/` based on Heroku stack and jemalloc version.
111+
Artifacts will be dropped in `dist/` based on Scalingo stack and jemalloc version.
106112

107113
### Deploying New Versions
108114

109115
- `make VERSION=X.Y.Z`
110116
- `open dist`
111-
- Go to [releases](https://github.com/gaffneyc/heroku-buildpack-jemalloc/releases)
112-
- Edit the release corresponding to each heroku Stack
117+
- Go to [releases](https://github.com/Scalingo/jemalloc-buildpack/releases)
118+
- Edit the release corresponding to each scalingo Stack
113119
- Drag and drop the new build to attach
114120

115121
### Creating a New Stack
116-
- Go to [releases](https://github.com/gaffneyc/heroku-buildpack-jemalloc/releases)
122+
- Go to [releases](https://github.com/Scalingo/jemalloc-buildpack/releases)
117123
- Click "Draft a new release"
118-
- Tag is the name of the Stack (e.g. `heroku-18`)
124+
- Tag is the name of the Stack (e.g. `scalingo-18`)
119125
- Target is `release-master`
120126
- Title is `Builds for the [stack] stack`

bin/compile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ if [ -f $ENV_DIR/JEMALLOC_VERSION ]; then
1515
version=$(cat $ENV_DIR/JEMALLOC_VERSION)
1616
fi
1717

18-
url="https://github.com/gaffneyc/heroku-buildpack-jemalloc/releases/download/$STACK/jemalloc-$version.tar.bz2"
18+
url="https://github.com/Scalingo/jemalloc-buildpack/releases/download/$STACK/jemalloc-$version.tar.bz2"
1919
dest="$BUILD_DIR/vendor/jemalloc"
2020

2121
echo "-----> Vendoring jemalloc $version"

0 commit comments

Comments
 (0)