Skip to content

Commit

Permalink
[TASK] gitlab-ci: Merge 'early' state into 'main'
Browse files Browse the repository at this point in the history
Casual "pre-merge" patches (pushing a patch) to CI
gives us two stages: An "early" stage checking CGL
and composer basics, plus the "main" stage checking
everything else.

The goal with this approach is to return early on
simple errors like CGL violations without wasting
additional ressources on other things when those
pre-conditions fail.

In practice, an early "cgl broken" pipeline shadowes
possible further issues and extends runtime of
single builds since 'main' is only run after 'early'
has been successful.

The patch merges all "pre-merge" jobs into one
stage. This means more jobs are executed in parallel,
but we hope the infrastructure can cope with that.
If that works out, CI should answer more quickly
on single patches.

Resolves: #96841
Releases: main, 11.5
Change-Id: I986992f486b05845621f35228ae01b673368ba95
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/73436
Tested-by: core-ci <typo3@b13.com>
Tested-by: Stefan Bürk <stefan@buerk.tech>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Stefan Bürk <stefan@buerk.tech>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
  • Loading branch information
lolli42 committed Feb 12, 2022
1 parent 6361a1c commit b99ca64
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 28 deletions.
2 changes: 0 additions & 2 deletions Build/gitlab-ci.yml
Expand Up @@ -50,7 +50,6 @@ image: typo3/core-testing-docker:latest

stages:
# Stages for pre-merge
- early
- main
# Stages for nightly
- integrity
Expand All @@ -62,7 +61,6 @@ include:
# Pre-merge tests are triggered by pushing to changes to gerrit.
# A push to gerrit has a change-id and a patch-set, a gerrit-gitlab-adapter
# turns this into a branch 'change-patchset' which executes the pipeline
- local: 'Build/gitlab-ci/pre-merge/early.yml'
- local: 'Build/gitlab-ci/pre-merge/acceptance-install.yml'
- local: 'Build/gitlab-ci/pre-merge/acceptance-application.yml'
- local: 'Build/gitlab-ci/pre-merge/integrity.yml'
Expand Down
9 changes: 1 addition & 8 deletions Build/gitlab-ci/nightly/integrity.yml
Expand Up @@ -16,14 +16,6 @@ cgl:
- Build/Scripts/runTests.sh -s composerInstall -p 8.1
- Build/Scripts/runTests.sh -s cgl -n -p 8.1

composer validate:
stage: integrity
needs: []
only:
- schedules
script:
- Build/Scripts/runTests.sh -s composerValidate -p 8.1

grunt clean:
stage: integrity
needs: []
Expand All @@ -46,6 +38,7 @@ integration various:
paths:
- .cache
script:
- Build/Scripts/runTests.sh -s composerValidate -p 8.1
- Build/Scripts/runTests.sh -s composerTestDistribution -p 8.1
- Build/Scripts/runTests.sh -s composerInstall -p 8.1
- Build/Scripts/runTests.sh -s checkExceptionCodes -p 8.1
Expand Down
18 changes: 0 additions & 18 deletions Build/gitlab-ci/pre-merge/early.yml

This file was deleted.

11 changes: 11 additions & 0 deletions Build/gitlab-ci/pre-merge/integrity.yml
Expand Up @@ -8,6 +8,16 @@ annotations php 8.1 pre-merge:
- Build/Scripts/runTests.sh -s composerInstall -p 8.1
- Build/Scripts/runTests.sh -s checkAnnotations -p 8.1

cgl pre-merge:
stage: main
except:
refs:
- schedules
- main
script:
- Build/Scripts/runTests.sh -s composerInstall -p 8.1
- Build/Scripts/runTests.sh -s cglGit -n -p 8.1

grunt clean pre-merge:
stage: main
except:
Expand All @@ -32,6 +42,7 @@ integration various pre-merge:
paths:
- .cache
script:
- Build/Scripts/runTests.sh -s composerValidate -p 8.1
- Build/Scripts/runTests.sh -s composerTestDistribution -p 8.1
- Build/Scripts/runTests.sh -s composerInstall -p 8.1
- Build/Scripts/runTests.sh -s checkExceptionCodes -p 8.1
Expand Down

0 comments on commit b99ca64

Please sign in to comment.