The TYPO3 core `runTests.sh` contains the `-u` option to
update the images and remove dangling images. Providing
an image name and a `--filter` option is not supported
by podmand and has not been discovered yet in the TYPO3
core implementation yet - and adopted with the recently
sync of this repository implementation to the TYPO3 one.
Both supported docker binaries `docker` and `podman`
supportes filtering images using the `reference` filter
option. Therefore, this change modifies the dangling
image remove command to use double filter options.
To verify that double filtering can be used, following
command can be executed if already some images have
been downloaded:
```shell
podman images \
--filter "reference=ghcr.io/sbuerk/demo-core-testing-*"
--filter "dangling=false" --format "{{.ID}}"
docker images \
--filter "reference=ghcr.io/sbuerk/demo-core-testing-*"
--filter "dangling=false" --format "{{.ID}}"
```
**Note:** `dangling=false` is used here instead of
`dangling=true` like in `runTests.sh`
Resolves: #1088
The TYPO3 core runTests.sh has been using the
uid option for the tmpfs mount in the past
and removed it due to the fact it's not supported
by the podman container binary.
This has been missed to change along with the
introduction of the `-b` container binary option
in #1075 and therefore the podmand and docker dual
support.
For example, following
```shell
--tmpfs ${ROOT_DIR}/typo3temp/var/tests/functional-sqlite-dbs/:rw,noexec,nosuid,uid=${HOST_UID}
```
is changed to
```shell
--tmpfs ${ROOT_DIR}/typo3temp/var/tests/functional-sqlite-dbs/:rw,noexec,nosuid
```
which works for both binaries in case of tmpfs mounts.
Resolves: #1087Resolves: #1083
Related: #1075
With 8a2e0cb the `-b` option to select the container
binary (podman or docker) has been added. During the
adoption from the TYPO3 core implementation, it has
been discoverd that the simplified checks are not
really working and changed to the better supported
version.
Sadly, it have been missed to do the at all places
correctly.
This change covers that and modifies `runTests.sh`
to use the better supported condition form for the
container binary checks introduced with 8a2e0cb.
For example, conditions like
```shell
if [ ${CONTAINER_BIN} = "" ]; then ..
```
are changed to
```shell
if [ "${CONTAINER_BIN}" == "" ]; then ..
```
Resolves: #1085
The TYPO3 core testing images only adds stuffs which is
required for the core testing itself and which can be
considered as generic project and extension testing
requirement.
This extension uses advanced `find` options which are
not part of the base busybox provided tools used by
the alpine base image, for example for the `lintYaml`
command in `Build/Scripts/runTests.sh`.
The used `-regextype` option of the `find` binary does
not exists in the stripped down busybox implementation
used by the alpine base images. The `findutils` package
is required to provide the gnu `find` command supporting
this and other advanced options, which can be found as
a solution here:
https://github.com/nextcloud/docker/issues/282
Due to the fact that the additional package will not
make the way into the TYPO3 core images like other
requirements some project or extension may have, a
demonstration github repository has been created some
time ago to demonstrate automatic extended image builds
based on the core testing images. These images already
contains stuff which is required by some projects and
extensions - and the gnu `findutils` package has been
added to these images now with the feature commit
9f8b125b6a
This change switches the used php images from the
`typo3/core-testing-phpXY` images to the extended
`sbuerk/demo-core-testing-phpXY` images.
Can be tested and verified by using
```shell
./Build/Scripts/runTests.sh -s lintYaml
```
with and without this change.
Resolves: #966
TYPO3 core introduced the `-b` option for the
`Build/Scripts/runTests.sh` script to provide
the ability to select the container binary,
`docker` or `podman` and enforces podman for
CI (GitLab runner) runs after switching the
Core CI infrastructure from Docker-In-Docker
to Podman-In-Podman.
The `ext:tea` adoption of the `runTests.sh`
has been already adopted on a intermediate
version and dropped the `docker-compose`
based container definitions. Along with
other minor prepration patches this allows
now to add the container binary selection
also.
This change modifies `runTests.sh` to
* add the `-b` option with a corresponding
helptext addition and allows `podman` or
`docker` - whereas the latter is the default.
* integrates the determined and fixed issues
with tty in CI environments by setting some
paramater for the commands based on the CI
detection (GitHub Action or GitLab Runner).
Note: The implemention for `ext:tea` does not
enforce hardcoed the `podman` binary for
CI environments. If no user selection is
provided, it fallbacks to `docker` for
all environments.
It's worth to mention that the implementation to
deal properly with user namespacing and permission
handling on mountend volumns it's required to have
at least `podman 4.x` installed. Earlier versions
does not support the required handlinging and options.
Minor moving of variable declaration are done as a
drive-by change.
The `docsGenerate` suite has been guard and display
a concrete message when executed using the `podman`
binary.
Resolves: #1075
Related: #969
Also use stricter exclusion paths to avoid skipping JSON files that
we actually want to lint.
This change speeds up JSON lint a lot in cases where Composer from
within `runTests.sh` has been used (which creates the `.cache/`
directory).
Fixes#1046
The adopted `Build/Scripts/runTests.sh` contains traces
of acceptance and acceptanceInstall, mainly in the help
text.
The occurances are left-overs from the adoption phase
and are now removed due to the fact they are currently
not available at all.
Resolves: #1068
Related: #969
TYPO3 provides core testing docker images which
the core itself uses for the Core testing. Core
stopped publishing new image builds to the docker
hub already and only publish to the GitHub container
registry in the future.
Therefore, the image prefix switch between CI and
local does not make sense anymore.
This change removes the image prefix variables and
use public images directly from docker hub and the
core testing images from the TYPO3 `ghcr.io` repo.
Resolves: #1066
Related: #969
Until now three different dbmns version options
has been used like the TYPO3 core in older days.
This change aligns with the TYPO3 core and merge
these options together into one flag, keeping
`-i` for all dbms vendors now and dropping `-k`
for postgres and `-j` for mysql specific versions.
The help text is modified to align with the changed
options.
Resolves: #1062
Related: #969
Some Composer scripts do not make sense as they call other scripts
that only make sense when called separately. This change removes
those multi-scripts that are practically useless.
`Build/Scripts/runTests.sh` provides a test-suite `composer`
and allows passing additional command and options directly
down to the composer command.
Due to an invalid quoting the passed options were broking
and not regonized by the `composer` binary.
This change removes the superflous argument passing
and therefore allows passing additional options to the
`composer` command.
Resolves: #967