Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Stud.IP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jan-Hendrik Willms
Stud.IP
Commits
02c7e48b
Commit
02c7e48b
authored
7 months ago
by
Jan-Hendrik Willms
Browse files
Options
Downloads
Patches
Plain Diff
optimize pipeline by running jobs depending on relevant changes
parent
b961dfa6
No related branches found
No related tags found
1 merge request
!17
Draft: Ci opt
Pipeline
#29115
skipped
Stage: build
Stage: test
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
.editorconfig
+3
-0
3 additions, 0 deletions
.editorconfig
.gitlab-ci.yml
+86
-41
86 additions, 41 deletions
.gitlab-ci.yml
with
89 additions
and
41 deletions
.editorconfig
+
3
−
0
View file @
02c7e48b
...
@@ -20,3 +20,6 @@ block_comment_start = /*
...
@@ -20,3 +20,6 @@ block_comment_start = /*
block_comment_end
=
*/
block_comment_end
=
*/
line_comment
=
//
line_comment
=
//
quote_type
=
single
quote_type
=
single
[*.yml]
indent_size
=
2
\ No newline at end of file
This diff is collapsed.
Click to expand it.
.gitlab-ci.yml
+
86
−
41
View file @
02c7e48b
...
@@ -33,18 +33,18 @@ stages:
...
@@ -33,18 +33,18 @@ stages:
-
release
-
release
.scripts
:
.scripts
:
mkdir-caches
:
&mkdir-caches
mkdir-caches
:
-
mkdir -p $CACHE_DIR
-
mkdir -p $CACHE_DIR
mkdir-reports
:
&mkdir-reports
mkdir-reports
:
-
mkdir -p $REPORT_DIR
-
mkdir -p $REPORT_DIR
install-composer
:
&install-composer
install-composer
:
-
make composer-dev
-
make composer-dev
configure-studip
:
&configure-studip
configure-studip
:
-
*
install-composer
-
!reference
[
.scripts
,
install-composer
]
-
cp docker/studip/config_local.php config/config_local.inc.php
-
cp docker/studip/config_local.php config/config_local.inc.php
-
cp config/config.inc.php.dist config/config.inc.php
-
cp config/config.inc.php.dist config/config.inc.php
initialize-studip-database
:
&initialize-studip-database
initialize-studip-database
:
-
*
configure-studip
-
!reference
[
.scripts
,
configure-studip
]
-
chmod +x .gitlab/scripts/install_db.sh
-
chmod +x .gitlab/scripts/install_db.sh
-
.gitlab/scripts/install_db.sh
-
.gitlab/scripts/install_db.sh
-
cli/studip migrate
-
cli/studip migrate
...
@@ -57,21 +57,40 @@ stages:
...
@@ -57,21 +57,40 @@ stages:
paths
:
paths
:
-
composer/
-
composer/
policy
:
pull
policy
:
pull
npm
:
&npm-cache
npm
:
key
:
key
:
files
:
files
:
-
package-lock.json
-
package-lock.json
paths
:
paths
:
-
.npm
-
.npm
.
definition
s
:
.
service
s
:
mariadb
-service
:
&mariadb-service
mariadb
:
-
name
:
mariadb
-
name
:
mariadb
command
:
[
"
--sql_mode="
,
"
--character-set-client=utf8"
,
"
--character-set-server=utf8"
,
"
--collation-server=utf8_unicode_ci"
]
command
:
[
"
--sql_mode="
,
"
--character-set-client=utf8"
,
"
--character-set-server=utf8"
,
"
--collation-server=utf8_unicode_ci"
]
.definitions
:
php-changed
:
-
changes
:
-
"
**/*.php"
-
composer.json
-
composer.lock
css-changed
:
-
changes
:
-
"
resources/assets/stylesheets/**/*"
-
"
resources/vue/**/*"
-
package-lock.json
js-changed
:
-
changes
:
-
"
resources/assets/javascripts/**/*"
-
"
resources/vue/**/*"
-
package-lock.json
build-composer
:
build-composer
:
stage
:
build
stage
:
build
needs
:
[]
needs
:
[]
rules
:
-
!reference
[
.definitions
,
php-changed
]
interruptible
:
true
interruptible
:
true
variables
:
variables
:
COMPOSER_CACHE
:
$CACHE_DIR/composer-cache
COMPOSER_CACHE
:
$CACHE_DIR/composer-cache
...
@@ -80,7 +99,7 @@ build-composer:
...
@@ -80,7 +99,7 @@ build-composer:
script
:
script
:
-
composer install
-
composer install
cache
:
cache
:
-
*
composer
-cache
-
!reference
[
.caches
,
composer
]
-
key
:
composer-package-cache
-
key
:
composer-package-cache
paths
:
paths
:
-
$COMPOSER_CACHE
-
$COMPOSER_CACHE
...
@@ -89,20 +108,22 @@ build-composer:
...
@@ -89,20 +108,22 @@ build-composer:
lint-php
:
lint-php
:
stage
:
checks
stage
:
checks
needs
:
[
build-composer
]
needs
:
[
build-composer
]
rules
:
-
!reference
[
.definitions
,
php-changed
]
variables
:
variables
:
CACHE_LOCATION
:
$CACHE_DIR/phplint-cache
CACHE_LOCATION
:
$CACHE_DIR/phplint-cache
PHPLINT_JSON_REPORT
:
$REPORT_DIR/phplint-report.json
PHPLINT_JSON_REPORT
:
$REPORT_DIR/phplint-report.json
PHPLINT_CODE_QUALITY_REPORT
:
$REPORT_DIR/phplint-codequality.json
PHPLINT_CODE_QUALITY_REPORT
:
$REPORT_DIR/phplint-codequality.json
interruptible
:
true
interruptible
:
true
cache
:
cache
:
-
*
composer
-cache
-
!reference
[
.caches
,
composer
]
-
key
:
"
$CI_JOB_NAME_SLUG:$CI_COMMIT_REF_SLUG"
-
key
:
"
$CI_JOB_NAME_SLUG:$CI_COMMIT_REF_SLUG"
paths
:
paths
:
-
$CACHE_LOCATION
-
$CACHE_LOCATION
before_script
:
before_script
:
-
*
mkdir-caches
-
!reference
[
.scripts
,
mkdir-caches
]
-
*
mkdir-reports
-
!reference
[
.scripts
,
mkdir-reports
]
-
*
install-composer
-
!reference
[
.scripts
,
install-composer
]
script
:
script
:
-
COMPOSER_MEMORY_LIMIT=-1
-
COMPOSER_MEMORY_LIMIT=-1
composer exec phplint
composer exec phplint
...
@@ -118,6 +139,8 @@ lint-php:
...
@@ -118,6 +139,8 @@ lint-php:
lint-php-8.3
:
lint-php-8.3
:
image
:
studip/studip:tests-php8.3
image
:
studip/studip:tests-php8.3
stage
:
checks
stage
:
checks
rules
:
-
!reference
[
.definitions
,
php-changed
]
needs
:
[
build-composer
]
needs
:
[
build-composer
]
variables
:
variables
:
CACHE_LOCATION
:
$CACHE_DIR/phplint-cache
CACHE_LOCATION
:
$CACHE_DIR/phplint-cache
...
@@ -125,14 +148,14 @@ lint-php-8.3:
...
@@ -125,14 +148,14 @@ lint-php-8.3:
PHPLINT_CODE_QUALITY_REPORT
:
$REPORT_DIR/phplint-codequality-8.3.json
PHPLINT_CODE_QUALITY_REPORT
:
$REPORT_DIR/phplint-codequality-8.3.json
interruptible
:
true
interruptible
:
true
cache
:
cache
:
-
*
composer
-cache
-
!reference
[
.caches
,
composer
]
-
key
:
"
$CI_JOB_NAME_SLUG:$CI_COMMIT_REF_SLUG"
-
key
:
"
$CI_JOB_NAME_SLUG:$CI_COMMIT_REF_SLUG"
paths
:
paths
:
-
$CACHE_LOCATION
-
$CACHE_LOCATION
before_script
:
before_script
:
-
*
mkdir-caches
-
!reference
[
.scripts
,
mkdir-caches
]
-
*
mkdir-reports
-
!reference
[
.scripts
,
mkdir-reports
]
-
*
install-composer
-
!reference
[
.scripts
,
install-composer
]
script
:
script
:
-
COMPOSER_MEMORY_LIMIT=-1
-
COMPOSER_MEMORY_LIMIT=-1
composer exec phplint
composer exec phplint
...
@@ -148,6 +171,8 @@ lint-php-8.3:
...
@@ -148,6 +171,8 @@ lint-php-8.3:
lint-js
:
lint-js
:
stage
:
checks
stage
:
checks
needs
:
[]
needs
:
[]
rules
:
-
!reference
[
.definitions
,
js-changed
]
image
:
$NODE_IMAGE
image
:
$NODE_IMAGE
variables
:
variables
:
CACHE_LOCATION
:
$CACHE_DIR/eslint-cache
CACHE_LOCATION
:
$CACHE_DIR/eslint-cache
...
@@ -158,7 +183,7 @@ lint-js:
...
@@ -158,7 +183,7 @@ lint-js:
-
$CACHE_LOCATION
-
$CACHE_LOCATION
interruptible
:
true
interruptible
:
true
before_script
:
before_script
:
-
*
mkdir-reports
-
!reference
[
.scripts
,
mkdir-reports
]
-
npm install -g npm@7
-
npm install -g npm@7
-
npm install
-
npm install
--no-save --no-audit --no-fund
--no-save --no-audit --no-fund
...
@@ -177,6 +202,8 @@ lint-js:
...
@@ -177,6 +202,8 @@ lint-js:
lint-css
:
lint-css
:
stage
:
checks
stage
:
checks
needs
:
[]
needs
:
[]
rules
:
-
!reference
[
.definitions
,
css-changed
]
image
:
$NODE_IMAGE
image
:
$NODE_IMAGE
variables
:
variables
:
CACHE_LOCATION
:
$CACHE_DIR/stylelint-cache
CACHE_LOCATION
:
$CACHE_DIR/stylelint-cache
...
@@ -187,7 +214,7 @@ lint-css:
...
@@ -187,7 +214,7 @@ lint-css:
paths
:
paths
:
-
$CACHE_LOCATION
-
$CACHE_LOCATION
before_script
:
before_script
:
-
*
mkdir-reports
-
!reference
[
.scripts
,
mkdir-reports
]
-
npm install
-
npm install
--no-save --no-audit --no-fund
--no-save --no-audit --no-fund
--loglevel=error
--loglevel=error
...
@@ -208,19 +235,24 @@ lint-css:
...
@@ -208,19 +235,24 @@ lint-css:
phpstan
:
phpstan
:
stage
:
analyse
stage
:
analyse
needs
:
[
build-composer
]
needs
:
[
build-composer
]
rules
:
-
changes
:
-
"
app/controllers/**/*.php"
-
"
lib/**/*.php"
-
"
tests/**/*.php"
variables
:
variables
:
CACHE_LOCATION
:
$CACHE_DIR/phpstan
CACHE_LOCATION
:
$CACHE_DIR/phpstan
PHPSTAN_CODE_QUALITY_REPORT
:
$REPORT_DIR/phpstan-codequality.json
PHPSTAN_CODE_QUALITY_REPORT
:
$REPORT_DIR/phpstan-codequality.json
interruptible
:
true
interruptible
:
true
cache
:
cache
:
-
*
composer
-cache
-
!reference
[
.caches
,
composer
]
-
key
:
"
$CO_JOB_NAME_SLUG:$CI_COMMIT_REF_SLUG"
-
key
:
"
$CO_JOB_NAME_SLUG:$CI_COMMIT_REF_SLUG"
paths
:
paths
:
-
$CACHE_LOCATION
-
$CACHE_LOCATION
before_script
:
before_script
:
-
*
mkdir-caches
-
!reference
[
.scripts
,
mkdir-caches
]
-
*
mkdir-reports
-
!reference
[
.scripts
,
mkdir-reports
]
-
*
install-composer
-
!reference
[
.scripts
,
install-composer
]
-
'
echo
-e
"includes:\n
-
phpstan.neon.dist\n\nparameters:\n
tmpDir:
$PHPSTAN_CACHE_PATH"
>
phpstan.neon'
-
'
echo
-e
"includes:\n
-
phpstan.neon.dist\n\nparameters:\n
tmpDir:
$PHPSTAN_CACHE_PATH"
>
phpstan.neon'
script
:
script
:
-
php
-
php
...
@@ -238,6 +270,8 @@ phpstan:
...
@@ -238,6 +270,8 @@ phpstan:
test-unit
:
test-unit
:
stage
:
test
stage
:
test
needs
:
[
lint-php
]
needs
:
[
lint-php
]
rules
:
-
!reference
[
.definitions
,
php-changed
]
variables
:
variables
:
PHPUNIT_XML_REPORT
:
$REPORT_DIR/phpunit-report.xml
PHPUNIT_XML_REPORT
:
$REPORT_DIR/phpunit-report.xml
cache
:
cache
:
...
@@ -246,8 +280,8 @@ test-unit:
...
@@ -246,8 +280,8 @@ test-unit:
allow_failure
:
false
allow_failure
:
false
interruptible
:
true
interruptible
:
true
before_script
:
before_script
:
-
*
mkdir-reports
-
!reference
[
.scripts
,
mkdir-reports
]
-
*
configure-studip
-
!reference
[
.scripts
,
configure-studip
]
script
:
script
:
-
'
composer/bin/codecept
-
'
composer/bin/codecept
run
unit
run
unit
...
@@ -262,13 +296,16 @@ test-unit:
...
@@ -262,13 +296,16 @@ test-unit:
test-jest
:
test-jest
:
stage
:
test
stage
:
test
needs
:
[
lint-js
]
needs
:
[
lint-js
]
rules
:
-
!reference
[
.definitions
,
js-changed
]
image
:
$NODE_IMAGE
image
:
$NODE_IMAGE
variables
:
variables
:
JS_TEST_REPORT
:
$REPORT_DIR/jest.xml
JS_TEST_REPORT
:
$REPORT_DIR/jest.xml
cache
:
*npm-cache
cache
:
-
!reference
[
.caches
,
npm
]
interruptible
:
true
interruptible
:
true
before_script
:
before_script
:
-
*
mkdir-reports
-
!reference
[
.scripts
,
mkdir-reports
]
-
npm install
-
npm install
script
:
script
:
-
JEST_JUNIT_OUTPUT_FILE="$JS_TEST_REPORT" npx jest tests/jest/ --ci --reporters=default --reporters=jest-junit
-
JEST_JUNIT_OUTPUT_FILE="$JS_TEST_REPORT" npx jest tests/jest/ --ci --reporters=default --reporters=jest-junit
...
@@ -279,6 +316,8 @@ test-jest:
...
@@ -279,6 +316,8 @@ test-jest:
test-functional
:
test-functional
:
stage
:
test
stage
:
test
needs
:
[
lint-php
]
needs
:
[
lint-php
]
rules
:
-
!reference
[
.definitions
,
php-changed
]
variables
:
variables
:
FUNCTIONAL_XML_REPORT
:
$REPORT_DIR/functional-report.xml
FUNCTIONAL_XML_REPORT
:
$REPORT_DIR/functional-report.xml
FUNCTIONAL_CODE_QUALITY_REPORT
:
$REPORT_DIR/functional-codequality.json
FUNCTIONAL_CODE_QUALITY_REPORT
:
$REPORT_DIR/functional-codequality.json
...
@@ -286,12 +325,12 @@ test-functional:
...
@@ -286,12 +325,12 @@ test-functional:
<<
:
*composer-cache
<<
:
*composer-cache
policy
:
pull
policy
:
pull
services
:
services
:
-
*mariadb-service
-
!reference
[
.services
,
mariadb
]
allow_failure
:
false
allow_failure
:
false
interruptible
:
true
interruptible
:
true
before_script
:
before_script
:
-
*
mkdir-reports
-
!reference
[
.scripts
,
mkdir-reports
]
-
*
initialize-studip-database
-
!reference
[
.scripts
,
initialize-studip-database
]
script
:
script
:
-
'
composer/bin/codecept
-
'
composer/bin/codecept
run
functional
run
functional
...
@@ -306,17 +345,19 @@ test-functional:
...
@@ -306,17 +345,19 @@ test-functional:
test-jsonapi
:
test-jsonapi
:
stage
:
test
stage
:
test
needs
:
[
lint-php
]
needs
:
[
lint-php
]
rules
:
-
!reference
[
.definitions
,
php-changed
]
cache
:
cache
:
<<
:
*composer-cache
<<
:
*composer-cache
policy
:
pull
policy
:
pull
services
:
services
:
-
*mariadb-service
-
!reference
[
.services
,
mariadb
]
variables
:
variables
:
JSONAPI_XML_REPORT
:
$REPORT_DIR/jsonapi-report.xml
JSONAPI_XML_REPORT
:
$REPORT_DIR/jsonapi-report.xml
interruptible
:
true
interruptible
:
true
before_script
:
before_script
:
-
*
mkdir-reports
-
!reference
[
.scripts
,
mkdir-reports
]
-
*
initialize-studip-database
-
!reference
[
.scripts
,
initialize-studip-database
]
script
:
script
:
-
'
composer/bin/codecept
-
'
composer/bin/codecept
run
jsonapi
run
jsonapi
...
@@ -330,9 +371,13 @@ test-jsonapi:
...
@@ -330,9 +371,13 @@ test-jsonapi:
test-assets
:
test-assets
:
stage
:
test
stage
:
test
rules
:
-
!reference
[
.definitions
,
css-changed
]
-
!reference
[
.definitions
,
js-changed
]
needs
:
[]
needs
:
[]
image
:
$NODE_IMAGE
image
:
$NODE_IMAGE
cache
:
*npm-cache
cache
:
-
!reference
[
.caches
,
npm
]
interruptible
:
true
interruptible
:
true
before_script
:
before_script
:
-
npm install
-
npm install
...
@@ -352,8 +397,8 @@ test-e2e:
...
@@ -352,8 +397,8 @@ test-e2e:
interruptible
:
true
interruptible
:
true
when
:
manual
when
:
manual
cache
:
cache
:
-
*
composer
-cache
-
!reference
[
.caches
,
composer
]
-
*npm-cache
-
!reference
[
.caches
,
npm
]
before_script
:
before_script
:
-
mkdir ./bin
-
mkdir ./bin
-
apt-get update
-
apt-get update
...
@@ -372,8 +417,8 @@ test-e2e:
...
@@ -372,8 +417,8 @@ test-e2e:
-
php composer-setup.php --install-dir=./bin --filename=composer
-
php composer-setup.php --install-dir=./bin --filename=composer
-
export PATH="./bin:$PATH"
-
export PATH="./bin:$PATH"
-
php -r "unlink('composer-setup.php');"
-
php -r "unlink('composer-setup.php');"
-
*
mkdir-reports
-
!reference
[
.scripts
,
mkdir-reports
]
-
*
initialize-studip-database
-
!reference
[
.scripts
,
initialize-studip-database
]
-
./cli/studip config:set SHOW_TERMS_ON_FIRST_LOGIN
0
-
./cli/studip config:set SHOW_TERMS_ON_FIRST_LOGIN
0
-
npm install playwright
-
npm install playwright
-
npm ci
-
npm ci
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment