Unverified Commit f9db696f authored by Susi's avatar Susi Committed by GitHub
Browse files

[FEATURE] Add building on Github Actions (#2)

parent 322687ba
......@@ -9,3 +9,6 @@ end_of_line = lf
insert_final_newline = true
indent_size = 4
indent_style = tab
[*.yml]
indent_size = 2
......@@ -5,8 +5,6 @@ name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
......@@ -14,3 +12,73 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
changes:
- 'baseimage/**'
- name: Login to GitHub Container Registry
if: steps.filter.outputs.changes == 'true'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: TYPO3IncTeam
password: ${{ secrets.CR_PAT }}
- name: Login to Docker Hub
if: steps.filter.outputs.changes == 'true'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build Base Image
if: steps.filter.outputs.changes == 'true'
run: make build_baseimage
- name: Release Base Image
if: steps.filter.outputs.changes == 'true'
run: make release_baseimage
build-images:
runs-on: ubuntu-latest
needs: [ build ]
strategy:
fail-fast: false
matrix:
image: [ php53, php54, php55, php56, php70, php71, php72, php73, php74, bamboo, js ]
steps:
- uses: actions/checkout@v2
- uses: dorny/paths-filter@v2
id: filter
with:
base: ${{ github.ref }}
filters: |
matrix:
- '${{ matrix.image }}/**'
- name: Login to GitHub Container Registry
if: steps.filter.outputs.matrix == 'true'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: TYPO3IncTeam
password: ${{ secrets.CR_PAT }}
- name: Login to Docker Hub
if: steps.filter.outputs.matrix == 'true'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build ${{ matrix.image }} Image
if: steps.filter.outputs.matrix == 'true'
run: make build_${{ matrix.image }}
- name: Release ${{ matrix.image }} Image
if: steps.filter.outputs.matrix == 'true'
run: make release_${{ matrix.image }}
REGISTRY=ghcr.io/
NAME_BASEIMAGE = typo3gmbh/baseimage
MAJOR_BASEIMAGE=3
MINOR_BASEIMAGE=0
......@@ -214,15 +216,21 @@ build_baseimage:
cp -pR baseimage build_baseimage
docker build -t $(NAME_BASEIMAGE):$(FULLVERSION_BASEIMAGE) build_baseimage
docker tag $(NAME_BASEIMAGE):$(FULLVERSION_BASEIMAGE) $(NAME_BASEIMAGE):$(SHORTVERSION_BASEIMAGE)
docker tag $(NAME_BASEIMAGE):$(FULLVERSION_BASEIMAGE) $(REGISTRY)$(NAME_BASEIMAGE):$(FULLVERSION_BASEIMAGE)
docker tag $(NAME_BASEIMAGE):$(FULLVERSION_BASEIMAGE) $(REGISTRY)$(NAME_BASEIMAGE):$(SHORTVERSION_BASEIMAGE)
release_baseimage:
@if ! docker images $(NAME_BASEIMAGE) | awk '{ print $$2 }' | grep -q -F $(FULLVERSION_BASEIMAGE); then \
echo "$(NAME_BASEIMAGE) version $(FULLVERSION_BASEIMAGE) is not yet built. Please run 'make build'"; false; \
fi
docker tag $(NAME_BASEIMAGE):$(FULLVERSION_BASEIMAGE) $(NAME_BASEIMAGE):latest
docker tag $(NAME_BASEIMAGE):$(FULLVERSION_BASEIMAGE) $(REGISTRY)$(NAME_BASEIMAGE):latest
docker push $(NAME_BASEIMAGE):latest
docker push $(NAME_BASEIMAGE):$(FULLVERSION_BASEIMAGE)
docker push $(NAME_BASEIMAGE):$(SHORTVERSION_BASEIMAGE)
docker push $(REGISTRY)$(NAME_BASEIMAGE):latest
docker push $(REGISTRY)$(NAME_BASEIMAGE):$(FULLVERSION_BASEIMAGE)
docker push $(REGISTRY)$(NAME_BASEIMAGE):$(SHORTVERSION_BASEIMAGE)
clean_baseimage:
rm -rf build_baseimage
......@@ -231,23 +239,32 @@ clean_images_baseimage:
docker rmi $(NAME_BASEIMAGE):$(FULLVERSION_BASEIMAGE) || true
docker rmi $(NAME_BASEIMAGE):$(SHORTVERSION_BASEIMAGE) || true
docker rmi $(NAME_BASEIMAGE):latest || true
docker rmi $(REGISTRY)$(NAME_BASEIMAGE):$(FULLVERSION_BASEIMAGE) || true
docker rmi $(REGISTRY)$(NAME_BASEIMAGE):$(SHORTVERSION_BASEIMAGE) || true
docker rmi $(REGISTRY)$(NAME_BASEIMAGE):latest || true
build_php53: build_baseimage
build_php53:
rm -rf build_php53
cp -pR php53 build_php53
docker build -t $(NAME_PHP53):$(FULLVERSION_PHP53) build_php53
docker tag $(NAME_PHP53):$(FULLVERSION_PHP53) $(NAME_PHP53):$(SHORTVERSION_PHP53)
docker tag $(NAME_PHP53):$(FULLVERSION_PHP53) $(REGISTRY)$(NAME_PHP53):$(SHORTVERSION_PHP53)
docker tag $(NAME_PHP53):$(FULLVERSION_PHP53) $(REGISTRY)$(NAME_PHP53):$(FULLVERSION_PHP53)
release_php53:
@if ! docker images $(NAME_PHP53) | awk '{ print $$2 }' | grep -q -F $(FULLVERSION_PHP53); then \
echo "$(NAME_PHP53) version $(FULLVERSION_PHP53) is not yet built. Please run 'make build'"; false; \
fi
docker tag $(NAME_PHP53):$(FULLVERSION_PHP53) $(NAME_PHP53):latest
docker tag $(NAME_PHP53):$(FULLVERSION_PHP53) $(REGISTRY)$(NAME_PHP53):latest
docker push $(NAME_PHP53):latest
docker push $(NAME_PHP53):$(FULLVERSION_PHP53)
docker push $(NAME_PHP53):$(SHORTVERSION_PHP53)
docker push $(REGISTRY)$(NAME_PHP53):latest
docker push $(REGISTRY)$(NAME_PHP53):$(FULLVERSION_PHP53)
docker push $(REGISTRY)$(NAME_PHP53):$(SHORTVERSION_PHP53)
clean_php53:
rm -rf build_php53
......@@ -256,22 +273,31 @@ clean_images_php53:
docker rmi $(NAME_PHP53):latest || true
docker rmi $(NAME_PHP53):$(SHORTVERSION_PHP53) || true
docker rmi $(NAME_PHP53):$(FULLVERSION_PHP53) || true
docker rmi $(REGISTRY)$(NAME_PHP53):latest || true
docker rmi $(REGISTRY)$(NAME_PHP53):$(SHORTVERSION_PHP53) || true
docker rmi $(REGISTRY)$(NAME_PHP53):$(FULLVERSION_PHP53) || true
build_php54: build_baseimage
build_php54:
rm -rf build_php54
cp -pR php54 build_php54
docker build -t $(NAME_PHP54):$(FULLVERSION_PHP54) build_php54
docker tag $(NAME_PHP54):$(FULLVERSION_PHP54) $(NAME_PHP54):$(SHORTVERSION_PHP54)
docker tag $(NAME_PHP54):$(FULLVERSION_PHP54) $(REGISTRY)$(NAME_PHP54):$(SHORTVERSION_PHP54)
docker tag $(NAME_PHP54):$(FULLVERSION_PHP54) $(REGISTRY)$(NAME_PHP54):$(FULLVERSION_PHP54)
release_php54:
@if ! docker images $(NAME_PHP54) | awk '{ print $$2 }' | grep -q -F $(FULLVERSION_PHP54); then \
echo "$(NAME_PHP54) version $(FULLVERSION_PHP54) is not yet built. Please run 'make build'"; false; \
fi
docker tag $(NAME_PHP54):$(FULLVERSION_PHP54) $(NAME_PHP54):latest
docker tag $(NAME_PHP54):$(FULLVERSION_PHP54) $(REGISTRY)$(NAME_PHP54):latest
docker push $(NAME_PHP54):latest
docker push $(NAME_PHP54):$(FULLVERSION_PHP54)
docker push $(NAME_PHP54):$(SHORTVERSION_PHP54)
docker push $(REGISTRY)$(NAME_PHP54):latest
docker push $(REGISTRY)$(NAME_PHP54):$(FULLVERSION_PHP54)
docker push $(REGISTRY)$(NAME_PHP54):$(SHORTVERSION_PHP54)
clean_php54:
rm -rf build_php54
......@@ -280,22 +306,31 @@ clean_images_php54:
docker rmi $(NAME_PHP54):latest || true
docker rmi $(NAME_PHP54):$(SHORTVERSION_PHP54) || true
docker rmi $(NAME_PHP54):$(FULLVERSION_PHP54) || true
docker rmi $(REGISTRY)$(NAME_PHP54):latest || true
docker rmi $(REGISTRY)$(NAME_PHP54):$(SHORTVERSION_PHP54) || true
docker rmi $(REGISTRY)$(NAME_PHP54):$(FULLVERSION_PHP54) || true
build_php55: build_baseimage
build_php55:
rm -rf build_php55
cp -pR php55 build_php55
docker build -t $(NAME_PHP55):$(FULLVERSION_PHP55) build_php55
docker tag $(NAME_PHP55):$(FULLVERSION_PHP55) $(NAME_PHP55):$(SHORTVERSION_PHP55)
docker tag $(NAME_PHP55):$(FULLVERSION_PHP55) $(REGISTRY)$(NAME_PHP55):$(SHORTVERSION_PHP55)
docker tag $(NAME_PHP55):$(FULLVERSION_PHP55) $(REGISTRY)$(NAME_PHP55):$(FULLVERSION_PHP55)
release_php55:
@if ! docker images $(NAME_PHP55) | awk '{ print $$2 }' | grep -q -F $(FULLVERSION_PHP55); then \
echo "$(NAME_PHP55) version $(FULLVERSION_PHP55) is not yet built. Please run 'make build'"; false; \
fi
docker tag $(NAME_PHP55):$(FULLVERSION_PHP55) $(NAME_PHP55):latest
docker tag $(NAME_PHP55):$(FULLVERSION_PHP55) $(REGISTRY)$(NAME_PHP55):latest
docker push $(NAME_PHP55):latest
docker push $(NAME_PHP55):$(FULLVERSION_PHP55)
docker push $(NAME_PHP55):$(SHORTVERSION_PHP55)
docker push $(REGISTRY)$(NAME_PHP55):latest
docker push $(REGISTRY)$(NAME_PHP55):$(FULLVERSION_PHP55)
docker push $(REGISTRY)$(NAME_PHP55):$(SHORTVERSION_PHP55)
clean_php55:
rm -rf build_php55
......@@ -304,22 +339,31 @@ clean_images_php55:
docker rmi $(NAME_PHP55):latest || true
docker rmi $(NAME_PHP55):$(SHORTVERSION_PHP55) || true
docker rmi $(NAME_PHP55):$(FULLVERSION_PHP55) || true
docker rmi $(REGISTRY)$(NAME_PHP55):latest || true
docker rmi $(REGISTRY)$(NAME_PHP55):$(SHORTVERSION_PHP55) || true
docker rmi $(REGISTRY)$(NAME_PHP55):$(FULLVERSION_PHP55) || true
build_php56: build_baseimage
build_php56:
rm -rf build_php56
cp -pR php56 build_php56
docker build -t $(NAME_PHP56):$(FULLVERSION_PHP56) build_php56
docker tag $(NAME_PHP56):$(FULLVERSION_PHP56) $(NAME_PHP56):$(SHORTVERSION_PHP56)
docker tag $(NAME_PHP56):$(FULLVERSION_PHP56) $(REGISTRY)$(NAME_PHP56):$(SHORTVERSION_PHP56)
docker tag $(NAME_PHP56):$(FULLVERSION_PHP56) $(REGISTRY)$(NAME_PHP56):$(FULLVERSION_PHP56)
release_php56:
@if ! docker images $(NAME_PHP56) | awk '{ print $$2 }' | grep -q -F $(FULLVERSION_PHP56); then \
echo "$(NAME_PHP56) version $(FULLVERSION_PHP56) is not yet built. Please run 'make build'"; false; \
fi
docker tag $(NAME_PHP56):$(FULLVERSION_PHP56) $(NAME_PHP56):latest
docker tag $(NAME_PHP56):$(FULLVERSION_PHP56) $(REGISTRY)$(NAME_PHP56):latest
docker push $(NAME_PHP56):latest
docker push $(NAME_PHP56):$(FULLVERSION_PHP56)
docker push $(NAME_PHP56):$(SHORTVERSION_PHP56)
docker push $(REGISTRY)$(NAME_PHP56):latest
docker push $(REGISTRY)$(NAME_PHP56):$(FULLVERSION_PHP56)
docker push $(REGISTRY)$(NAME_PHP56):$(SHORTVERSION_PHP56)
clean_php56:
rm -rf build_php56
......@@ -328,22 +372,31 @@ clean_images_php56:
docker rmi $(NAME_PHP56):latest || true
docker rmi $(NAME_PHP56):$(SHORTVERSION_PHP56) || true
docker rmi $(NAME_PHP56):$(FULLVERSION_PHP56) || true
docker rmi $(REGISTRY)$(NAME_PHP56):latest || true
docker rmi $(REGISTRY)$(NAME_PHP56):$(SHORTVERSION_PHP56) || true
docker rmi $(REGISTRY)$(NAME_PHP56):$(FULLVERSION_PHP56) || true
build_php70: build_baseimage
build_php70:
rm -rf build_php70
cp -pR php70 build_php70
docker build -t $(NAME_PHP70):$(FULLVERSION_PHP70) build_php70
docker tag $(NAME_PHP70):$(FULLVERSION_PHP70) $(NAME_PHP70):$(SHORTVERSION_PHP70)
docker tag $(NAME_PHP70):$(FULLVERSION_PHP70) $(REGISTRY)$(NAME_PHP70):$(SHORTVERSION_PHP70)
docker tag $(NAME_PHP70):$(FULLVERSION_PHP70) $(REGISTRY)$(NAME_PHP70):$(FULLVERSION_PHP70)
release_php70:
@if ! docker images $(NAME_PHP70) | awk '{ print $$2 }' | grep -q -F $(FULLVERSION_PHP70); then \
echo "$(NAME_PHP70) version $(FULLVERSION_PHP70) is not yet built. Please run 'make build'"; false; \
fi
docker tag $(NAME_PHP70):$(FULLVERSION_PHP70) $(NAME_PHP70):latest
docker tag $(NAME_PHP70):$(FULLVERSION_PHP70) $(REGISTRY)$(NAME_PHP70):latest
docker push $(NAME_PHP70):latest
docker push $(NAME_PHP70):$(FULLVERSION_PHP70)
docker push $(NAME_PHP70):$(SHORTVERSION_PHP70)
docker push $(REGISTRY)$(NAME_PHP70):latest
docker push $(REGISTRY)$(NAME_PHP70):$(FULLVERSION_PHP70)
docker push $(REGISTRY)$(NAME_PHP70):$(SHORTVERSION_PHP70)
clean_php70:
rm -rf build_php70
......@@ -352,22 +405,31 @@ clean_images_php70:
docker rmi $(NAME_PHP70):latest || true
docker rmi $(NAME_PHP70):$(SHORTVERSION_PHP70) || true
docker rmi $(NAME_PHP70):$(FULLVERSION_PHP70) || true
docker rmi $(REGISTRY)$(NAME_PHP70):latest || true
docker rmi $(REGISTRY)$(NAME_PHP70):$(SHORTVERSION_PHP70) || true
docker rmi $(REGISTRY)$(NAME_PHP70):$(FULLVERSION_PHP70) || true
build_php71: build_baseimage
build_php71:
rm -rf build_php71
cp -pR php71 build_php71
docker build -t $(NAME_PHP71):$(FULLVERSION_PHP71) build_php71
docker tag $(NAME_PHP71):$(FULLVERSION_PHP71) $(NAME_PHP71):$(SHORTVERSION_PHP71)
docker tag $(NAME_PHP71):$(FULLVERSION_PHP71) $(REGISTRY)$(NAME_PHP71):$(SHORTVERSION_PHP71)
docker tag $(NAME_PHP71):$(FULLVERSION_PHP71) $(REGISTRY)$(NAME_PHP71):$(FULLVERSION_PHP71)
release_php71:
@if ! docker images $(NAME_PHP71) | awk '{ print $$2 }' | grep -q -F $(FULLVERSION_PHP71); then \
echo "$(NAME_PHP71) version $(FULLVERSION_PHP71) is not yet built. Please run 'make build'"; false; \
fi
docker tag $(NAME_PHP71):$(FULLVERSION_PHP71) $(NAME_PHP71):latest
docker tag $(NAME_PHP71):$(FULLVERSION_PHP71) $(REGISTRY)$(NAME_PHP71):latest
docker push $(NAME_PHP71):latest
docker push $(NAME_PHP71):$(FULLVERSION_PHP71)
docker push $(NAME_PHP71):$(SHORTVERSION_PHP71)
docker push $(REGISTRY)$(NAME_PHP71):latest
docker push $(REGISTRY)$(NAME_PHP71):$(FULLVERSION_PHP71)
docker push $(REGISTRY)$(NAME_PHP71):$(SHORTVERSION_PHP71)
clean_php71:
rm -rf build_php71
......@@ -376,22 +438,31 @@ clean_images_php71:
docker rmi $(NAME_PHP71):latest || true
docker rmi $(NAME_PHP71):$(SHORTVERSION_PHP71) || true
docker rmi $(NAME_PHP71):$(FULLVERSION_PHP71) || true
docker rmi $(REGISTRY)$(NAME_PHP71):latest || true
docker rmi $(REGISTRY)$(NAME_PHP71):$(SHORTVERSION_PHP71) || true
docker rmi $(REGISTRY)$(NAME_PHP71):$(FULLVERSION_PHP71) || true
build_php72: build_baseimage
build_php72:
rm -rf build_php72
cp -pR php72 build_php72
docker build -t $(NAME_PHP72):$(FULLVERSION_PHP72) build_php72
docker tag $(NAME_PHP72):$(FULLVERSION_PHP72) $(NAME_PHP72):$(SHORTVERSION_PHP72)
docker tag $(NAME_PHP72):$(FULLVERSION_PHP72) $(REGISTRY)$(NAME_PHP72):$(SHORTVERSION_PHP72)
docker tag $(NAME_PHP72):$(FULLVERSION_PHP72) $(REGISTRY)$(NAME_PHP72):$(FULLVERSION_PHP72)
release_php72:
@if ! docker images $(NAME_PHP72) | awk '{ print $$2 }' | grep -q -F $(FULLVERSION_PHP72); then \
echo "$(NAME_PHP72) version $(FULLVERSION_PHP72) is not yet built. Please run 'make build'"; false; \
fi
docker tag $(NAME_PHP72):$(FULLVERSION_PHP72) $(NAME_PHP72):latest
docker tag $(NAME_PHP72):$(FULLVERSION_PHP72) $(REGISTRY)$(NAME_PHP72):latest
docker push $(NAME_PHP72):latest
docker push $(NAME_PHP72):$(FULLVERSION_PHP72)
docker push $(NAME_PHP72):$(SHORTVERSION_PHP72)
docker push $(REGISTRY)$(NAME_PHP72):latest
docker push $(REGISTRY)$(NAME_PHP72):$(FULLVERSION_PHP72)
docker push $(REGISTRY)$(NAME_PHP72):$(SHORTVERSION_PHP72)
clean_php72:
rm -rf build_php72
......@@ -400,22 +471,31 @@ clean_images_php72:
docker rmi $(NAME_PHP72):latest || true
docker rmi $(NAME_PHP72):$(SHORTVERSION_PHP72) || true
docker rmi $(NAME_PHP72):$(FULLVERSION_PHP72) || true
docker rmi $(REGISTRY)$(NAME_PHP72):latest || true
docker rmi $(REGISTRY)$(NAME_PHP72):$(SHORTVERSION_PHP72) || true
docker rmi $(REGISTRY)$(NAME_PHP72):$(FULLVERSION_PHP72) || true
build_php73: build_baseimage
build_php73:
rm -rf build_php73
cp -pR php73 build_php73
docker build -t $(NAME_PHP73):$(FULLVERSION_PHP73) build_php73
docker tag $(NAME_PHP73):$(FULLVERSION_PHP73) $(NAME_PHP73):$(SHORTVERSION_PHP73)
docker tag $(NAME_PHP73):$(FULLVERSION_PHP73) $(REGISTRY)$(NAME_PHP73):$(SHORTVERSION_PHP73)
docker tag $(NAME_PHP73):$(FULLVERSION_PHP73) $(REGISTRY)$(NAME_PHP73):$(FULLVERSION_PHP73)
release_php73:
@if ! docker images $(NAME_PHP73) | awk '{ print $$2 }' | grep -q -F $(FULLVERSION_PHP73); then \
echo "$(NAME_PHP73) version $(FULLVERSION_PHP73) is not yet built. Please run 'make build'"; false; \
fi
docker tag $(NAME_PHP73):$(FULLVERSION_PHP73) $(NAME_PHP73):latest
docker tag $(NAME_PHP73):$(FULLVERSION_PHP73) $(REGISTRY)$(NAME_PHP73):latest
docker push $(NAME_PHP73):latest
docker push $(NAME_PHP73):$(FULLVERSION_PHP73)
docker push $(NAME_PHP73):$(SHORTVERSION_PHP73)
docker push $(REGISTRY)$(NAME_PHP73):latest
docker push $(REGISTRY)$(NAME_PHP73):$(FULLVERSION_PHP73)
docker push $(REGISTRY)$(NAME_PHP73):$(SHORTVERSION_PHP73)
clean_php73:
rm -rf build_php73
......@@ -424,22 +504,31 @@ clean_images_php73:
docker rmi $(NAME_PHP73):latest || true
docker rmi $(NAME_PHP73):$(SHORTVERSION_PHP73) || true
docker rmi $(NAME_PHP73):$(FULLVERSION_PHP73) || true
docker rmi $(REGISTRY)$(NAME_PHP73):latest || true
docker rmi $(REGISTRY)$(NAME_PHP73):$(SHORTVERSION_PHP73) || true
docker rmi $(REGISTRY)$(NAME_PHP73):$(FULLVERSION_PHP73) || true
build_php74: build_baseimage
build_php74:
rm -rf build_php74
cp -pR php74 build_php74
docker build -t $(NAME_PHP74):$(FULLVERSION_PHP74) build_php74
docker tag $(NAME_PHP74):$(FULLVERSION_PHP74) $(NAME_PHP74):$(SHORTVERSION_PHP74)
docker tag $(NAME_PHP74):$(FULLVERSION_PHP74) $(REGISTRY)$(NAME_PHP74):$(SHORTVERSION_PHP74)
docker tag $(NAME_PHP74):$(FULLVERSION_PHP74) $(REGISTRY)$(NAME_PHP74):$(FULLVERSION_PHP74)
release_php74:
@if ! docker images $(NAME_PHP74) | awk '{ print $$2 }' | grep -q -F $(FULLVERSION_PHP74); then \
echo "$(NAME_PHP74) version $(FULLVERSION_PHP74) is not yet built. Please run 'make build'"; false; \
fi
docker tag $(NAME_PHP74):$(FULLVERSION_PHP74) $(NAME_PHP74):latest
docker tag $(NAME_PHP74):$(FULLVERSION_PHP74) $(REGISTRY)$(NAME_PHP74):latest
docker push $(NAME_PHP74):latest
docker push $(NAME_PHP74):$(FULLVERSION_PHP74)
docker push $(NAME_PHP74):$(SHORTVERSION_PHP74)
docker push $(REGISTRY)$(NAME_PHP74):latest
docker push $(REGISTRY)$(NAME_PHP74):$(FULLVERSION_PHP74)
docker push $(REGISTRY)$(NAME_PHP74):$(SHORTVERSION_PHP74)
clean_php74:
rm -rf build_php74
......@@ -448,9 +537,12 @@ clean_images_php74:
docker rmi $(NAME_PHP74):latest || true
docker rmi $(NAME_PHP74):$(SHORTVERSION_PHP74) || true
docker rmi $(NAME_PHP74):$(FULLVERSION_PHP74) || true
docker rmi $(REGISTRY)$(NAME_PHP74):latest || true
docker rmi $(REGISTRY)$(NAME_PHP74):$(SHORTVERSION_PHP74) || true
docker rmi $(REGISTRY)$(NAME_PHP74):$(FULLVERSION_PHP74) || true
build_bamboo: build_baseimage
build_bamboo:
rm -rf build_bamboo
cp -pR bamboo-remote-agent build_bamboo
docker build -t $(NAME_BAMBOO):$(FULLVERSION_BAMBOO) build_bamboo
......@@ -461,9 +553,15 @@ release_bamboo:
fi
docker tag $(NAME_BAMBOO):$(FULLVERSION_BAMBOO) $(NAME_BAMBOO):$(SHORTVERSION_BAMBOO)
docker tag $(NAME_BAMBOO):$(FULLVERSION_BAMBOO) $(NAME_BAMBOO):latest
docker tag $(NAME_BAMBOO):$(FULLVERSION_BAMBOO) $(REGISTRY)$(NAME_BAMBOO):$(SHORTVERSION_BAMBOO)
docker tag $(NAME_BAMBOO):$(FULLVERSION_BAMBOO) $(REGISTRY)$(NAME_BAMBOO):$(FULLVERSION_BAMBOO)
docker tag $(NAME_BAMBOO):$(FULLVERSION_BAMBOO) $(REGISTRY)$(NAME_BAMBOO):latest
docker push $(NAME_BAMBOO):latest
docker push $(NAME_BAMBOO):$(FULLVERSION_BAMBOO)
docker push $(NAME_BAMBOO):$(SHORTVERSION_BAMBOO)
docker push $(REGISTRY)$(NAME_BAMBOO):latest
docker push $(REGISTRY)$(NAME_BAMBOO):$(FULLVERSION_BAMBOO)
docker push $(REGISTRY)$(NAME_BAMBOO):$(SHORTVERSION_BAMBOO)
clean_bamboo:
rm -rf build_bamboo
......@@ -472,6 +570,9 @@ clean_images_bamboo:
docker rmi $(NAME_BAMBOO):latest || true
docker rmi $(NAME_BAMBOO):$(SHORTVERSION_BAMBOO) || true
docker rmi $(NAME_BAMBOO):$(FULLVERSION_BAMBOO) || true
docker rmi $(REGISTRY)$(NAME_BAMBOO):latest || true
docker rmi $(REGISTRY)$(NAME_BAMBOO):$(SHORTVERSION_BAMBOO) || true
docker rmi $(REGISTRY)$(NAME_BAMBOO):$(FULLVERSION_BAMBOO) || true
......@@ -486,9 +587,15 @@ release_js:
fi
docker tag $(NAME_JS):$(FULLVERSION_JS) $(NAME_JS):$(SHORTVERSION_JS)
docker tag $(NAME_JS):$(FULLVERSION_JS) $(NAME_JS):latest
docker tag $(NAME_JS):$(FULLVERSION_JS) $(REGISTRY)$(NAME_JS):$(SHORTVERSION_JS)
docker tag $(NAME_JS):$(FULLVERSION_JS) $(REGISTRY)$(NAME_JS):$(FULLVERSION_JS)
docker tag $(NAME_JS):$(FULLVERSION_JS) $(REGISTRY)$(NAME_JS):latest
docker push $(NAME_JS):latest
docker push $(NAME_JS):$(FULLVERSION_JS)
docker push $(NAME_JS):$(SHORTVERSION_JS)
docker push $(REGISTRY)$(NAME_JS):latest
docker push $(REGISTRY)$(NAME_JS):$(FULLVERSION_JS)
docker push $(REGISTRY)$(NAME_JS):$(SHORTVERSION_JS)
clean_js:
rm -rf build_js
......@@ -497,3 +604,6 @@ clean_images_js:
docker rmi $(NAME_JS):latest || true
docker rmi $(NAME_JS):$(SHORTVERSION_JS) || true
docker rmi $(NAME_JS):$(FULLVERSION_JS) || true
docker rmi $(REGISTRY)$(NAME_JS):latest || true
docker rmi $(REGISTRY)$(NAME_JS):$(SHORTVERSION_JS) || true
docker rmi $(REGISTRY)$(NAME_JS):$(FULLVERSION_JS) || true
......@@ -10,7 +10,7 @@ to execute the TYPO3 CMS core tests and other build and packaging jobs.
The containers may be used by anyone to execute tests locally in order to have the exact
same environment as the "pre-merge tests" run for the TYPO3 CMS core.
The latest compiled versions of those containers can be pulled from [Docker Hub](https://hub.docker.com/r/typo3gmbh/).
The latest compiled versions of those containers can be pulled from [Docker Hub](https://hub.docker.com/r/typo3gmbh/) or from [Github Container Registry](https://github.com/orgs/TYPO3GmbH/packages).
## Architecture
......@@ -52,13 +52,26 @@ run a database or selenium with chrome.
typo3gmbh/bamboo-remote-agent adds the bamboo test runner on top of the baseimage images for integration in
TYPO3 GmbH testing infrastructure. Users usually don't have to deal with these images and use the phpXY ones instead.
## Compiling and uploading
## Compiling and Uploading
A Makefile takes care of container building. One obvious reason to re-compile is when
container definitions have changed or added, another one is to have builds with younger
packages (eg. younger php versions). To create a new set of containers, these steps should be done:
* Prepare new semver versions in Makefile (and commit/push change): Each container has an own
version, raise at least the patch level.
* If files in one of the version directories get changed, the corresponding version is built automatically by Github
- version information is taken from the Makefile.
### New Base Image Release
If you want to use a new base image, adjust the base image version in all Dockerfiles. The change detection will then
take care of rebuilding the corresponding images.
## Manually Compiling and uploading
To create a new set of containers manually, these steps should be done:
* Pick a machine that has good network connectivity and a young docker engine installed.
* Drop all containers (docker rmi) that are involved in the build: the ubuntu 18.04 one, baseimage,
phpXY bulids and agent build. This forces docker to fetch / compile fresh versions of
......@@ -70,4 +83,75 @@ packages (eg. younger php versions). To create a new set of containers, these st
8 php containers in parallel, after baseimage has been built.
* 'make release' will add tags and push to docker hub. It will ask for according credentials.
If it doesn't, but reject the push' run 'docker login docker.io' and log in with the credentials from LastPass.
## Packages Included
### PHP Images
The images are based on Ubuntu 18.04 and usually contain the following extensions:
* bcmath
* bz2
* cli
* common
* curl
* dev
* gd
* gmp
* imap
* intl
* json
* ldap
* mbstring
* mysql
* opcache
* pgsql
* pspell
* readline
* soap
* sqlite3
* sqlsrv
* xml
* xmlrpc
* xsl
* zip
* apcu
* pear
* redis
* memcached
* xdebug
Additionally, the following packages / tools are installed:
* re2c
* graphicsmagick
* imagemagick
* zip
* unzip
* sqlite3
* nodejs / yarn / npm
* curl
* less
* vim
* psmisc
* net-tools
* iputils-ping
* ncdu
* dirmngr
* gpg-agent
* ack-grep
* bzip2
* pbzip2
* patch
* openssh-client
* git
* language-pack-de
* parallel
* netcat
### JS Image
The JavaScript image is based on node 12 and contains yarn in addition.
......@@ -4,4 +4,4 @@ source /pd_build/buildconfig
set -x
# And have yarn
npm install -g yarn
npm install -g --force yarn
FROM typo3gmbh/baseimage:3.0
FROM ghcr.io/typo3gmbh/baseimage:3.0.16
MAINTAINER TYPO3 GmbH <info@typo3.com>
ADD . /pd_build
......
FROM typo3gmbh/baseimage:3.0
FROM ghcr.io/typo3gmbh/baseimage:3.0.16
MAINTAINER TYPO3 GmbH <info@typo3.com>
ADD . /pd_build
......
FROM typo3gmbh/baseimage:3.0
FROM ghcr.io/typo3gmbh/baseimage:3.0.16
MAINTAINER TYPO3 GmbH <info@typo3.com>
ADD . /pd_build
......
FROM typo3gmbh/baseimage:3.0
FROM ghcr.io/typo3gmbh/baseimage:3.0.16
MAINTAINER TYPO3 GmbH <info@typo3.com>
ADD . /pd_build
......
FROM typo3gmbh/baseimage:3.0
FROM ghcr.io/typo3gmbh/baseimage:3.0.16
MAINTAINER TYPO3 GmbH <info@typo3.com>
ADD . /pd_build
......
......@@ -268,7 +268,7 @@ make && make install
echo 'extension=memcached.so' >> /usr/local/lib/php.ini
# xdebug
pecl install xdebug
pecl install --force xdebug-2.8.1
echo 'zend_extension=xdebug.so' >> /usr/local/lib/php.ini
echo "xdebug.max_nesting_level = 400" >> /usr/local/lib/php.ini
......
FROM typo3gmbh/baseimage:3.0
FROM ghcr.io/typo3gmbh/baseimage:3.0.16
MAINTAINER TYPO3 GmbH <info@typo3.com>
ADD . /pd_build
......
......@@ -70,8 +70,8 @@ ACCEPT_EULA=Y minimal_apt_get_install \
mssql-tools \
unixodbc-dev \
#