Skip to content

Commit fa06683

Browse files
authored
Merge pull request #103 from sineverba/release-1.11.0
Release 1.11.0
2 parents d64e303 + 8356cae commit fa06683

File tree

8 files changed

+228
-114
lines changed

8 files changed

+228
-114
lines changed

.circleci/config.yml

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
version: 2.1
2+
executors:
3+
arm64_executor:
4+
machine:
5+
image: ubuntu-2204:current
6+
resource_class: arm.large
7+
environment:
8+
DOCKER_IMAGE: php74xc
9+
BINFMT_VERSION: qemu-v7.0.0-28
10+
COMPOSER_VERSION: 1.10.27
11+
XDEBUG_VERSION: 3.1.6
12+
MCRYPT_VERSION: 1.0.7
13+
amd64_executor:
14+
machine:
15+
image: ubuntu-2204:current
16+
resource_class: large
17+
environment:
18+
DOCKER_IMAGE: php74xc
19+
BINFMT_VERSION: qemu-v7.0.0-28
20+
COMPOSER_VERSION: 1.10.27
21+
XDEBUG_VERSION: 3.1.6
22+
MCRYPT_VERSION: 1.0.7
23+
DELETE_TAG_TAG: 1.0.2
24+
jobs:
25+
test:
26+
executor: amd64_executor
27+
steps:
28+
- checkout
29+
- run:
30+
name: "Build image"
31+
command: |
32+
docker build \
33+
--build-arg COMPOSER_VERSION=$COMPOSER_VERSION \
34+
--build-arg XDEBUG_VERSION=$XDEBUG_VERSION \
35+
--build-arg MCRYPT_VERSION=$MCRYPT_VERSION \
36+
--tag $DOCKER_LOGIN/$DOCKER_IMAGE:test \
37+
'.'
38+
- run:
39+
name: "Test image"
40+
command: |
41+
docker run --rm $DOCKER_LOGIN/$DOCKER_IMAGE:test php -v | grep 7.4.33
42+
docker run --rm $DOCKER_LOGIN/$DOCKER_IMAGE:test php -v | grep OPcache
43+
docker run --rm $DOCKER_LOGIN/$DOCKER_IMAGE:test php -m | grep xdebug
44+
docker run --rm $DOCKER_LOGIN/$DOCKER_IMAGE:test php -r "xdebug_info();" | grep $XDEBUG_VERSION
45+
docker run --rm $DOCKER_LOGIN/$DOCKER_IMAGE:test php -m | grep pdo_pgsql
46+
docker run --rm $DOCKER_LOGIN/$DOCKER_IMAGE:test /usr/bin/composer -V | grep "1.10.27"
47+
docker run --rm $DOCKER_LOGIN/$DOCKER_IMAGE:test php -i | grep "short_open_tag => Off => Off"
48+
docker run --rm $DOCKER_LOGIN/$DOCKER_IMAGE:test php -i | grep "memory_limit => 512M => 512M"
49+
build_arm64:
50+
executor: arm64_executor
51+
steps:
52+
- checkout
53+
- run:
54+
name: "Login to Docker HUB"
55+
command: docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
56+
- run:
57+
name: "Install tonistiigi/binfmt"
58+
command: docker run --rm --privileged tonistiigi/binfmt:$BINFMT_VERSION --install all
59+
- run:
60+
name: "Create buildx multiarch"
61+
command: |
62+
docker buildx create \
63+
--name multiarch \
64+
--use \
65+
&& docker buildx inspect \
66+
--bootstrap \
67+
--builder \
68+
multiarch
69+
- run:
70+
name: "Build image and push to Docker HUB"
71+
command: |
72+
docker buildx build \
73+
--cache-to=type=inline \
74+
--platform linux/arm/v6,linux/arm/v7,linux/arm64 \
75+
--build-arg COMPOSER_VERSION=$COMPOSER_VERSION \
76+
--build-arg XDEBUG_VERSION=$XDEBUG_VERSION \
77+
--build-arg MCRYPT_VERSION=$MCRYPT_VERSION \
78+
--tag $DOCKER_LOGIN/$DOCKER_IMAGE:cache-arm \
79+
--push \
80+
'.'
81+
build_amd64:
82+
executor: amd64_executor
83+
steps:
84+
- checkout
85+
- run:
86+
name: "Login to Docker HUB"
87+
command: docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
88+
- run:
89+
name: "Install tonistiigi/binfmt"
90+
command: docker run --rm --privileged tonistiigi/binfmt:$BINFMT_VERSION --install all
91+
- run:
92+
name: "Create buildx multiarch"
93+
command: |
94+
docker buildx create \
95+
--name multiarch \
96+
--use \
97+
&& docker buildx inspect \
98+
--bootstrap \
99+
--builder \
100+
multiarch
101+
- run:
102+
name: "Build image and push to Docker HUB"
103+
command: |
104+
docker buildx build \
105+
--cache-from type=registry,ref=$DOCKER_LOGIN/$DOCKER_IMAGE:cache-arm \
106+
--platform linux/amd64,linux/arm64,linux/arm/v6,linux/arm/v7 \
107+
--build-arg COMPOSER_VERSION=$COMPOSER_VERSION \
108+
--build-arg XDEBUG_VERSION=$XDEBUG_VERSION \
109+
--build-arg MCRYPT_VERSION=$MCRYPT_VERSION \
110+
--tag $DOCKER_LOGIN/$DOCKER_IMAGE:$CIRCLE_TAG \
111+
--tag $DOCKER_LOGIN/$DOCKER_IMAGE:latest \
112+
--push \
113+
"."
114+
delete_cache_arm:
115+
executor: amd64_executor
116+
steps:
117+
- run:
118+
name: "Login to Docker HUB"
119+
command: docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
120+
- run:
121+
name: "Remove cache arm image"
122+
command: |
123+
docker run \
124+
-it \
125+
--rm \
126+
--name $DOCKER_IMAGE \
127+
-e DOCKER_USERNAME=$DOCKER_LOGIN \
128+
-e DOCKER_PASSWORD=$DOCKER_PASSWORD \
129+
-e ORGANIZATION=$DOCKER_LOGIN \
130+
-e IMAGE=$DOCKER_IMAGE \
131+
-e TAG=cache-arm \
132+
$DOCKER_LOGIN/$DOCKER_IMAGE:$DELETE_TAG_TAG
133+
workflows:
134+
test_and_build_images:
135+
jobs:
136+
- test:
137+
context: SECRETS
138+
filters:
139+
branches:
140+
only:
141+
- master
142+
- develop
143+
- build_arm64:
144+
context: SECRETS
145+
filters:
146+
tags:
147+
only: /.*/
148+
branches:
149+
ignore: /.*/
150+
- build_amd64:
151+
context: SECRETS
152+
filters:
153+
tags:
154+
only: /.*/
155+
branches:
156+
ignore: /.*/
157+
requires:
158+
- build_arm64
159+
- delete_cache_arm:
160+
context: SECRETS
161+
filters:
162+
tags:
163+
only: /.*/
164+
branches:
165+
ignore: /.*/
166+
requires:
167+
- build_amd64
168+

.semaphore/build-deploy.yml

Lines changed: 0 additions & 55 deletions
This file was deleted.

.semaphore/semaphore.yml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ global_job_config:
1919
value: sineverba
2020
- name: DOCKER_IMAGE
2121
value: php74xc
22+
- name: COMPOSER_VERSION
23+
value: 1.10.27
24+
- name: XDEBUG_VERSION
25+
value: 3.1.6
26+
- name: MCRYPT_VERSION
27+
value: 1.0.7
2228

2329
blocks:
2430
- name: "Test"
@@ -29,18 +35,18 @@ blocks:
2935
- name: "Build and test"
3036
commands:
3137
- checkout
32-
- docker build --tag $DOCKER_USERNAME/$DOCKER_IMAGE .
38+
- >-
39+
docker build
40+
--tag $DOCKER_USERNAME/$DOCKER_IMAGE
41+
--build-arg COMPOSER_VERSION=$COMPOSER_VERSION
42+
--build-arg XDEBUG_VERSION=$XDEBUG_VERSION
43+
--build-arg MCRYPT_VERSION=$MCRYPT_VERSION
44+
"."
3345
- docker run --rm $DOCKER_USERNAME/$DOCKER_IMAGE php -v | grep 7.4.33
3446
- docker run --rm $DOCKER_USERNAME/$DOCKER_IMAGE php -v | grep OPcache
3547
- docker run --rm $DOCKER_USERNAME/$DOCKER_IMAGE php -m | grep xdebug
36-
- docker run --rm $DOCKER_USERNAME/$DOCKER_IMAGE php -r "xdebug_info();" | grep "3.1.5"
48+
- docker run --rm $DOCKER_USERNAME/$DOCKER_IMAGE php -r "xdebug_info();" | grep $XDEBUG_VERSION
3749
- docker run --rm $DOCKER_USERNAME/$DOCKER_IMAGE php -m | grep pdo_pgsql
3850
- docker run --rm $DOCKER_USERNAME/$DOCKER_IMAGE /usr/bin/composer -V | grep "1.10.27"
3951
- docker run --rm $DOCKER_USERNAME/$DOCKER_IMAGE php -i | grep "short_open_tag => Off => Off"
40-
- docker run --rm $DOCKER_USERNAME/$DOCKER_IMAGE php -i | grep "memory_limit => 512M => 512M"
41-
42-
promotions:
43-
- name: Deploy
44-
pipeline_file: build-deploy.yml
45-
auto_promote:
46-
when: "result = 'passed' and tag =~ '.*'"
52+
- docker run --rm $DOCKER_USERNAME/$DOCKER_IMAGE php -i | grep "memory_limit => 512M => 512M"

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
# 1.10.0
1+
# 1.11.0
2+
+ Upgrade dependencies
3+
+ Fix Continuous integrations services
4+
5+
## 1.10.0
26
+ Upgrade dependencies
37

48
## 1.9.0

Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
ARG COMPOSER_VERSION
2+
FROM composer:$COMPOSER_VERSION AS composer_downloader
13
FROM php:7.4.33-cli
2-
4+
ARG XDEBUG_VERSION
5+
ARG MCRYPT_VERSION
36
# OpCache settings
47
ENV PHP_OPCACHE_VALIDATE_TIMESTAMPS="0"
58
ENV XDEBUG_MODE="debug,coverage"
@@ -21,14 +24,14 @@ RUN apt-get update -y && apt-get install -y \
2124
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
2225

2326
# Setup PHPXDebug
24-
RUN pecl install xdebug-3.1.5 mcrypt-1.0.5
27+
RUN pecl install xdebug-${XDEBUG_VERSION} mcrypt-${MCRYPT_VERSION}
2528

2629
# Install PHP extensions
2730
RUN docker-php-ext-install mysqli pdo pdo_mysql pdo_pgsql mbstring exif pcntl bcmath gd opcache zip \
2831
&& docker-php-ext-enable mysqli pdo pdo_mysql pdo_pgsql mbstring exif pcntl bcmath gd xdebug mcrypt
2932

3033
# Get latest Composer
31-
COPY --from=composer:1.10.27 /usr/bin/composer /usr/bin/composer
34+
COPY --from=composer_downloader /usr/bin/composer /usr/bin/composer
3235

3336
# Add custom ini files
3437
COPY config/10-shorttag.ini \

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License
22

3-
Copyright (c) 2020 - 2023 sineverba
3+
Copyright (c) 2020 - 2024 sineverba
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Makefile

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
IMAGE_NAME=sineverba/php74xc
22
CONTAINER_NAME=php74xc
3-
APP_VERSION=1.10.0-dev
4-
BUILDX_VERSION=0.12.0
3+
APP_VERSION=1.11.0-dev
4+
COMPOSER_VERSION=1.10.27
5+
XDEBUG_VERSION=3.1.6
6+
MCRYPT_VERSION=1.0.7
7+
BUILDX_VERSION=0.13.1
58
BINFMT_VERSION=qemu-v7.0.0-28
69

710
build:
8-
docker build --tag $(IMAGE_NAME):$(APP_VERSION) .
11+
docker build \
12+
--build-arg COMPOSER_VERSION=$(COMPOSER_VERSION) \
13+
--build-arg XDEBUG_VERSION=$(XDEBUG_VERSION) \
14+
--build-arg MCRYPT_VERSION=$(MCRYPT_VERSION) \
15+
--tag $(IMAGE_NAME):$(APP_VERSION) \
16+
"."
917

1018
preparemulti:
1119
mkdir -vp ~/.docker/cli-plugins
@@ -24,14 +32,17 @@ preparemulti:
2432
multi:
2533
docker buildx inspect --bootstrap --builder multiarch
2634
docker buildx build \
27-
--platform linux/arm64/v8,linux/amd64,linux/arm/v6,linux/arm/v7 \
35+
--platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8 \
36+
--build-arg COMPOSER_VERSION=$(COMPOSER_VERSION) \
37+
--build-arg XDEBUG_VERSION=$(XDEBUG_VERSION) \
38+
--build-arg MCRYPT_VERSION=$(MCRYPT_VERSION) \
2839
--tag $(IMAGE_NAME):$(APP_VERSION) "."
2940

3041
test:
3142
@docker run --name $(CONTAINER_NAME) --rm $(IMAGE_NAME):$(APP_VERSION) php -v | grep 7.4.33
3243
@docker run --name $(CONTAINER_NAME) --rm $(IMAGE_NAME):$(APP_VERSION) php -v | grep OPcache
3344
@docker run --name $(CONTAINER_NAME) --rm $(IMAGE_NAME):$(APP_VERSION) php -m | grep xdebug
34-
@docker run --name $(CONTAINER_NAME) --rm $(IMAGE_NAME):$(APP_VERSION) php -r "xdebug_info();" | grep "3.1.5"
45+
@docker run --name $(CONTAINER_NAME) --rm $(IMAGE_NAME):$(APP_VERSION) php -r "xdebug_info();" | grep $(XDEBUG_VERSION)
3546
@docker run --name $(CONTAINER_NAME) --rm $(IMAGE_NAME):$(APP_VERSION) php -m | grep pdo_pgsql
3647
@docker run --name $(CONTAINER_NAME) --rm $(IMAGE_NAME):$(APP_VERSION) php -m | grep zip
3748
@docker run --name $(CONTAINER_NAME) --rm $(IMAGE_NAME):$(APP_VERSION) php -m | grep mcrypt

0 commit comments

Comments
 (0)