Skip to content

Commit 1e379cf

Browse files
Merge pull request #201 from usabilla/add-php83-with-alpine-320
Add php 8.3 with Alpine 3.20 + GHA dependency upgrades
2 parents 82455c0 + 715716e commit 1e379cf

File tree

3 files changed

+44
-6
lines changed

3 files changed

+44
-6
lines changed

.github/workflows/ci.yml

+27-3
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ jobs:
121121
- run: docker save "${DOCKER_IMAGE}" | gzip -9 > ./tmp/image-http-${{ matrix.nginx }}.tar
122122
shell: bash
123123
- name: Upload Images
124-
uses: actions/upload-artifact@v2
124+
uses: actions/upload-artifact@v4
125125
with:
126126
name: docker-image-http-${{ matrix.nginx }}
127127
path: ./tmp
@@ -142,7 +142,7 @@ jobs:
142142
- run: docker save "${DOCKER_IMAGE}" | gzip -9 > ./tmp/image-prometheus-exporter-file.tar
143143
shell: bash
144144
- name: Upload Images
145-
uses: actions/upload-artifact@v2
145+
uses: actions/upload-artifact@v4
146146
with:
147147
name: docker-image-prometheus-exporter-file
148148
path: ./tmp
@@ -222,6 +222,12 @@ jobs:
222222
- php: "8.3"
223223
alpine: "3.19"
224224
type: "fpm"
225+
- php: "8.3"
226+
alpine: "3.20"
227+
type: "fpm"
228+
- php: "8.3"
229+
alpine: "3.20"
230+
type: "cli"
225231
steps:
226232
- uses: actions/checkout@v2
227233
- run: ./build-php.sh ${{ matrix.type }} ${{ matrix.php }} ${{ matrix.alpine }}
@@ -231,7 +237,7 @@ jobs:
231237
- run: docker save "${DOCKER_IMAGE}" | gzip -9 > ./tmp/image-${{ matrix.type }}-${{ matrix.php }}-${{ matrix.alpine }}.tar
232238
shell: bash
233239
- name: Upload Images
234-
uses: actions/upload-artifact@v2
240+
uses: actions/upload-artifact@v4
235241
with:
236242
name: docker-image-${{ matrix.type }}-${{ matrix.php }}-${{ matrix.alpine }}
237243
path: ./tmp
@@ -312,6 +318,12 @@ jobs:
312318
- php: "8.3"
313319
alpine: "3.19"
314320
type: "fpm"
321+
- php: "8.3"
322+
alpine: "3.20"
323+
type: "fpm"
324+
- php: "8.3"
325+
alpine: "3.20"
326+
type: "cli"
315327
steps:
316328
- uses: actions/checkout@v2
317329
- name: Install clair-scanner
@@ -458,6 +470,12 @@ jobs:
458470
- php: "8.3"
459471
alpine: "3.19"
460472
type: "fpm"
473+
- php: "8.3"
474+
alpine: "3.20"
475+
type: "fpm"
476+
- php: "8.3"
477+
alpine: "3.20"
478+
type: "cli"
461479
steps:
462480
- uses: actions/checkout@v2
463481
- name: Download Images
@@ -668,6 +686,12 @@ jobs:
668686
- php: "8.3"
669687
alpine: "3.19"
670688
type: "fpm"
689+
- php: "8.3"
690+
alpine: "3.20"
691+
type: "fpm"
692+
- php: "8.3"
693+
alpine: "3.20"
694+
type: "cli"
671695
steps:
672696
- uses: actions/checkout@v2
673697
- name: Download Images

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ test-prometheus-exporter-file-e2e: ./tmp/build-prometheus-exporter-file.tags
103103
xargs -I % ./test-prometheus-exporter-file-e2e.sh % < ./tmp/build-prometheus-exporter-file.tags
104104

105105
scan-vulnerability:
106-
docker-compose -f test/security/docker-compose.yml -p clair-ci up -d
106+
docker compose -f test/security/docker-compose.yml -p clair-ci up -d
107107
RETRIES=0 && while ! wget -T 10 -q -O /dev/null http://localhost:6060/v1/namespaces ; do sleep 1 ; echo -n "." ; if [ $${RETRIES} -eq 10 ] ; then echo " Timeout, aborting." ; exit 1 ; fi ; RETRIES=$$(($${RETRIES}+1)) ; done
108108
mkdir -p ./tmp/clair/usabillabv
109109
cat ./tmp/build-*.tags | xargs -I % sh -c 'clair-scanner --ip 172.17.0.1 -r "./tmp/clair/%.json" -l ./tmp/clair/clair.log % || echo "% is vulnerable"'
110-
docker-compose -f test/security/docker-compose.yml -p clair-ci down
110+
docker compose -f test/security/docker-compose.yml -p clair-ci down

test/container/php/test_helper_scripts.py

+15-1
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ def test_php_images_contain_helper_scripts(host):
1111
]
1212

1313
for file in official_helper_scripts:
14+
expected_file_mode = get_expected_os_mode(host)
15+
1416
assert host.file(file).exists is True
1517
assert host.file(file).is_file is True
16-
assert host.file(file).mode == 0o775
18+
assert host.file(file).mode == expected_file_mode
1719

1820
helper_scripts = [
1921
"/usr/local/bin/docker-php-dev-mode",
@@ -74,3 +76,15 @@ def test_php_extension_script_for_rdkafka(host):
7476
def test_php_extension_script_for_pdo_pgsql(host):
7577
host.run_expect([0], "docker-php-ext-pdo-pgsql")
7678
assert 'pdo_pgsql' in host.run('php -m').stdout
79+
80+
def get_os_version(host):
81+
return host.run("cat /etc/alpine-release").stdout
82+
83+
def get_expected_os_mode(host):
84+
expected_file_mode = 0o775
85+
os_version = get_os_version(host)
86+
87+
if os_version > "3.17.999":
88+
expected_file_mode = 0o755
89+
90+
return expected_file_mode

0 commit comments

Comments
 (0)