1
0
mirror of https://github.com/pi-hole/docker-pi-hole.git synced 2024-06-27 03:35:09 +02:00
Commit Graph

189 Commits

Author SHA1 Message Date
Christian König
f31b4694c8
Delimter for array type FTLCONF_ values is ;
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-10-29 20:55:41 +00:00
Adam Warner
5c7ff5c539
TARGETPLATFORM needs to be set
Co-authored-by: yubiuser <ckoenig@posteo.de>
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2023-10-22 22:14:31 +01:00
Adam Warner
b8a717f925
Re-do tests to account for FTLCONF_ changes. Add new tests for web password
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2023-10-22 17:42:29 +01:00
Adam Warner
374f6f2537
Add in a test to kill start.sh and then ensure that pihole-FTL is gracefully exited.
We add in some sleeps to ensure that the log file is being written to before we check it
Log entry tests are based on many different passes of running this locally with all sorts of timeouts and sleeps, this seems to be the most consistent

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2023-08-09 23:31:39 +01:00
Adam Warner
b41d50b94f
Remove volume mount from tests, this causes issues with gravity not being able to read an adlist file symlinked to /dev/null
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2023-08-09 22:57:35 +01:00
Adam Warner
b56b8d03c4
black formatted some tests
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2023-08-09 21:18:10 +01:00
Adam Warner
f09b0d68bb
Add tests for UID/GID switching
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2023-07-26 08:31:29 +01:00
Adam Warner
4c8f4613dd
test names should match the regular expression ^[a-z_][a-z0-9_]*$. Apparently
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2023-07-24 18:37:46 +01:00
Adam Warner
1202dafcbd
Change test dockerfile base to docker:24.0.4-cli-alpine3.18 rather than copying in, buildx would not work the other way.
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2023-07-24 18:37:37 +01:00
Adam Warner
3208c4042d
Strip out no longer relevant tests/test fixtures (persist_docker, for example has not been used in a long time) , begin building test library from ground up.
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2023-07-24 18:11:33 +01:00
Adam Warner
6b5332be47
- Change test dockerfile base to alpine, too (Alpine all the things!)
- Tweak build-and-test.sh to allow tests to run against more platforms using buildx
- Split GHA out into two seperate files. One for tests on pull requests, another for build and merge on push to `development-v6` (add other branches in later)

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2023-07-24 18:11:33 +01:00
Nathan Gaberel
54d179c24b
Bind lighttpd to $WEB_BIND_ADDR by default.
Signed-off-by: Nathan Gaberel <nathan@gnab.fr>
2023-01-21 18:06:05 -08:00
RD WebDesign
8872c2b393
Fix config filename on the test
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2023-01-15 17:50:28 -03:00
Adam Warner
b723874623
Don't need to see all the images on the system
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2023-01-06 18:57:09 +00:00
Daniel
4da66313f4
Remove old test dependencies, updated ones still being used. Introduce Black formatter 2022-09-17 04:28:01 +00:00
Adam Warner
97f81bae21
Shuffle some files around, change dependencies to make output clearer, change ::: for [i] to further clarify output.
Allow for  PH_VERBOSE to set -x on all scripts that it would be useful for

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-08-29 13:17:22 +01:00
Adam Warner
473117e8a8
Rename start and gravity scripts to match their service names
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-08-29 11:50:19 +01:00
Adam Warner
e6d4c3091f
Move all scripts to /usr/local/bin to simplify dockerfile
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-08-29 11:48:07 +01:00
Adam Warner
cbd86caa5b
Merge pull request #1170 from pi-hole/dependabot/pip/urllib3-1.26.5
Bump urllib3 from 1.25.9 to 1.26.5
2022-08-25 21:50:26 +01:00
Adam Warner
cb38190b50
FTLCONF_REPLY_ADDR4/6 are now deprecated. Use FTLCONF_LOCAL_IPV4/6 instead
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-08-22 21:42:29 +01:00
dependabot[bot]
33966f8eb2
Bump urllib3 from 1.25.9 to 1.26.5
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.25.9 to 1.26.5.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.25.9...1.26.5)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-21 19:32:22 +00:00
Adam Warner
e75e3800a2
make sure that setup_FTL_ProcessDNSSettings is the last thing called, else user set environment variables will be overridden when it sources setupVars.conf
Some additional tweaks
2022-07-19 18:22:49 +01:00
Adam Warner
1d59f257ff
Reorganise the repository
Simplify the test suite now that we use buildx to build the final image
Remove tests that were never run/skipped in previous runs (same number of tests passing as were before)

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-07-15 17:43:09 +01:00
Adam Warner
611df9b3f0
Huge tidy up/prune/refactor of the code
- Moves most code in start.sh into functions in bash_functions.sh
- Removes code from 20-start.sh and moves it inside start.sh
- Removes unused variables and code, making it easier to find our way around
- Removes dependency on webpage.sh, which had to be modified in order to source it properly (thus breaking pihole checkout), use utils.sh instead
- Replaces all uses of ServerIP/v6 with new FTLCONF_REPLY_ADDR4/6 variables
- No need to symlink echo to whiptail any more (probably hasn't been needed for a while)
- removes huge list of exported env vars at the top of start.sh - no longer appear to be needed
- rename some functions in bash_functions to more logical names, group their usages in start.sh
- adjust/fix tests to match changes
- remove some dead tests

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-07-11 23:50:05 +01:00
Adam Warner
f17898bf6f
Also account for /var/log/lighttpd file name changes
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-06-12 13:37:39 +01:00
Adam Warner
cb16942096
Address Sonar rules S125 (https://rules.sonarsource.com/python/RSPEC-125) and S1481 (https://rules.sonarsource.com/python/RSPEC-1481)
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-06-06 22:04:44 +01:00
Adam Warner
29f81fcfbc
Address Sonar rule S1192 (https://rules.sonarsource.com/python/RSPEC-1192)
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-06-06 21:58:09 +01:00
Adam Warner
b3717000ae
Address Sonar rules S117 (https://rules.sonarsource.com/python/RSPEC-117) and S1542(https://rules.sonarsource.com/python/RSPEC-1542) in all test .py files
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-06-06 21:26:47 +01:00
Adam Warner
64e449c133
fix [this code smell](https://sonarcloud.io/project/issues?pullRequest=1106&issues=AYE6byrIbM3H9G6ifn9K&open=AYE6byrIbM3H9G6ifn9K&id=pi-hole_docker-pi-hole)
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-06-06 20:26:26 +01:00
Adam Warner
6b9a4e6216
Fix up tests to work with new logic
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-06-06 20:14:26 +01:00
Adam Warner
ad9d7cb710
Merge pull request #1084 from lightswitch05/feature/update-default-debian-to-bullseye
Update default debian to bullseye. Update README to describe docker tags.
2022-05-04 18:20:26 +01:00
Daniel
08627a1ba7
Update everything to use bullseye as the default debian version 2022-05-02 22:36:59 -04:00
Daniel
f1c5662265
Minor bugfixes per SonarCloud results 2022-05-02 21:44:33 -04:00
Adam Warner
e1dc289d7d
Fix suggested spelling mistakes
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-04-22 17:41:29 +01:00
Adam Warner
4cc3587084
adjustment to custom interface tests to reflect new default behaviour in https://github.com/pi-hole/pi-hole/pull/4509
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2022-01-05 22:47:16 +00:00
Phill
b0a5a0f163
Trailing slashes on volumes fail on newer versions of docker-compose (#949)
* Trailing slashes on volumes fail on newer versions of docker-compose

See [Issue 947](https://github.com/pi-hole/docker-pi-hole/issues/947)
for the background.

This PR proposes removing trailing slashes from all documentation,
examples and scripts.

Signed-off-by: Phill Kelley <pmk.57t49@lgosys.com>
2021-12-11 13:37:18 +00:00
Adam Warner
9a9ee41a45
- Replace PIHOLE_VERSION with PIHOLE_DOCKER_TAG
- reorder some stuff in the main Dockerfile
- Remove the CORE/WEB/FTL_VERSION args/env vars
- tweaks to GHA build script after some hints from @crazy-max
- always checkout dev versions of Pi-hole for nightly build, also make sure we're using dev branch of this repo
- keep pihole checkout enabled for dev and nightly tags

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-12-10 20:51:35 +00:00
Adam Warner
155d87f8c1
add a skip directive to test_volume_shell_script, as I can't work out how to fix it just yet...
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-09-12 14:24:50 +01:00
Adam Warner
6cec6f937f
Bring GIT_TAG into the build environment for use as PIHOLE_VERSION in the container.
Remove the `pihole/pihole:` part of the PIHOLE_TAG in the python script (see #920)

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-09-12 14:16:45 +01:00
Adam Warner
918e6b1a21
convert / to - in FTL_VERSION so that image name is valid
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2021-07-04 21:46:45 +01:00
Daniel
6b1765c638
Single pihole version file. Added 'python-dotenv' to parse for the VERSIONS file.
Signed-off-by: Daniel <daniel@developerdan.com>
2021-06-04 19:37:28 +00:00
jparenas
73378d1231 Add CUSTOM_CACHE_SIZE environment variable to the available options
Signed-off-by: jparenas <juan.p.arenas1@gmail.com>
2021-05-08 16:11:57 -05:00
static-void-main
6292fd1294 Add i386 arch
Signed-off-by: static-void-main <33235498+static-void-main@users.noreply.github.com>
2021-04-15 00:15:31 +02:00
Daniel
a779c7fc37
Make the default debian version buster, preserve the 'stretch' tag for those who need it.
Signed-off-by: Daniel <daniel@developerdan.com>
2020-09-28 17:12:03 -04:00
Daniel
752d83aeaa
Introduce additional docker tags for the debian version.
* Added new docker tag variations to specify the debian version ('stretch', and 'buster').
* Arch images are alway as specific as possible: pihole/pihole:master-amd64-stretch
* Multiarch images have both the specific debian version tags as well as the generic non-debian tags: pihole/pihole:master-stretch & pihole/pihole:master
* Currently, the non-specific tags point to the 'stretch' images. Eventaully it can be migrated to 'buster'.
* Use GitHub actions to do the builds. Although the script names include 'gh-actions' to differentiate them from the 'circle' scripts, there is zero logic that is specific to Github (ie. no Github environment variables).
* 'armhf:buster' & 'arm64:buster' has an issue with `ip route get`. I think the issue is related to 'qemu', but I'm not sure. Update the `validate_env` function to only use `ip route get` if `nc` reports something strange.

Signed-off-by: Daniel <daniel@developerdan.com>
2020-06-29 09:34:19 -04:00
Adam Hill
3b8227c29d
Make image a parameter to allow running with any image 2020-06-03 08:34:28 -05:00
Adam Hill
022b039718 added remove + recreate container test
Signed-off-by: Adam Hill <adam@diginc.us>
2020-06-02 12:27:09 -05:00
Adam Hill
765eccea22 Merge branch 'dev' of github.com:diginc/docker-pi-hole into new_volume_test_base
Signed-off-by: Adam Hill <adam@diginc.us>
2020-06-02 08:21:48 -05:00
Adam Hill
9213bbd322 Merge branch 'dev' of github.com:diginc/docker-pi-hole into no_resolv_check
Signed-off-by: Adam Hill <adam@diginc.us>
2020-05-30 18:03:05 -05:00
Adam Hill
5b75953d91 New bash integration style test for volume data
Signed-off-by: Adam Hill <adam@diginc.us>
2020-05-30 18:01:43 -05:00