Commit Graph

2438 Commits

Author SHA1 Message Date
Adam Warner
4f16f4fe73 Merge pull request #2025 from SirRGB/development
docs: update capability documentation links
2026-04-04 16:03:58 +01:00
SirRGB
d704d2482e docs: update capability documentation links
Signed-off-by: SirRGB <sirrgb@proton.me>
2026-04-04 15:47:57 +02:00
Adam Warner
c545a259c8 Merge pull request #2024 from pi-hole/master
Sync master back into development
2026-04-03 18:15:16 +01:00
Adam Warner
efe4c7fc1f Merge pull request #2023 from pi-hole/development
dev -> master
2026.04.0
2026-04-03 18:14:24 +01:00
Adam Warner
48b3799511 Merge pull request #2022 from pi-hole/1.5.0
Update github-builder to v1.5.0 and enable fail-fast
2026-04-02 20:44:26 +01:00
yubiuser
e41cc38764 Update github-builder to v1.5.0 and enable fail-fast
Signed-off-by: yubiuser <github@yubiuser.dev>
2026-04-02 21:41:26 +02:00
Adam Warner
082bb8cf82 Merge pull request #2021 from crazy-max/publish-on-pr
ci: run build job on pull request event
2026-04-01 23:09:06 +01:00
CrazyMax
57bafd6d0b ci: run build job on pull request event
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-04-01 23:44:27 +02:00
CrazyMax
ea45c8be7d ci: simplify test job
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-04-01 23:40:28 +02:00
Adam Warner
8935ed3556 Merge pull request #2020 from pi-hole/no-sign
Don't sign images as it spams GHCR with sha*-tags
2026-04-01 22:25:31 +01:00
Adam Warner
a856b717d4 Merge pull request #2015 from pi-hole/claude-review
Various AI inspired code changes (And MOAR TESTS)
2026-04-01 22:11:16 +01:00
Adam Warner
9fc8cd3229 test: expand Docker container test coverage
Add tests for areas of container behaviour not previously exercised:

- crond is running (not just that the crontab file is valid)
- Logrotate config is installed at /etc/pihole/logrotate
- Default DNS upstreams (8.8.8.8/8.8.4.4) applied when none configured
- Web interface accessible at /admin/ (default port and custom port)
- /pihole.docker.tag build metadata file is present
- macvendor.db is present and configured in FTL
- FTL is running as the pihole user (validates DNSMASQ_USER default)
- Capabilities are applied to pihole-FTL (validates fix_capabilities)
- WEBPASSWORD_FILE reads the web password from a Docker secret

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2026-03-30 22:24:44 +01:00
Adam Warner
acd1cf7014 refactor: move container lifecycle management into BATS test files
Container creation, waiting, and teardown previously lived in run.sh
and were passed to test_suite.bats via exported environment variables.
This scattered container lifecycle between two files and required
custom inline logic for tests that needed their own container.

Replace test_suite.bats with two focused files, each owning their
container via setup_file/teardown_file:

- test_default.bats: plain container; covers FTL binary, cron,
  password generation, and graceful shutdown (run last, sequentially)
- test_env_vars.bats: custom UID/GID, FTLCONF_ vars, ADDITIONAL_PACKAGES,
  and TAIL_FTL_LOG=0 all exercised in a single container

Extract start_container and wait_for_log into test/helpers.sh, which
each .bats file loads directly. run.sh now only builds the image,
installs BATS, and invokes the test files.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2026-03-30 22:08:23 +01:00
Adam Warner
1f356d2939 refactor: replace eval with bash array in build.sh
Building a command string and calling eval is harder to reason about
and requires careful manual quoting. Replacing with a bash array makes
each argument explicit and removes the fragile string substitution
previously used to toggle --no-cache and update the tag value.

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 21:25:59 +01:00
Adam Warner
b5826b60a8 test: add coverage for ADDITIONAL_PACKAGES and TAIL_FTL_LOG
- Add CONTAINER_PACKAGES shared container (ADDITIONAL_PACKAGES=wget)
  and a test that verifies the package is installed and on PATH
- Add inline container test for TAIL_FTL_LOG=true, verifying that
  FTL log lines tagged [FTL] appear in docker logs output

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 21:25:58 +01:00
Adam Warner
a2cc9b9b2a fix: log error if crontab install fails in start_cron()
Previously a malformed or unreadable crontab would silently fail,
leaving gravity updates and the update checker permanently disabled
with no indication in the logs. Now logs a clear error message.

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 21:25:58 +01:00
yubiuser
9a90512ef7 Don't sign images
Signed-off-by: yubiuser <github@yubiuser.dev>
2026-03-30 20:40:11 +02:00
yubiuser
8656758446 Add some logging output to BATS
Signed-off-by: yubiuser <github@yubiuser.dev>
2026-03-30 18:40:02 +01:00
Adam Warner
f6586551c6 Merge pull request #2018 from pi-hole/copilot/update-bats-tests-based-on-feedback
Use bats-assert library functions in BATS test suite
2026-03-30 12:03:37 +01:00
Adam Warner
b1ef8b1bab Apply suggestion from @PromoFaux
Signed-off-by: Adam Warner <github@adamwarner.co.uk>
2026-03-30 11:36:05 +01:00
copilot-swe-agent[bot]
43dfcdd253 Use bats-assert functions in BATS test suite
Agent-Logs-Url: https://github.com/pi-hole/docker-pi-hole/sessions/a7bafe62-d413-4878-8d02-520f208d2812

Co-authored-by: PromoFaux <1998970+PromoFaux@users.noreply.github.com>
2026-03-30 10:25:18 +00:00
copilot-swe-agent[bot]
e2b3725537 Initial plan 2026-03-30 10:22:45 +00:00
Adam Warner
2bc31ae365 Merge pull request #2011 from RynoCODE/master
Add timeout to curl command in branch validation
2026-03-29 14:01:56 +01:00
Adam Warner
d7794c3acf Merge branch 'development' into master 2026-03-29 14:00:18 +01:00
Adam Warner
e611c5733c DOn't need the pip dependabot check anymorte
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2026-03-29 13:39:24 +01:00
Adam Warner
96affb15d0 Merge pull request #2009 from pi-hole/use-bats
Replace Python test suite with BATS and consolidate workflows
2026-03-29 13:36:09 +01:00
Adam Warner
2f6f07d8ee Further tweaks following review from @Copilot
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2026-03-29 13:30:52 +01:00
Adam Warner
11f2b7b5c8 -p doesn't work in github actions runner...
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2026-03-29 12:16:29 +01:00
Adam Warner
522ddca96e ci: replace Python test suite with BATS and consolidate workflows
Replace the pytest/testinfra/tox test stack with BATS, aligning with
the approach used in the FTL repository.

- Merge build-and-test.yml into build-and-publish.yml; the combined
  lint+test job now runs on pull_request via a single bash test/run.sh
  call, removing the need for Python/tox in CI
- Replace Python test files with test/run.sh and test/test_suite.bats
- test/run.sh handles image build, BATS install, container lifecycle,
  and cleanup via trap in one place
- Containers consolidated from 6 to 2 (CONTAINER_DEFAULT and
  CONTAINER_CUSTOM), removing tests that belong to FTL's own suite
- Tests now focus on Docker-specific behaviour: entrypoint, signal
  handling, UID/GID mapping, cron setup, and password assignment

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2026-03-29 12:16:26 +01:00
RynoCODE
71d8898007 Merge branch 'development' into master 2026-03-29 11:11:32 +05:30
yubiuser
f33e531047 Merge pull request #2013 from pi-hole/dependabot/pip/test/development/tox-4.51.0
Bump tox from 4.50.3 to 4.51.0 in /test
2026-03-28 13:53:40 +01:00
dependabot[bot]
f51beef613 Bump tox from 4.50.3 to 4.51.0 in /test
Bumps [tox](https://github.com/tox-dev/tox) from 4.50.3 to 4.51.0.
- [Release notes](https://github.com/tox-dev/tox/releases)
- [Changelog](https://github.com/tox-dev/tox/blob/main/docs/changelog.rst)
- [Commits](https://github.com/tox-dev/tox/compare/4.50.3...4.51.0)

---
updated-dependencies:
- dependency-name: tox
  dependency-version: 4.51.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-28 12:49:50 +00:00
yubiuser
1a52422779 Merge pull request #2012 from pi-hole/dependabot/github_actions/development/editorconfig-checker/action-editorconfig-checker-2.2.0
Bump editorconfig-checker/action-editorconfig-checker from 2.1.0 to 2.2.0
2026-03-28 13:48:25 +01:00
dependabot[bot]
933a82e5cc Bump editorconfig-checker/action-editorconfig-checker
Bumps [editorconfig-checker/action-editorconfig-checker](https://github.com/editorconfig-checker/action-editorconfig-checker) from 2.1.0 to 2.2.0.
- [Release notes](https://github.com/editorconfig-checker/action-editorconfig-checker/releases)
- [Commits](4b6cd6190d...840e866d93)

---
updated-dependencies:
- dependency-name: editorconfig-checker/action-editorconfig-checker
  dependency-version: 2.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-28 10:02:30 +00:00
RynoCODE
fbda8b706f Add timeout to curl command in branch validation
Signed-off-by: GitHub <noreply@github.com>
2026-03-28 05:08:06 +00:00
yubiuser
f40963c54e Merge pull request #2010 from pi-hole/dependabot/pip/test/development/tox-4.50.3
Bump tox from 4.49.1 to 4.50.3 in /test
2026-03-21 14:13:46 +01:00
dependabot[bot]
292e725423 Bump tox from 4.49.1 to 4.50.3 in /test
Bumps [tox](https://github.com/tox-dev/tox) from 4.49.1 to 4.50.3.
- [Release notes](https://github.com/tox-dev/tox/releases)
- [Changelog](https://github.com/tox-dev/tox/blob/main/docs/changelog.rst)
- [Commits](https://github.com/tox-dev/tox/compare/4.49.1...4.50.3)

---
updated-dependencies:
- dependency-name: tox
  dependency-version: 4.50.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-21 10:02:37 +00:00
Adam Warner
07a3113266 Merge pull request #1990 from pi-hole/master
Sync master back into development
2026-03-18 22:19:37 +00:00
Adam Warner
ac20298890 Merge pull request #1958 from pi-hole/dockerdocs
Readme Rework
2026-03-18 21:31:05 +00:00
Adam Warner
9b0e152eab Merge pull request #2008 from crazy-max/github-builder
ci: switch image publishing to docker/github-builder
2026-03-17 12:37:28 +00:00
CrazyMax
e974aea883 ci: switch image publishing to docker/github-builder
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-03-16 14:51:12 +01:00
yubiuser
6e85d30563 Merge pull request #2006 from pi-hole/dependabot/github_actions/development/actions/download-artifact-8.0.1
Bump actions/download-artifact from 8.0.0 to 8.0.1
2026-03-14 14:47:55 +01:00
yubiuser
39a3161afc Merge pull request #2007 from pi-hole/dependabot/pip/test/development/tox-4.49.1
Bump tox from 4.49.0 to 4.49.1 in /test
2026-03-14 14:47:17 +01:00
dependabot[bot]
57ea0174ae Bump tox from 4.49.0 to 4.49.1 in /test
Bumps [tox](https://github.com/tox-dev/tox) from 4.49.0 to 4.49.1.
- [Release notes](https://github.com/tox-dev/tox/releases)
- [Changelog](https://github.com/tox-dev/tox/blob/main/docs/changelog.rst)
- [Commits](https://github.com/tox-dev/tox/compare/4.49.0...4.49.1)

---
updated-dependencies:
- dependency-name: tox
  dependency-version: 4.49.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-14 10:02:34 +00:00
dependabot[bot]
e1051f786d Bump actions/download-artifact from 8.0.0 to 8.0.1
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 8.0.0 to 8.0.1.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](70fc10c6e5...3e5f45b2cf)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: 8.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-14 10:02:31 +00:00
yubiuser
3d00737c7d Merge pull request #2004 from pi-hole/group_dependabot
Group dependabot PRs to reduce PR spam
2026-03-08 07:15:46 +01:00
yubiuser
263b30b86b Merge pull request #1998 from pi-hole/dependabot/github_actions/development/docker/build-push-action-7.0.0
Bump docker/build-push-action from 6.19.2 to 7.0.0
2026-03-07 21:10:00 +01:00
dependabot[bot]
3dddb13dc0 Bump docker/build-push-action from 6.19.2 to 7.0.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.19.2 to 7.0.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](10e90e3645...d08e5c354a)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-07 20:08:01 +00:00
yubiuser
c9db3e6538 Merge pull request #1999 from pi-hole/dependabot/github_actions/development/docker/metadata-action-6.0.0
Bump docker/metadata-action from 5.10.0 to 6.0.0
2026-03-07 21:07:14 +01:00
dependabot[bot]
62c4b2bb9b Bump docker/metadata-action from 5.10.0 to 6.0.0
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 5.10.0 to 6.0.0.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](c299e40c65...030e881283)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-07 20:04:34 +00:00