forked from dokku/dokku
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: move app.json script execution into it's own plugin
Rather than have this live in 00_dokku-standard, move it out so that it may start to support various other features around the app.json manifest.
- Loading branch information
1 parent
1a36c77
commit 952db83
Showing
6 changed files
with
52 additions
and
31 deletions.
There are no files selected for viewing
File renamed without changes.
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,4 @@ | ||
[plugin] | ||
description = "dokku core app-json plugin" | ||
version = "0.13.4" | ||
[plugin.config] |
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
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,38 @@ | ||
#!/usr/bin/env bats | ||
|
||
load test_helper | ||
|
||
setup() { | ||
global_setup | ||
create_app | ||
DOCKERFILE="$BATS_TMPDIR/Dockerfile" | ||
} | ||
|
||
teardown() { | ||
rm -rf /home/dokku/$TEST_APP/tls | ||
destroy_app | ||
dokku config:unset --global DOKKU_RM_CONTAINER | ||
rm -f "$DOCKERFILE" | ||
global_teardown | ||
} | ||
|
||
@test "(app-json) app.json scripts" { | ||
deploy_app | ||
|
||
run /bin/bash -c "dokku run $TEST_APP ls /app/prebuild.test" | ||
echo "output: $output" | ||
echo "status: $status" | ||
assert_failure | ||
|
||
run /bin/bash -c "dokku run $TEST_APP ls /app/predeploy.test" | ||
echo "output: $output" | ||
echo "status: $status" | ||
assert_success | ||
|
||
CID=$(docker ps -a -q -f "ancestor=dokku/${TEST_APP}" -f "label=dokku_phase_script=postdeploy") | ||
IMAGE_ID=$(docker commit $CID dokku-test/${TEST_APP}) | ||
run /bin/bash -c "docker run -ti $IMAGE_ID ls /app/postdeploy.test" | ||
echo "output: $output" | ||
echo "status: $status" | ||
assert_success | ||
} |