Skip to content

Commit

Permalink
[TASK] runTests.sh with podman, new CI
Browse files Browse the repository at this point in the history
This patch is paired with the setup of a new CI [1].

The patch adapts runTests.sh to allow podman as
container environment next to docker. New CI relies
on podman.

Locally, podman can be selected as container environment
using the `-b podman` flag to runTests.sh. A "recent"
podman version - at least around 4.x - should be used.
docker is kept as default for now.

The new CI setup comes with a series of improvements
to speed up things. This makes the acceptance tests
a bit more brittle again. The patch comes with some
further stabilizations, and we may add even more with
dedicated patches later.

[1] https://git.typo3.org/typo3/CI/testing-infrastructure/

Change-Id: I206c1577335bfbefb801eaababa4b713e1edda12
Resolves: #102385
Releases: main, 12.4, 11.5
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/81792
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: core-ci <typo3@b13.com>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
  • Loading branch information
lolli42 committed Nov 23, 2023
1 parent 8d400de commit 16001a5
Show file tree
Hide file tree
Showing 26 changed files with 513 additions and 342 deletions.
209 changes: 118 additions & 91 deletions Build/Scripts/runTests.sh

Large diffs are not rendered by default.

29 changes: 1 addition & 28 deletions Build/gitlab-ci.yml
@@ -1,6 +1,6 @@
default:
# Always retry a failed job, so it has a chance to recover from a faulty machine, network or timing issue
retry: 1
retry: 2
# Any job taking longer than this is considered 'failed'
timeout: 30m

Expand All @@ -10,16 +10,6 @@ variables:
# and fails with package conflicts. Having a full clone by setting depth 0
# prevents this, so we don't need to fiddle with COMPOSER_ROOT_VERSION env var.
GIT_DEPTH: 0
# Remove the usage of umask 0000 call for jobs executed with docker executor.
# gitlab repo clones otherwise lead to funny file permissions,
# which especially confuses runTests.sh -s checkPermissions
FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR: 1
# Each script line from will be in a collapsible section in the job output
# and show the duration of each line.
FF_SCRIPT_SECTIONS: 1
# The project directory will be cleaned up at the end of the build with a
# series of git clean commands, with our git fetch strategy.
FF_ENABLE_JOB_CLEANUP: 1

cache:
# Default caching of .cache directory if a job does not override it.
Expand All @@ -36,23 +26,6 @@ cache:
paths:
- .cache

services:
# Each job starts two containers: This dind container that starts a docker
# daemon, plus a casual container that executes runTests.sh for single jobs
# to start containers within the dind container.
# @todo Using custom dind image meanwhile to mitigate gitlab-runner healthcheck issue:
# See: https://gitlab.com/gitlab-org/gitlab-runner/-/issues/29130
# Original: docker:20.10-dind
- name: typo3/core-testing-docker-dind:latest
alias: docker

# This is *never* overridden in single jobs. All jobs start a 'dind' service
# so runTests.sh starts 'sub' containers within the dind container, and this
# main entry point container executes runTests.sh to start containers.
# @todo ^1.2 builds seems to be broken. This leads to endless pulls by not using the proxy registry and failing
# acceptance install tests. Pin it to latest working version and investigate later.
image: typo3/core-testing-docker:1.1.0

stages:
# Stages for pre-merge
- main
Expand Down
18 changes: 18 additions & 0 deletions Build/gitlab-ci/nightly/acceptance-application.yml
@@ -1,5 +1,7 @@
acceptance application mariadb 10.3 php 7.4 locked:
stage: acceptance
tags:
- metal2
needs: []
only:
- schedules
Expand All @@ -14,6 +16,8 @@ acceptance application mariadb 10.3 php 7.4 locked:
- Build/Scripts/runTests.sh -s acceptance -d mariadb -i 10.3 -p 7.4 -c $CI_NODE_INDEX/$CI_NODE_TOTAL
acceptance application mariadb 10.3 php 7.4 max:
stage: acceptance
tags:
- metal2
needs: []
only:
- schedules
Expand All @@ -32,6 +36,8 @@ acceptance application mariadb 10.3 php 7.4 max:
- Build/Scripts/runTests.sh -s acceptance -d mariadb -i 10.3 -p 7.4 -c $CI_NODE_INDEX/$CI_NODE_TOTAL
acceptance application mariadb 10.3 php 7.4 min:
stage: acceptance
tags:
- metal2
needs: []
only:
- schedules
Expand All @@ -51,6 +57,8 @@ acceptance application mariadb 10.3 php 7.4 min:

acceptance application mariadb 10.3 php 8.0 locked:
stage: acceptance
tags:
- metal2
needs: []
only:
- schedules
Expand All @@ -65,6 +73,8 @@ acceptance application mariadb 10.3 php 8.0 locked:
- Build/Scripts/runTests.sh -s acceptance -d mariadb -i 10.3 -p 8.0 -c $CI_NODE_INDEX/$CI_NODE_TOTAL
acceptance application mariadb 10.3 php 8.0 max:
stage: acceptance
tags:
- metal2
needs: []
only:
- schedules
Expand All @@ -83,6 +93,8 @@ acceptance application mariadb 10.3 php 8.0 max:
- Build/Scripts/runTests.sh -s acceptance -d mariadb -i 10.3 -p 8.0 -c $CI_NODE_INDEX/$CI_NODE_TOTAL
acceptance application mariadb 10.3 php 8.0 min:
stage: acceptance
tags:
- metal2
needs: []
only:
- schedules
Expand All @@ -102,6 +114,8 @@ acceptance application mariadb 10.3 php 8.0 min:

acceptance application mariadb 10.10 php 8.2 locked:
stage: acceptance
tags:
- metal2
needs: []
only:
- schedules
Expand All @@ -116,6 +130,8 @@ acceptance application mariadb 10.10 php 8.2 locked:
- Build/Scripts/runTests.sh -s acceptance -d mariadb -i 10.10 -p 8.2 -c $CI_NODE_INDEX/$CI_NODE_TOTAL
acceptance application mariadb 10.10 php 8.2 max:
stage: acceptance
tags:
- metal2
needs: []
only:
- schedules
Expand All @@ -134,6 +150,8 @@ acceptance application mariadb 10.10 php 8.2 max:
- Build/Scripts/runTests.sh -s acceptance -d mariadb -i 10.10 -p 8.2 -c $CI_NODE_INDEX/$CI_NODE_TOTAL
acceptance application mariadb 10.10 php 8.2 min:
stage: acceptance
tags:
- metal2
needs: []
only:
- schedules
Expand Down

0 comments on commit 16001a5

Please sign in to comment.