Skip to content
Snippets Groups Projects
Commit bba5bacd authored by Alec Höfler's avatar Alec Höfler
Browse files

Merge branch nginx-php-minimal:master into master

parents 66148ec8 a516f324
No related branches found
No related tags found
No related merge requests found
Pipeline #43871 passed
matrix = [
{
'PHP_VERSION': '5',
'ALPINE_VERSION': ['3.8', '3.7'],
'TESTING_REPO': 0,
'PHP_SESSION': 0,
},
{
'PHP_VERSION': '7',
'ALPINE_VERSION': ['3.15', '3.14', '3.13', '3.12', '3.11', '3.10', '3.9', '3.8', '3.7'],
'TESTING_REPO': 0,
'PHP_SESSION': 1,
},
{
'PHP_VERSION': '8',
'TESTING_REPO': 0,
'PHP_SESSION': 1,
'ALPINE_VERSION': ['3.16', '3.15', '3.14', '3.13'],
},
{
'PHP_VERSION': '81',
'ALPINE_VERSION': ['edge', 'latest', '3.16', '3.17'],
'TESTING_REPO': 0,
'PHP_SESSION': 1,
},
{
'PHP_VERSION': '82',
'ALPINE_VERSION': ['edge'],
'TESTING_REPO': 1,
'PHP_SESSION': 1,
}
]
def main(ctx):
return [buildContainer(step['PHP_VERSION'], ALPINE_VERSION, step['TESTING_REPO'], step['PHP_SESSION']) for step in matrix for ALPINE_VERSION in step['ALPINE_VERSION']]
def buildContainer(PHP_VERSION, ALPINE_VERSION, TESTING_REPO, PHP_SESSION):
return {
'kind': 'pipeline',
'type': 'docker',
'name': 'php' + PHP_VERSION + '-alpine' + ALPINE_VERSION,
'steps': [
{
'name': 'detect-image-tag',
'image': 'archlinux',
'commands': [
'''if [[ "$DRONE_BRANCH" == "master" ]]; then
tag="latest";
echo "Running on default branch '$DRONE_BRANCH': tag = 'latest'";
else
tag="$DRONE_BRANCH";
echo "Running on branch '$DRONE_BRANCH': tag = $tag";
fi''',
'echo "tag=$tag" >> .env'
]
},
{
'name': 'detect-registry-urls',
'image': 'archlinux',
'commands': [
'echo "Repo: $DRONE_REPO"',
'registry_image=$(echo "$DRONE_GIT_HTTP_URL" | awk -F "://" \'{print $2}\' | awk -F ".git" \'{print tolower($1)}\')',
'registry_domain=$(echo "$registry_image" | awk -F "/" \'{print $1}\')',
'echo "registry_image=$registry_image" >> .env',
'echo "registry_domain=$registry_domain" >> .env'
]
},
{
'name': 'login to registry',
'image': 'docker:dind',
'volumes': [
{
'name': 'docker',
'path': '/root/.docker'
}
],
'environment': {
'DOCKER_PASSWORD': {
'from_secret': 'docker_password'
}
},
'commands': [
'source .env',
'cat .env',
'echo $DOCKER_PASSWORD | docker login --username $DRONE_REPO_OWNER --password-stdin $registry_domain'
]
},
{
'name': 'wait for docker',
'image': 'archlinux',
'volumes': [
{
'name': 'sockets',
'path': '/var/run'
},
],
'commands': [
'''while [ ! -S /var/run/docker.sock ]; do
echo "Waiting for docker socket..."
sleep 1
done'''
]
},
{
'name': 'build image',
'image': 'docker:dind',
'volumes': [
{
'name': 'sockets',
'path': '/var/run'
},
{
'name': 'docker',
'path': '/root/.docker'
}
],
'commands': [
'source .env',
'cat .env',
'docker context create build',
'docker buildx create build --use',
'docker buildx build --squash --platform linux/amd64,linux/arm,linux/arm64 --push --build-arg PHP_VERSION=' + PHP_VERSION + ' --build-arg ALPINE_VERSION=' + ALPINE_VERSION + ' --build-arg TESTING_REPO=' + str(TESTING_REPO) + ' --build-arg PHP_SESSION=' + str(PHP_SESSION) + ' -t $registry_image:${tag}' + PHP_VERSION + '-' + ALPINE_VERSION + ' .'
]
}
],
'services': [
{
'name': 'docker',
'image': 'docker:dind',
'privileged': True,
'environment': {
'DOCKER_TLS_CERTDIR': '/certs'
},
'volumes': [
{
'name': 'sockets',
'path': '/var/run'
}
]
}
],
'volumes': [
{
'name': 'sockets',
'temp': {}
},
{
'name': 'docker',
'temp': {}
}
],
}
\ No newline at end of file
.parallel: .parallel:
parallel: parallel:
matrix: matrix:
- PHP_VERSION: "7" - PHP_VERSION: "7"
ALPINE_VERSION: ["3.15", "3.14", "3.13", "3.12", "3.11", "3.10"] ALPINE_VERSION: ["3.15"]
TESTING_REPO: 0 TESTING_REPO: 0
PHP_SESSION: 1 PHP_SESSION: 1
- PHP_VERSION: "8" - PHP_VERSION: "8"
TESTING_REPO: 0 TESTING_REPO: 0
PHP_SESSION: 1 PHP_SESSION: 1
ALPINE_VERSION: ["3.16", "3.15", "3.14", "3.13"] ALPINE_VERSION: ["3.16", "3.15"]
- PHP_VERSION: "81" - PHP_VERSION: "81"
ALPINE_VERSION: [edge, "latest", "3.16", "3.17", "3.18", "3.19"] ALPINE_VERSION: ["3.16", "3.17", "3.18", "3.19"]
TESTING_REPO: 0 TESTING_REPO: 0
PHP_SESSION: 1 PHP_SESSION: 1
- PHP_VERSION: "82" - PHP_VERSION: "82"
ALPINE_VERSION: [edge, "latest", "3.18", "3.19"] ALPINE_VERSION: [edge, "latest", "3.18", "3.19", "3.20"]
TESTING_REPO: 0 TESTING_REPO: 0
PHP_SESSION: 1 PHP_SESSION: 1
- PHP_VERSION: "83" - PHP_VERSION: "83"
ALPINE_VERSION: [edge, "latest", "3.19"] ALPINE_VERSION: [edge, "latest", "3.20", "3.19"]
TESTING_REPO: 0 TESTING_REPO: 0
PHP_SESSION: 1 PHP_SESSION: 1
- PHP_VERSION: "84"
ALPINE_VERSION: [edge]
TESTING_REPO: 1
PHP_SESSION: 1
docker-build: docker-build:
# Use the official docker image. # Use the official docker image.
image: gitlab.jonasled.de/jonasled/buildx-docker:latest image: gitlab.jonasled.de/jonasled/buildx-docker:latest
......
...@@ -18,26 +18,20 @@ This is a Alpine Linux based Docker Container, which comes with nginx and PHP pr ...@@ -18,26 +18,20 @@ This is a Alpine Linux based Docker Container, which comes with nginx and PHP pr
The Image is available in multiple PHP and alpine versions. The following tag name will be used for every image: `<branch>-<php version>-<alpine version>`. For the master branch, the branch tag is not included. At the moment the following versions are available: The Image is available in multiple PHP and alpine versions. The following tag name will be used for every image: `<branch>-<php version>-<alpine version>`. For the master branch, the branch tag is not included. At the moment the following versions are available:
|PHP Version|Alpine Version|Tag Name|Notes |PHP Version|Alpine Version|Tag Name|Notes
|---|---|---|---| |---|---|---|---|
|8.4|edge|84-edge|Still in beta|
|8.3|3.20|83-3.20||
|8.3|3.19|3-3.19||
|8.3|latest|83-latest|| |8.3|latest|83-latest||
|8.3|edge|83-edge|| |8.3|edge|83-edge||
|8.3|3.19|83-3.19|| |8.2|3.20|82-3.20||
|8.2|latest|82-latest||
|8.2|edge|82-edge||
|8.2|3.19|82-3.19|| |8.2|3.19|82-3.19||
|8.2|3.18|82-3.18|| |8.2|3.18|82-3.18||
|8.1|latest|81-latest|| |8.2|latest|82-latest||
|8.1|edge|81-edge|| |8.2|edge|82-edge||
|8.1|3.19|81-3.19||
|8.1|3.18|81-3.18||
|8.1|3.17|81-3.17||
|8.1|3.16|81-3.16|| |8.1|3.16|81-3.16||
|8.1|3.17|81-3.17||
|8.1|3.18|81-3.18||
|8.1|3.19|81-3.19||
|8.0|3.16|8-3.16|| |8.0|3.16|8-3.16||
|8.0|3.15|8-3.15|| |8.0|3.15|8-3.15||
|8.0|3.14|8-3.14||
|8.0|3.13|8-3.13||
|7.4|3.15|7-3.15|| |7.4|3.15|7-3.15||
|7.4|3.14|7-3.14||
|7.4|3.13|7-3.13||
|7.3|3.12|7-3.12||
|7.3|3.11|7-3.11||
|7.3|3.10|7-3.10||
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment