Merge pull request #1128 from progrium/1091_mh-switch-to-herokuish
switching to herokuish. closes #1091
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
This is a sample application to test heroku buildpack multi for integrating with buildstep: https://github.com/progrium/buildstep/pull/75
|
||||
This is a sample application to test heroku buildpack multi for integrating with herokuish: https://github.com/gliderlabs/herokuish
|
||||
|
||||
I am choosing to use the python, nodejs, and ruby buildpacks to create a very simple flask app that performs a bower install and a simple grunt task using compass.
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail
|
||||
|
||||
MODE="$1"; MODE=${MODE:="testing"}
|
||||
|
||||
setup_circle() {
|
||||
MAKE_ENV="CI=true"
|
||||
[[ "$1" == "buildstack" ]] && MAKE_ENV+=" BUILD_STACK=true "
|
||||
echo "setting up with MAKE_ENV: $MAKE_ENV"
|
||||
echo "=====> setup_circle on CIRCLE_NODE_INDEX: $CIRCLE_NODE_INDEX"
|
||||
sudo -E CI=true make -e sshcommand
|
||||
# need to add the dokku user to the docker group
|
||||
sudo usermod -G docker dokku
|
||||
@@ -14,33 +14,43 @@ setup_circle() {
|
||||
sudo chown -R root:root ~root/.ssh/
|
||||
sudo sed --in-place 's:/home/ubuntu:/root:g' ~root/.ssh/config
|
||||
####
|
||||
sudo -E $MAKE_ENV make -e install
|
||||
[[ "$1" == "buildstack" ]] && BUILD_STACK=true make -e stack
|
||||
sudo -E CI=true make -e install
|
||||
sudo -E make -e setup-deploy-tests
|
||||
make -e ci-dependencies
|
||||
}
|
||||
|
||||
if [[ -n "$CIRCLE_NODE_INDEX" ]] && [[ "$MODE" == "setup" ]]; then
|
||||
case "$CIRCLE_NODE_INDEX" in
|
||||
3)
|
||||
setup_circle buildstack
|
||||
exit $?
|
||||
;;
|
||||
*)
|
||||
setup_circle
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
case "$CIRCLE_NODE_INDEX" in
|
||||
0)
|
||||
echo "=====> make unit-tests (1/2) on CIRCLE_NODE_INDEX: $CIRCLE_NODE_INDEX"
|
||||
[[ "$MODE" == "setup" ]] && setup_circle && exit 0
|
||||
sudo -E UNIT_TEST_BATCH=1 make -e unit-tests
|
||||
;;
|
||||
|
||||
1)
|
||||
echo "=====> make unit-tests (2/2) on CIRCLE_NODE_INDEX: $CIRCLE_NODE_INDEX"
|
||||
[[ "$MODE" == "setup" ]] && setup_circle && exit 0
|
||||
sudo -E UNIT_TEST_BATCH=2 make -e unit-tests
|
||||
;;
|
||||
|
||||
2)
|
||||
echo "=====> make deploy-tests (buildstep release) on CIRCLE_NODE_INDEX: $CIRCLE_NODE_INDEX"
|
||||
[[ "$MODE" == "setup" ]] && setup_circle && exit 0
|
||||
echo "=====> make deploy-tests (herokuish release) on CIRCLE_NODE_INDEX: $CIRCLE_NODE_INDEX"
|
||||
sudo -E make -e deploy-tests
|
||||
;;
|
||||
|
||||
3)
|
||||
echo "=====> make deploy-tests (buildstep master) on CIRCLE_NODE_INDEX: $CIRCLE_NODE_INDEX"
|
||||
[[ "$MODE" == "setup" ]] && setup_circle buildstack && exit 0
|
||||
echo "=====> make deploy-tests (herokuish master) on CIRCLE_NODE_INDEX: $CIRCLE_NODE_INDEX"
|
||||
sudo -E make -e deploy-tests
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -95,7 +95,7 @@ teardown() {
|
||||
assert_output ""
|
||||
}
|
||||
|
||||
@test "(config) global config (buildstep)" {
|
||||
@test "(config) global config (herokuish)" {
|
||||
deploy_app
|
||||
run bash -c "dokku run $TEST_APP env | egrep '^global_test=true'"
|
||||
echo "output: "$output
|
||||
|
||||
@@ -10,7 +10,7 @@ teardown() {
|
||||
destroy_app
|
||||
}
|
||||
|
||||
# @test "(ps) buildstep" {
|
||||
# @test "(ps) herokuish" {
|
||||
# # CI support: 'Ah. I just spoke with our Docker expert --
|
||||
# # looks like docker exec is built to work with docker-under-libcontainer,
|
||||
# # but we're using docker-under-lxc. I don't have an estimated time for the fix, sorry
|
||||
@@ -21,7 +21,7 @@ teardown() {
|
||||
# assert_success
|
||||
# }
|
||||
|
||||
@test "(ps) buildstep" {
|
||||
@test "(ps) herokuish" {
|
||||
deploy_app
|
||||
run bash -c "dokku ps:stop $TEST_APP"
|
||||
echo "output: "$output
|
||||
@@ -68,7 +68,7 @@ teardown() {
|
||||
done
|
||||
}
|
||||
|
||||
@test "(ps:scale) buildstep" {
|
||||
@test "(ps:scale) herokuish" {
|
||||
run bash -c "dokku ps:scale $TEST_APP web=2 worker=2"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
Reference in New Issue
Block a user