Skip to content

Commit 7a0306d

Browse files
authored
refactor(software): standardize 33 docker modules with modern patterns (#736)
* refactor(software): standardize 33 docker modules with modern patterns - Change from docker-ce to docker.io package checks - Modernize container filtering with --filter/--format flags - Replace build_version checks with State.Status inspection - Standardize restart policy to --restart=always - Improve error messages and purge operations - Add test cases for all refactored modules * fix(ci): resolve mapfile issue with changed files in unit tests Use process substitution with printf instead of here-string to properly handle multiline output from GitHub Actions changed-files step. * fix(ci): use temp file for reliable parsing of changed files Use temp file approach instead of process substitution to properly handle multiline output from GitHub Actions changed-files step. This preserves newlines correctly and handles edge cases. * fix(ci): use git diff directly to get changed test files Bypass GitHub Actions output parsing issues by using git diff directly to retrieve changed test configuration files. This is more reliable and handles multiline outputs correctly. * fix(readarr): use latest tag for amd64 compatibility The develop tag doesn't support linux/amd64 architecture. Change to latest tag which has full multi-architecture support. * refactor: remove readarr module from user-accessible files Remove readarr module, test case, and JSON configuration due to amd64 architecture incompatibility with the develop tag. * Improve docker detection * Update tools/modules/software/module_embyserver.sh * Update tools/modules/software/module_openhab.sh * Apply suggestions from code review * Remove duplicates --------- Signed-off-by: Igor Pecovnik <igor@armbian.com>
1 parent 192d1a2 commit 7a0306d

File tree

84 files changed

+1058
-644
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+1058
-644
lines changed

.github/workflows/maintenance-unit-tests.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,14 @@ jobs:
6363
if [[ "$run_all_tests" == "true" ]]; then
6464
tests=($(grep -rwl tests/*.conf -e "ENABLED=true" | cut -d":" -f1))
6565
else
66-
mapfile -t changed_files <<< "${{ steps.changed-files.outputs.all_changed_files }}"
67-
tests=($(grep -rwl -e "ENABLED=true" -- "${changed_files[@]}" | cut -d":" -f1))
66+
# Get changed test files using git to avoid parsing issues
67+
changed_tests=($(cd "${GITHUB_WORKSPACE}" && git diff --name-only origin/main...HEAD | grep '^tests/.*\.conf$' || true))
68+
if [[ ${#changed_tests[@]} -gt 0 ]]; then
69+
# Filter for ENABLED=true
70+
tests=($(grep -rwl -e "ENABLED=true" -- "${changed_tests[@]}" 2>/dev/null | cut -d":" -f1))
71+
else
72+
tests=()
73+
fi
6874
fi
6975
# loop enabled test cases
7076
for i in "${tests[@]}"; do

tests/actualbudget.conf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
ENABLED=true
2+
RELEASE="noble"
3+
TESTNAME="ActualBudget install"
4+
5+
testcase() {(
6+
set -e
7+
./bin/armbian-config --api module_actualbudget purge
8+
./bin/armbian-config --api module_actualbudget install
9+
./bin/armbian-config --api module_actualbudget status
10+
)}

tests/adguardhome.conf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
ENABLED=true
2+
RELEASE="noble"
3+
TESTNAME="AdGuardHome install"
4+
5+
testcase() {(
6+
set -e
7+
./bin/armbian-config --api module_adguardhome purge
8+
./bin/armbian-config --api module_adguardhome install
9+
./bin/armbian-config --api module_adguardhome status
10+
)}

tests/bazarr.conf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
ENABLED=true
2+
RELEASE="noble"
3+
TESTNAME="Bazarr install"
4+
5+
testcase() {(
6+
set -e
7+
./bin/armbian-config --api module_bazarr purge
8+
./bin/armbian-config --api module_bazarr install
9+
./bin/armbian-config --api module_bazarr status
10+
)}

tests/deluge.conf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
ENABLED=true
2+
RELEASE="noble"
3+
TESTNAME="Deluge install"
4+
5+
testcase() {(
6+
set -e
7+
./bin/armbian-config --api module_deluge purge
8+
./bin/armbian-config --api module_deluge install
9+
./bin/armbian-config --api module_deluge status
10+
)}

tests/domoticz.conf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
ENABLED=true
2+
RELEASE="noble"
3+
TESTNAME="Domoticz install"
4+
5+
testcase() {(
6+
set -e
7+
./bin/armbian-config --api module_domoticz purge
8+
./bin/armbian-config --api module_domoticz install
9+
./bin/armbian-config --api module_domoticz status
10+
)}

tests/embyserver.conf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
ENABLED=true
2+
RELEASE="noble"
3+
TESTNAME="EmbyServer install"
4+
5+
testcase() {(
6+
set -e
7+
./bin/armbian-config --api module_embyserver purge
8+
./bin/armbian-config --api module_embyserver install
9+
./bin/armbian-config --api module_embyserver status
10+
)}

tests/evcc.conf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
ENABLED=true
2+
RELEASE="noble"
3+
TESTNAME="EVCC install"
4+
5+
testcase() {(
6+
set -e
7+
./bin/armbian-config --api module_evcc purge
8+
./bin/armbian-config --api module_evcc install
9+
./bin/armbian-config --api module_evcc status
10+
)}

tests/filebrowser.conf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
ENABLED=true
2+
RELEASE="noble"
3+
TESTNAME="Filebrowser install"
4+
5+
testcase() {(
6+
set -e
7+
./bin/armbian-config --api module_filebrowser purge
8+
./bin/armbian-config --api module_filebrowser install
9+
./bin/armbian-config --api module_filebrowser status
10+
)}

tests/grafana.conf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
ENABLED=true
2+
RELEASE="noble"
3+
TESTNAME="Grafana install"
4+
5+
testcase() {(
6+
set -e
7+
./bin/armbian-config --api module_grafana purge
8+
./bin/armbian-config --api module_grafana install
9+
./bin/armbian-config --api module_grafana status
10+
)}

0 commit comments

Comments
 (0)