Skip to content

move-elevator/gitlab-ci-templates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

86 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

GitLab-CI Templates

CGL License

This repository provides useful templates for reusable GitLab-CI jobs in move:elevator projects. It is not meant to be used anywhere else.

๐Ÿ”ฅ Installation

See .gitlab-ci.yml.dist for an example GitLab-CI configuration.

Use include to reference template files:

include:
   - 'https://raw.githubusercontent.com/move-elevator/gitlab-ci-templates/main/.base.yml'
   - 'https://raw.githubusercontent.com/move-elevator/gitlab-ci-templates/main/build/build-php.yml'
   - ... 

Extend and override configuration variables, see .base.yaml for predefined variables.

variables:
  BUILD_NODE_VERSION: "22"

Extend and override further ci jobs.

๐Ÿ“‚ Templates

  • .base.yml: Base configuration, including common variables and stages, required for all projects.

Build

Build the project and its assets.

Includes:

  • build/build-php.yml
  • build/build-node.yaml

Analysis

Analyze code quality and static analysis.

Includes:

  • analyze/analyze-composer-lint.yaml
  • analyze/analyze-editorconfig.yaml
  • analyze/analyze-js-lint.yaml
  • analyze/analyze-php-cs-fixer.yaml
  • analyze/analyze-php-rector.yaml
  • analyze/analyze-php-stan.yaml
  • analyze/analyze-style-lint.yaml
  • analyze/analyze-typoscript-lint.yaml
  • analyze/analyze-xml-lint.yaml
  • analyze/analyze-yaml-lint.yaml

Note

The analyze jobs have changes triggers for the respective files, so they only run when relevant files are changed.

Feature Branch Deployment

Deploy feature branches to a dedicated environment.

The deployment uses deployer and deployer-tools as deployment base.

Includes:

  • deploy/deploy-feature.yaml
  • deploy/deploy-feature-rollback.yaml
  • deploy/deploy-feature-cleanup.yaml
  • deploy/deploy-feature-cleanup-downstream.yaml

Note

The cleanup of a feature branch is a little bit tricky. It may happen that the branch has been deleted, triggering the deploy:feature:cleanup job. However, since the application code in the branch is no longer available at this point and the cleanup logic and configuration are therefore no longer present, the cleanup is delegated to another branch (usually the main branch) via the downstream pipeline.

Prod Deployment

Deployment to production environment.

The deployment uses deployer and deployer-tools as deployment base.

Includes:

  • deploy/deploy-prod.yaml
  • deploy/deploy-prod-rollback.yaml

Release

Create a GitLab release with release notes.

Includes:

  • build/build-release-notes.yaml
  • release/release.yaml

Testing

Run acceptance tests using Codeception.

Includes:

  • test/test-feature-codeception.yaml
  • test/test-prod-codeception.yaml

Cache Warmup

Warm up the cache after deployment using EXT:typo3-warming.

Includes:

  • cache/cache-feature-warmup.yaml
  • cache/cache-prod-warmup.yaml

โญ License

This project is licensed under GNU General Public License 3.0 (or later).

About

๐Ÿ“‘ Collection of useful GitLab CI templates.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published