Skip to content

Commit 9a435a7

Browse files
Merge pull request #290 from gliderlabs/master
release v0.3.32
2 parents 641a506 + ab66931 commit 9a435a7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+505
-5775
lines changed

.circleci/config.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
version: 2
2+
jobs:
3+
build:
4+
machine: true
5+
working_directory: ~/gliderlabs/herokuish
6+
parallelism: 4
7+
steps:
8+
- checkout
9+
- run: |
10+
case $CIRCLE_NODE_INDEX in 0) make shellcheck;; esac
11+
- run: |
12+
case $CIRCLE_NODE_INDEX in 0) make lint;; esac
13+
- run: |
14+
make circleci
15+
- run: |
16+
make deps
17+
- run: |
18+
make build
19+
- run: |
20+
case $CIRCLE_NODE_INDEX in 0) basht tests/**/tests.sh ;; esac
21+
- run: |
22+
tests=$(circleci tests glob buildpacks/*/tests/*/test.sh | circleci tests split --split-by=timings | xargs)
23+
echo "executing tests: $tests"
24+
basht $tests
25+
- deploy:
26+
name: release
27+
command: |
28+
if [ "${CIRCLE_BRANCH}" == "release" ]; then
29+
make release
30+
fi

.stickler.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
linters:
2+
shellcheck:
3+
shell: bash
4+
exclude: 'SC2002,SC2030,SC2031,SC2034'
5+
golint:
6+
files:
7+
ignore:
8+
- 'vendor/*'
9+
- 'bower_components/*'
10+
- 'node_modules/*'
11+
- 'buildpacks/*/tests/*/test.sh'

CHANGELOG.md

+32-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,36 @@ All notable changes to this project will be documented in this file.
1010

1111
### Changed
1212

13+
## [0.3.32] - 2017-08-29
14+
### Changed
15+
- @miyucy Update ruby version to v168
16+
- @miyucy Update nodejs to version v110
17+
- @michaelshobbs Update clojure to version v77
18+
- @michaelshobbs Update go to version v72
19+
- @michaelshobbs Update java to version v53
20+
- @michaelshobbs Update nodejs to version v99
21+
- @michaelshobbs Update php to version v122
22+
- @michaelshobbs Update python to version v99
23+
- @michaelshobbs Update scala to version v78
24+
- @michaelshobbs Update gradle to version v23
25+
- @michaelshobbs exit 1 on incompatible buildpack for buildpack test command
26+
- @michaelshobbs use image GOPATH as working dir
27+
- @michaelshobbs use circleci 2.0 machine executor
28+
29+
### Added
30+
- @dzaporozhets Add support for buildpack test command
31+
- @michaelshobbs add stickler-ci
32+
- @michaelshobbs add linting and fix lintballs
33+
- @michaelshobbs add procfile tests
34+
- @dzaporozhets Update clojure-ring test app to make lein test work
35+
- @dzaporozhets Add support for testing buildpack test on clojure project
36+
- @dzaporozhets Add support for testing buildpack test on ruby project
37+
- @dzaporozhets Add buildpack test to readme and changelog
38+
39+
### Removed
40+
- @michaelshobbs drop grails 2 buildpack per heroku
41+
42+
1343
## [0.3.31] - 2017-06-21
1444
### Changed
1545
- @michaelshobbs Update go to version v69
@@ -371,7 +401,8 @@ All notable changes to this project will be documented in this file.
371401
- User for `buildpack-build` is `$USER` or randomized
372402
- User for `procfile-exec` is `$USER` or detected from `/app`
373403

374-
[unreleased]: https://github.com/gliderlabs/herokuish/compare/v0.3.31...HEAD
404+
[unreleased]: https://github.com/gliderlabs/herokuish/compare/v0.3.32...HEAD
405+
[0.3.32]: https://github.com/gliderlabs/herokuish/compare/v0.3.31...v0.3.32
375406
[0.3.31]: https://github.com/gliderlabs/herokuish/compare/v0.3.30...v0.3.31
376407
[0.3.30]: https://github.com/gliderlabs/herokuish/compare/v0.3.29...v0.3.30
377408
[0.3.29]: https://github.com/gliderlabs/herokuish/compare/v0.3.28...v0.3.29

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
FROM heroku/cedar:14
2-
RUN curl "https://github.com/gliderlabs/herokuish/releases/download/v0.3.31/herokuish_0.3.31_linux_x86_64.tgz" \
2+
RUN curl "https://github.com/gliderlabs/herokuish/releases/download/v0.3.32/herokuish_0.3.32_linux_x86_64.tgz" \
33
--silent -L | tar -xzC /bin
44
RUN /bin/herokuish buildpack install \
55
&& ln -s /bin/herokuish /build \

Makefile

+21-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
11
NAME = herokuish
22
HARDWARE = $(shell uname -m)
3-
VERSION ?= 0.3.31
3+
VERSION ?= 0.3.32
44
IMAGE_NAME ?= $(NAME)
55
BUILD_TAG ?= dev
66

7-
BUILDPACK_ORDER := multi ruby nodejs clojure python java gradle grails scala play php go erlang static
7+
BUILDPACK_ORDER := multi ruby nodejs clojure python java gradle scala play php go erlang static
88
SHELL := /bin/bash
99

10+
shellcheck:
11+
ifneq ($(shell shellcheck --version > /dev/null 2>&1 ; echo $$?),0)
12+
ifeq ($(SYSTEM),Darwin)
13+
brew install shellcheck
14+
else
15+
@sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse'
16+
@sudo apt-get update && sudo apt-get install -y shellcheck
17+
endif
18+
endif
19+
1020
build:
1121
@count=0; \
1222
for i in $(BUILDPACK_ORDER); do \
@@ -28,7 +38,7 @@ build-in-docker:
2838
docker build --rm -f Dockerfile.build -t $(NAME)-build .
2939
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock:ro \
3040
-v /var/lib/docker:/var/lib/docker \
31-
-v ${PWD}:/usr/src/myapp -w /usr/src/myapp \
41+
-v ${PWD}:/go/src/github.com/gliderlabs/herokuish -w /go/src/github.com/gliderlabs/herokuish \
3242
-e IMAGE_NAME=$(IMAGE_NAME) -e BUILD_TAG=$(BUILD_TAG) -e VERSION=master \
3343
$(NAME)-build make -e deps build
3444
docker rmi $(NAME)-build || true
@@ -53,6 +63,14 @@ circleci:
5363
rm -f ~/.gitconfig
5464
mv Dockerfile.dev Dockerfile
5565

66+
lint:
67+
# SC2002: Useless cat - https://github.com/koalaman/shellcheck/wiki/SC2002
68+
# SC2030: Modification of name is local - https://github.com/koalaman/shellcheck/wiki/SC2030
69+
# SC2031: Modification of name is local - https://github.com/koalaman/shellcheck/wiki/SC2031
70+
# SC2034: VAR appears unused - https://github.com/koalaman/shellcheck/wiki/SC2034
71+
@echo linting...
72+
shellcheck -e SC2002,SC2030,SC2031,SC2034 -s bash include/*.bash tests/**/tests.sh
73+
5674
release: build
5775
rm -rf release && mkdir release
5876
tar -zcf release/$(NAME)_$(VERSION)_linux_$(HARDWARE).tgz -C build/linux $(NAME)

README.md

+22-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Download and uncompress the latest binary tarball from [releases](https://github
1818
For example, you can do this directly in your Dockerfiles installing into `/bin` as one step:
1919

2020
```
21-
RUN curl --location --silent https://github.com/gliderlabs/herokuish/releases/download/v0.3.31/herokuish_0.3.31_linux_x86_64.tgz \
21+
RUN curl --location --silent https://github.com/gliderlabs/herokuish/releases/download/v0.3.32/herokuish_0.3.32_linux_x86_64.tgz \
2222
| tar -xzC /bin
2323
```
2424

@@ -36,6 +36,7 @@ Available commands:
3636
build Build an application using installed buildpacks
3737
install Install buildpack from Git URL and optional committish
3838
list List installed buildpacks
39+
test Build and run tests for an application using installed buildpacks
3940
help Shows help information for a command
4041
paths Shows path settings
4142
procfile Use Procfiles and run app commands
@@ -142,6 +143,26 @@ Mounting your local app source directory to `/tmp/app` and running `/bin/herokui
142143

143144
You can use this output when you submit issues.
144145

146+
#### Running an app tests using Heroku buildpacks
147+
148+
```
149+
$ docker run --rm -v /abs/app/path:/tmp/app gliderlabs/herokuish /bin/herokuish buildpack test
150+
```
151+
152+
Mounting your local app source directory to `/tmp/app` and running `/bin/herokuish buildpack test` will run your app through the buildpack test-compile process. Then it will run `test` command to execute application tests.
153+
154+
```
155+
-----> Ruby app detected
156+
-----> Setting up Test for Ruby/Rack
157+
-----> Using Ruby version: ruby-2.3.3
158+
...
159+
-----> Detecting rake tasks
160+
-----> Running test: bundle exec rspec
161+
.
162+
Finished in 0.00239 seconds (files took 0.07525 seconds to load)
163+
1 example, 0 failures
164+
```
165+
145166
#### Troubleshooting
146167

147168
If you run into an issue and looking for more insight into what `herokuish` is doing, you can set the `$TRACE` environment variable.
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v76
1+
v77
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
(defproject opdemand-helloworld "1.0.0-SNAPSHOT"
22
:description "OpDemand Example Application"
3-
:dependencies [
4-
[org.clojure/clojure "1.2.1"]
5-
[compojure "1.0.1"]
6-
[ring/ring-core "1.0.0"]
7-
[ring/ring-jetty-adapter "1.0.0"]
8-
[lein-ring "0.5.4"]
9-
]
10-
:dev-dependencies [
11-
[org.clojure/clojure-contrib "1.2.0"]
12-
]
3+
:min-lein-version "2.0.0"
4+
:dependencies [[org.clojure/clojure "1.7.0"]
5+
[compojure "1.3.4"]
6+
[ring/ring-core "1.3.2"]
7+
[ring/ring-jetty-adapter "1.3.2"]
8+
[lein-ring "0.8.13"]]
9+
:profiles
10+
{:dev {:dependencies [[ring/ring-mock "0.3.0"]]}}
1311
:ring {:handler helloworld.web/handler}
14-
:main "helloworld.web")
12+
:main helloworld.web)
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
1-
(ns helloworld.web
2-
(:use compojure.core [ring.adapter.jetty :only [run-jetty]] )
3-
(:require [compojure.route :as route]
4-
[compojure.handler :as handler]))
1+
(ns helloworld.web
2+
(:use compojure.core [ring.adapter.jetty :only [run-jetty]] )
3+
(:require [compojure.route :as route]
4+
[compojure.handler :as handler]))
55

6-
(defn splash []
7-
{:status 200
8-
:headers {"Content-Type" "text/plain"}
9-
:body "clojure-ring\n"})
6+
(defn splash []
7+
{:status 200
8+
:headers {"Content-Type" "text/plain"}
9+
:body "clojure-ring\n"})
1010

11-
(defroutes main-routes
12-
; what's going on
13-
(GET "/" [] (splash))
14-
(route/resources "/")
15-
(route/not-found "Page not found") )
11+
(defroutes main-routes
12+
(GET "/" [] (splash))
13+
(route/resources "/")
14+
(route/not-found "Page not found"))
1615

16+
(def app
17+
(handler/api main-routes))
1718

18-
(def app
19-
(handler/api main-routes))
20-
21-
(defn -main []
22-
(def port (get (System/getenv) "PORT" 5000))
23-
(run-jetty app {:port (Integer. port)}))
19+
(defn -main []
20+
(def port (get (System/getenv) "PORT" 5000))
21+
(run-jetty app {:port (Integer. port)}))
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
source "$(dirname $BASH_SOURCE)/../../../test"
22
app-test "$(basename $(dirname $BASH_SOURCE))"
3+
buildpack-test "$(basename $(dirname $BASH_SOURCE))"

buildpacks/buildpack-clojure/tests/clojure-ring/test/helloworld/test/core.clj

-6
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
(ns helloworld.web-test
2+
(:require [clojure.test :refer :all]
3+
[ring.mock.request :as mock]
4+
[helloworld.web :refer :all]))
5+
6+
(deftest test-app
7+
(testing "main route"
8+
(let [response (app (mock/request :get "/"))]
9+
(is (= (:status response) 200))
10+
(is (= (:body response) "clojure-ring\n"))))
11+
12+
(testing "not-found route"
13+
(let [response (app (mock/request :get "/invalid"))]
14+
(is (= (:status response) 404)))))
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v69
1+
v72
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v22
1+
v23

buildpacks/buildpack-grails/buildpack-url

-1
This file was deleted.

buildpacks/buildpack-grails/buildpack-version

-1
This file was deleted.

buildpacks/buildpack-grails/tests/grails/application.properties

-5
This file was deleted.

buildpacks/buildpack-grails/tests/grails/grails-app/conf/BootStrap.groovy

-7
This file was deleted.

buildpacks/buildpack-grails/tests/grails/grails-app/conf/BuildConfig.groovy

-76
This file was deleted.

0 commit comments

Comments
 (0)