140 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
9d603e1a45 fix: use real path when extracting files 2026-01-04 20:46:00 -05:00
Jose Diaz-Gonzalez
3a476716eb tests: allow specifying 'at least 1 occurrence' for assert_output_contains 2025-12-25 18:29:02 -05:00
Jose Diaz-Gonzalez
0c8cfe9a48 Merge pull request #8135 from dokku/8093-client-remote-parsing 2025-11-20 03:35:23 -05:00
Jose Diaz-Gonzalez
67962ad527 tests: move helper to client.bats 2025-11-20 02:20:35 -05:00
Jose Diaz-Gonzalez
d94bc733c9 feat: allow overriding the TMP directory in setup_client_repo 2025-11-20 02:20:35 -05:00
Jose Diaz-Gonzalez
a21ee6f216 tests: make it clearer what happened when assert_output_contains fails 2025-11-20 02:20:35 -05:00
Jose Diaz-Gonzalez
6b67d5c59b tests: do not modify the existing app.json via jq
The jq binary doesn't support jsonc, so we can't modify it for testing purposes. Instead, just create an app.json with the correct heroku.postdeploy task.
2025-11-20 00:44:26 -05:00
Jose Diaz-Gonzalez
ff8ccd2801 tests: add tests for functionality 2025-11-16 18:01:20 -05:00
Jose Diaz-Gonzalez
3f5a022970 tests: force remove the file to silence warnings 2025-11-16 18:00:40 -05:00
Jose Diaz-Gonzalez
cba345025c feat: add a Railpack builder to Dokku
Closes #7615
2025-11-09 20:21:09 -05:00
Jose Diaz-Gonzalez
869f9a0346 feat: allow specifying a custom app label alias when shipping logs via vector
Closes #7354
2025-01-03 23:38:20 -05:00
Jose Diaz-Gonzalez
9490034412 tests: update tests for cnb builder 2024-09-29 00:04:58 -04:00
Jose Diaz-Gonzalez
03102cd681 tests: ensure pack binary is installed correctly when running tests in a devcontainer 2024-09-28 22:30:09 -04:00
Jose Diaz-Gonzalez
6d07fea704 fix: correct expansion issue 2024-03-13 22:21:05 -04:00
Jose Diaz-Gonzalez
ca55f58446 refactor: move plugin test helper functions to test_helper.bash 2024-03-13 22:21:05 -04:00
Jose Diaz-Gonzalez
d2b167d6ad Merge pull request #6681 from dokku/k3s-ingress-per-domain
Migrate to single ingress per app/domain combination
2024-03-12 22:22:45 -04:00
Jose Diaz-Gonzalez
c840fc5f9e feat: wait until helm charts are installed before marking a deploy as failed or completed
This ensures applications are actually up vs giving a false sense of security to users about the state of their applications.
2024-03-12 08:39:22 -04:00
Jose Diaz-Gonzalez
a90c441095 tests: run tests with a specified server ip 2024-03-12 06:30:21 -04:00
Jose Diaz-Gonzalez
25469845e1 fix: correct testcase for metabase deploy 2024-03-12 05:06:36 -04:00
Jose Diaz-Gonzalez
2a21524a4a tests: split out k3s tests to speed up ci 2024-03-06 19:02:53 -05:00
Jose Diaz-Gonzalez
fe6a0f796e feat: add support for nixpacks as a builder
Closes #5338
2023-10-15 20:25:09 -04:00
Jose Diaz-Gonzalez
71214be1bd fix: ensure app clones have domains setup
Closes #6146
2023-08-27 23:00:18 -04:00
Jose Diaz-Gonzalez
625ea14c8f feat: add openresty proxy implementation
This plugin is mostly compatible with the nginx plugin, but runs the proxy within a docker container. Users do not have direct access to add custom openresty configuration at this time, but instead receive the ability to setup automatic ssl on first request via letsencrypt integration.
2023-08-05 20:59:01 -04:00
Jose Diaz-Gonzalez
5846301a48 tests: make it possible to specify an alternative base domain for tests
When developing Dokku, it is useful to use a real domain to test actual functionality. This is impossible if the domain is hardcoded to dokku.me in testing.
2023-08-05 20:58:26 -04:00
Jose Diaz-Gonzalez
f8ccf52079 refactor: only use detected port mapping if override is not specified
Previously, we would always set the port mapping during a dockerfile build, making it difficult for users to override mappings. We also only _sometimes_ updated the detected port mapping, further confusing issues when users were migrating from Dockerfile to Buildpacks for builds.

Now, we always detect the port mapping during the build process, and only use that detected port mapping if an override is not specified. This greatly simplifies the experience around port mapping, as now a user can create an app, set a port mapping, and that first deploy will respect the port mapping without an additional deploy.

The builder always has the best context for what the app should be listening on, and thus we can always specify a "default" port mapping at this stage. Users can override this map as desired later.

This change also results in the removal of a ton of internal code that is now centralized in the ports plugin.

Closes #4067
2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
622548057c tests: add assertions to various bats tests
Missing these assertions didn't necessarily break tests but they are more correct and having them should help suss out bugs.
2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
1467aaea74 tests: fix issue where networks weren't being torn down during testing
Due to how the variable was assigned, there were cases where the network was specified twice with a := as a delimiter. This would result in no network being removed.
2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
5717e71755 tests: use an alternative curl request to ensure requests go to the local nginx
The alternative is to rely on DNS and /etc/hosts rules, which isn't quite great because it requires modifying the system.
2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
4bc3de5540 feat: write auto-detected port mappings during a deploy
During an app build, we now auto-detect ports based on the source code. This is usually http:80:5000, with Dockerfile-based deploys having their ports extracted from the docker image or Dockerfile. Additionally, we add an https:443 mapping for any detected http:80 mapping when there is an ssl certificate, and all http port mappings are transformed to https mappings for Dockerfile-based deploys.

While the ports aren't currently consumed, a future refactor will provide the ability to fallback to the new detected ports when there is no user-specified port mapping.
2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
11d9ed6724 tests: use ports:report to get the list of port mappings 2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
ef25a9b0d8 refactor: standardize on shorthand for redirecting all output to /dev/null
The shorthand is more prevalent in this codebase, and is something that bash supports, so we should just use the same thing everywhere.

Note that we do not use shorthand redirect in Makefile as shell parsing is a bit different in Make and the shorthand redirect doesn't seem to be properly supported, causing CI errors.
2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
dac566e75e refactor: move all shellcheck disable definitions to .shellcheckrc file
This makes standard use of shellcheck work without needing to provide extra configuration anywhere.

Also remove use of inline 'shellcheck disable' calls that are already defined in the .shellcheckrc and don't need to be set inline.
2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
40b20e0c08 refactor: move herokuish app cache from the filesystem into a docker volume
This simplifies cache referencing and also paves the way for removing more from the app git directory.

Refs #1558
2023-08-05 10:35:54 -04:00
Jose Diaz-Gonzalez
35c6d61a04 feat: test all compose-based proxy implementations with a dockerfile app
This allows the tests to run on arm systems.
2023-02-11 06:09:50 -05:00
Jose Diaz-Gonzalez
e103d9b11b chore: suppress warnings about default branch 2023-01-16 01:39:59 -05:00
josegonzalez
fa34f89901 Merge pull request #5560 from dokku/drop-spdy
Drop SPDY support from nginx plugin
2023-01-15 11:43:32 -05:00
Jose Diaz-Gonzalez
eeb2e69044 fix: only create the test app if it doesn't exist for tls tests 2023-01-11 00:55:47 -05:00
Jose Diaz-Gonzalez
93279b884a tests: create the app before extracting tls data during tests 2023-01-10 02:09:33 -05:00
Jose Diaz-Gonzalez
ca1ab188fe chore: drop SPDY
This hasn't been supported by browsers in quite a while and nginx will set a warning as of Ubuntu 20.04 when the header is referenced.
2022-12-29 01:59:54 -05:00
Jose Diaz-Gonzalez
a2cc6b84d6 fix: use assert_output_contains so as not to worry about order 2022-12-02 10:47:40 -05:00
Jose Diaz-Gonzalez
edd6e476b3 refactor: simplify how url generation works
The URLS file is no longer necessary as urls are now generated directly from the app VHOST file.

This also moves all the url generation logic to the domains plugin.
2022-12-02 02:19:59 -05:00
Jose Diaz-Gonzalez
d18cb3766c fix: correct tests for new domain initialization method 2022-12-01 22:39:38 -05:00
Jose Diaz-Gonzalez
4ef260f57a fix: ignore https mappings when no ssl certificate exists
This fixes issues where users may somehow add an https mapping but are missing an ssl certificate, causing nginx to not load properly. We now ignore the mapping and warn users of the misconfiguration.

Closes #5368
2022-10-22 17:47:54 -04:00
Jose Diaz-Gonzalez
2d180f5e0f tests: remove extra call to list apps 2021-09-16 00:26:11 -04:00
Jose Diaz-Gonzalez
d83471bd46 fix: do not delete devcontainers when running tests in a docker container 2021-09-16 00:26:11 -04:00
Jose Diaz-Gonzalez
d9204083f7 fix: install pack
Also move the installation into a helper method.
2021-08-12 22:07:53 -04:00
Jose Diaz-Gonzalez
a1c768b9b3 refactor: drop web installer in favor of setup via cli
This makes the installation a bit more secure by ensuring a user does not accidentally expose a way for unauthorized users to add new ssh keys to the system.

Additionally, this removes the extra HOSTNAME file to make the initial install process easier (that file was not modifiable by any dokku commands.

Closes #2247
2021-08-07 16:36:41 -04:00
Jose Diaz-Gonzalez
52a88d63ad tests: fix postdeploy test 2021-02-28 14:39:16 -05:00
Jose Diaz-Gonzalez
f98e7702fb feat: implement heroku's postdeploy deployment task
This occurs during the postdeploy on the first deploy of an app, mimicking heroku. It currently happens _after_ the `postdeploy` and `release` deploy tasks.
2021-02-28 04:51:42 -05:00
Jose Diaz-Gonzalez
669259eace tests: just skip the issue 2021-02-13 05:05:57 -05:00