5039 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
03c7543060 Release 0.18.0
# History

## 0.18.0

Install/update via the bootstrap script:

```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.18.0/bootstrap.sh
sudo DOKKU_TAG=v0.18.0 bash bootstrap.sh
```

### Bug Fixes

- #3627: @josegonzalez Make image removal synchronous
- #3618: @josegonzalez Ensure the dokku-retire timer is properly installed
- #3614: @alexquick Validate args for config:set and config:unset
- #3605: @josegonzalez Handle case where there are empty newlines in the authorized_keys file
- #3603: @josegonzalez Drop extra % sign in common.LogVerboseQuiet
- #3597: @josegonzalez Allow default trace function to work

### New Features

- #3628: @josegonzalez Handle file copying in a secure and reliable fashion
- #3630: @josegonzalez Fix issue where push warning on bad branch was skipped
- #3629: @josegonzalez Avoid calling the user-auth trigger where possible
- #3626: @josegonzalez Builder plugins
- #3599: @josegonzalez Scope docker-cleanup to specific app
- #3589: @michaelshobbs Allow running Dokku in Docker
- #3607: @josegonzalez Purge cache using herokuish image
- #3602: @alexymik Create a 502 error page to automatically refresh if backend status changes
- #3600: @josegonzalez Refactor IsImageHerokuishBased to match shell version

### Documentation

- #3625: @josegonzalez Remove old reference to SPONSORS.md
- #3619: @josegonzalez Cleanup plugin creation docs
- #3612: @jayjun Improve testing docs
- #3613: @Lyelt Remove all uses of proxy_set_header Connection "upgrade"
- #3596: @josegonzalez Add missing hooks to events plugin and plugin triggers docs

### Tests

- #3610: @jayjun Correct Bats path in single tests
v0.18.0
2019-08-07 07:22:12 -04:00
Jose Diaz-Gonzalez
9730992f95 Merge pull request #3628 from dokku/3611-windows-newlines
Handle file copying in a secure and reliable fashion
2019-08-05 16:56:23 -04:00
Jose Diaz-Gonzalez
6fcb53113a fix: return true when removing temporary files extracted from docker
If you are running docker in docker, the permissions on the generated file are such that they may not be accessible by the normal dokku user. For dokku, it is good enough to ignore the failed removal.
2019-08-05 15:57:54 -04:00
Jose Diaz-Gonzalez
5affe42699 fix: remove unnecessary cat 2019-08-05 15:24:15 -04:00
Jose Diaz-Gonzalez
eef9f5eba5 fix: ignore errors in copy_from_image within the check-deploy trigger
The trigger will later on check if it needs to run checks on its own by inspecting the file.
2019-08-05 13:35:33 -04:00
Jose Diaz-Gonzalez
86febeb7ca fix: do not try to remove the container twice 2019-08-05 13:35:03 -04:00
Jose Diaz-Gonzalez
697afaa2cc fix: add missing dos2unix dependency 2019-08-05 12:44:34 -04:00
Jose Diaz-Gonzalez
78a5e4d331 docs: document copying files from images 2019-08-05 11:40:53 -04:00
Jose Diaz-Gonzalez
1a322eeeb8 refactor: use copy_from_image helper for copying CHECKS files
Closes #3611
2019-08-05 11:40:53 -04:00
Jose Diaz-Gonzalez
7dbeffd041 chore: drop unnecessary stdout redirect to /dev/null 2019-08-05 11:40:53 -04:00
Jose Diaz-Gonzalez
8dbf855d56 feat: handle case where docker cp is run as non root and tries to chown the file
This _may_ be cargo-cult, but its an easy way to handle any potential issues, so we'll include it regardless.
2019-08-05 11:40:53 -04:00
Jose Diaz-Gonzalez
dc9d597cd8 feat: handle case where file may not have trailing newline and parsing depends on it 2019-08-05 11:40:53 -04:00
Jose Diaz-Gonzalez
f771b272e3 fix: handle case where file may have windows newlines
Closes #3611
2019-08-05 11:40:53 -04:00
Jose Diaz-Gonzalez
6c8f716c11 refactor: handle case copied file is not directly readable
If "docker cp" is run within docker, it seems the owner is root, resulting in other processes not being able to directly read the file without resorting to `cat` trickery. Doing this in a single place avoids the problem completely.
2019-08-05 11:40:53 -04:00
Jose Diaz-Gonzalez
d326c17dfb chore: standardize on writing to file versus a destination 2019-08-05 11:40:53 -04:00
Jose Diaz-Gonzalez
0567bfd65d Merge pull request #3627 from dokku/3474-synchronous-image-removal
Make image removal synchronous
2019-08-05 11:38:49 -04:00
Jose Diaz-Gonzalez
008fafbed8 fix: force image pruning 2019-08-03 14:21:34 -04:00
Jose Diaz-Gonzalez
c959b236ea fix: do not prune all unused images
This would impact base images related to image building, as well as other images not managed by Dokku directly.
2019-08-02 11:38:08 -04:00
Jose Diaz-Gonzalez
85b41121de fix: make image removal synchronous
Asynchronous image removal would remove intermediate build images during the build process, causing intermittent build failures for users of multi-stage dockerfiles. While we still remove intermediate docker images that may be used in the current build, we now do so during the deploy, ensuring that there are no intermediate build failures in the future.

Closes #3474
2019-08-02 11:21:51 -04:00
Jose Diaz-Gonzalez
7de242b4ee Merge pull request #3630 from dokku/3592-notify-on-bad-branch
Fix issue where push warning on bad branch was skipped
2019-08-02 11:20:46 -04:00
Jose Diaz-Gonzalez
27ed3c52e3 Merge branch 'master' into 3592-notify-on-bad-branch 2019-08-02 11:20:37 -04:00
Jose Diaz-Gonzalez
c4c278fbcb Merge pull request #3629 from dokku/faster-execution
Avoid calling the user-auth trigger where possible
2019-08-02 11:20:26 -04:00
Jose Diaz-Gonzalez
5f4f12c27f fix: add run as prefix to deploy_app 2019-08-01 20:54:56 -04:00
Jose Diaz-Gonzalez
5000c32efe fix: add test for warning on pushing to wrong branch
Closes #3592
2019-08-01 20:54:38 -04:00
Jose Diaz-Gonzalez
5b53994447 feat: avoid calling the user-auth trigger where possible
As this trigger is always in the execution path, `plugn` starts and expensively checks to see if it can execute the trigger. Rather than call this on every invocation, skip the trigger if no non-core implementation exists.
2019-08-01 20:18:14 -04:00
Jose Diaz-Gonzalez
ba5b5d4596 Merge pull request #3626 from dokku/builder-plugins
Builder plugins
2019-08-01 18:17:09 -04:00
Jose Diaz-Gonzalez
a17a0e9a82 feat: add the ability to modify the DOKKU_IMAGE in use for the herokuish builder
This is a "one-shot" ability, meaning that it is highly discouraged for multiple plugins to implement the triggers.

The `builder-create-dokku-image` trigger is meant to modify the base DOKKU_IMAGE that will be used to build an application. A good use of the hook is to inject system packages by:

- calculating an image tag from the set of system packages
- checking that the image doesnt already exist
- creating the image if it does not

As the output is sent to stdout, we have to find an alternative way of fetching the new DOKKU_IMAGE. The `builder-dokku-image` trigger can output an image tag based on the calculated image tag. If no tag is output, then the DOKKU_IMAGE is used as is.

Using this pattern, users can efficiently modify the base image in use for an app without duplicating the work on every push. This is especially useful for package installation, where packages are required for app building, but may take a long time and can be error prone.
2019-07-30 14:58:49 -04:00
Jose Diaz-Gonzalez
0a8d5eb744 refactor: add initial support for builder plugins
A builder plugin implements some method for 'building' artifacts from a given source code archive. This refactor moves the majority of the image building code into separate plugins, allowing us to implement other builders, but also simplifying the common pugin codebase.

Also move the pre-build-buildpack hook from the build-env plugin to builder-herokuish.
2019-07-30 14:42:30 -04:00
Jose Diaz-Gonzalez
af8ade0a09 Merge pull request #3625 from dokku/josegonzalez-patch-1
Remove old reference to SPONSORS.md
2019-07-30 10:43:19 -04:00
Jose Diaz-Gonzalez
b3ba600cf8 docs: remove old reference to SPONSORS.md
Anyone wishing to sponsor should do so on Patreon or OpenCollective.

[ci skip]
2019-07-30 10:42:54 -04:00
Jose Diaz-Gonzalez
ce98222eec Merge pull request #3599 from dokku/3515-better-cleanup
Scope docker-cleanup to specific app
2019-07-29 21:37:54 -04:00
Jose Diaz-Gonzalez
6836e56b24 refactor: add global docker build and run args
This reduces duplication and allows users to rely on global arguments to generate most labels needed.

The 'commit' command cannot have global arguments because the whitespace within the label change breaks string-based interpolation, and shell arrays cannot be exported.
2019-07-20 05:52:20 -04:00
Jose Diaz-Gonzalez
193e40b4c3 feat: scope cleanup to app when specified
This will require changes in community plugins to properly add the specified labels to intermediate containers.

Closes #3515
2019-07-19 15:45:43 -04:00
Jose Diaz-Gonzalez
d1af10fc51 feat: add labels to all build, commit, create, and run docker calls
This will allow us to further filter containers and images by application when cleaning up containers.

Refs #3515
2019-07-19 15:45:43 -04:00
Jose Diaz-Gonzalez
968543c66c Merge pull request #3619 from dokku/josegonzalez-patch-1
Cleanup plugin creation docs
2019-07-19 15:45:32 -04:00
Jose Diaz-Gonzalez
da27ab3d40 docs: cleanup plugin creation docs
The plugin creation docs were hard to follow, unnecessarily complicating issues for developers. The new format should make the recommendations clear, and align examples with the core code.

[ci skip]
2019-07-19 15:31:44 -04:00
Jose Diaz-Gonzalez
034ebff42a Merge pull request #3589 from dokku/1076-run-in-docker
Allow running Dokku in Docker
2019-07-18 02:44:43 -04:00
Jose Diaz-Gonzalez
11241e5003 fix: add missing cgroupfs-mount 2019-07-18 01:15:44 -04:00
Michael Hobbs
b8c2259775 test docker image 2019-07-18 00:28:48 -04:00
Michael Hobbs
1437b77c6c run tests against native dokku 2019-07-18 00:28:48 -04:00
Michael Hobbs
ded056d003 hack: use tmp file for CHECKS file without EOF newline 2019-07-18 00:27:09 -04:00
Michael Hobbs
8830e15526 use custom docker bin 2019-07-18 00:27:09 -04:00
Michael Hobbs
67bdd47015 wait for CI dokku container to startup 2019-07-18 00:27:09 -04:00
Michael Hobbs
e8382362e5 remove tests/dhparam.pem dockerignore exception 2019-07-18 00:27:09 -04:00
Michael Hobbs
7de68e7052 remove unnecessary CI env vars 2019-07-18 00:27:09 -04:00
Michael Hobbs
f723333a90 don't run shfmt in CI 2019-07-18 00:26:31 -04:00
Michael Hobbs
d8ada6a6e9 install dokku from built deb package and use docker image for integrations tests 2019-07-18 00:26:31 -04:00
Michael Hobbs
1f882d09bf fix port typo 2019-07-18 00:24:24 -04:00
Jose Diaz-Gonzalez
ecfb54c668 refactor: switch to /mnt/dokku 2019-07-18 00:24:24 -04:00
Jose Diaz-Gonzalez
7aeb17986a docs: clarify usage of docker-based installation
ssh-key addition wasn't previously scoped out.
2019-07-18 00:24:24 -04:00