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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marcus Eibrink-Lunzenauer
Stud.IP
Commits
573bbd21
Commit
573bbd21
authored
2 years ago
by
Jan-Hendrik Willms
Committed by
David Siegfried
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
optimizations for the gitlab ci pipeline
Closes #606 Merge request
studip/studip!712
parent
61003a1e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+112
-60
112 additions, 60 deletions
.gitlab-ci.yml
Makefile
+1
-1
1 addition, 1 deletion
Makefile
with
113 additions
and
61 deletions
.gitlab-ci.yml
+
112
−
60
View file @
573bbd21
image
:
studip/studip:tests
variables
:
MYSQL_RANDOM_ROOT_PASSWORD
:
1
MYSQL_RANDOM_ROOT_PASSWORD
:
"
true"
MYSQL_DATABASE
:
studip_db
MYSQL_USER
:
studip_user
MYSQL_PASSWORD
:
studip_password
MYSQL_HOST
:
mariadb
DEMO_DATA
:
1
DEMO_DATA
:
"
true"
MAIL_TRANSPORT
:
debug
# Optimize caching
FF_USE_FASTZIP
:
"
true"
CACHE_COMPRESSION_LEVEL
:
"
fast"
# User faster docker driver
DOCKER_DRIVER
:
overlay2
stages
:
-
Checks
-
Tests
-
Packaging
-
Release
-
Build
image
:
studip/studip:tests
services
:
-
mariadb
-
checks
-
tests
-
packaging
-
release
-
build
Linting
:
stage
:
Checks
allow_failure
:
false
before_script
:
.scripts
:
install-composer
:
-
make composer-dev
script
:
-
php -d memory_limit=-1 composer/bin/phplint --xml report.xml
artifacts
:
configure-studip
:
-
!reference
[
.scripts
,
install-composer
]
-
cp docker/studip/config_local.php config/config_local.inc.php
-
cp config/config.inc.php.dist config/config.inc.php
initialize-studip-database
:
-
!reference
[
.scripts
,
configure-studip
]
-
chmod +x .gitlab/scripts/install_db.sh
-
.gitlab/scripts/install_db.sh
-
cli/studip migrate
remove-absolute-path-in-report
:
-
sed -i "s%$PWD/%%" tests/_output/report.xml
.artifacts
:
common
:
&common
when
:
always
expire_in
:
1 week
tests
:
&test-artifacts
<<
:
*common
paths
:
-
tests/_output
reports
:
junit
:
tests/_output/report.xml
Unit Test
:
stage
:
Tests
.caches
:
php
:
&php-cache
key
:
"
php-$CI_COMMIT_REF_SLUG"
paths
:
-
composer/
-
.phplint-cache
js
:
&js-cache
key
:
"
js-$CI_COMMIT_REF_SLUG"
paths
:
-
node_modules/
-
.eslintcache
lint-php
:
stage
:
checks
needs
:
[]
cache
:
*php-cache
allow_failure
:
false
interruptible
:
true
before_script
:
-
cp docker/studip/config_local.php config/config_local.inc.php
-
cp config/config.inc.php.dist config/config.inc.php
-
make composer-dev
-
!reference
[
.scripts
,
install-composer
]
script
:
-
composer/bin/codecept run unit --xml
# Remove absolute path in report
-
sed -i "s%$PWD/%%" tests/_output/report.xml
-
php -d memory_limit=-1 composer/bin/phplint --xml report.xml
artifacts
:
when
:
always
expire_in
:
1 week
<<
:
*common
paths
:
-
tests/_output
-
report.xml
reports
:
junit
:
tests/_output/
report.xml
junit
:
report.xml
Functional Test
:
stage
:
Tests
lint-js
:
stage
:
checks
needs
:
[]
cache
:
*js-cache
allow_failure
:
false
interruptible
:
true
before_script
:
-
chmod +x .gitlab/scripts/install_db.sh
-
.gitlab/scripts/install_db.sh
-
cp docker/studip/config_local.php config/config_local.inc.php
-
cp config/config.inc.php.dist config/config.inc.php
-
make composer-dev
-
cli/studip migrate
-
make npm
script
:
-
npm run lint -- --cache
test-unit
:
stage
:
tests
needs
:
[
lint-php
]
cache
:
<<
:
*php-cache
policy
:
pull
allow_failure
:
false
interruptible
:
true
before_script
:
-
!reference
[
.scripts
,
configure-studip
]
script
:
-
composer/bin/codecept run unit --xml
-
!reference
[
.scripts
,
remove-absolute-path-in-report
]
artifacts
:
<<
:
*test-artifacts
test-functional
:
stage
:
tests
needs
:
[
lint-php
]
cache
:
<<
:
*php-cache
policy
:
pull
services
:
-
mariadb
allow_failure
:
false
interruptible
:
true
before_script
:
-
!reference
[
.scripts
,
initialize-studip-database
]
script
:
-
composer/bin/codecept run functional --xml
-
sed -i "s%$PWD/%%" tests/_output/
report
.xml
-
!reference
[
.scripts
,
remove-absolute-path-in-
report
]
artifacts
:
when
:
always
expire_in
:
1 week
paths
:
-
tests/_output
reports
:
junit
:
tests/_output/report.xml
<<
:
*test-artifacts
JSONAPI Test
:
stage
:
Tests
test-jsonapi
:
stage
:
tests
needs
:
[
lint-php
]
cache
:
<<
:
*php-cache
policy
:
pull
services
:
-
mariadb
allow_failure
:
false
interruptible
:
true
before_script
:
-
chmod +x .gitlab/scripts/install_db.sh
-
.gitlab/scripts/install_db.sh
-
cp docker/studip/config_local.php config/config_local.inc.php
-
cp config/config.inc.php.dist config/config.inc.php
-
make composer-dev
-
cli/studip migrate
-
!reference
[
.scripts
,
initialize-studip-database
]
script
:
-
composer/bin/codecept run jsonapi --xml
-
sed -i "s%$PWD/%%" tests/_output/
report
.xml
-
!reference
[
.scripts
,
remove-absolute-path-in-
report
]
artifacts
:
<<
:
*test-artifacts
when
:
always
expire_in
:
1 week
paths
:
...
...
@@ -94,9 +145,9 @@ JSONAPI Test:
reports
:
junit
:
tests/_output/report.xml
P
ackaging
:
stage
:
P
ackaging
image
:
studip/studip:tests
p
ackaging
:
stage
:
p
ackaging
cache
:
[]
rules
:
-
if
:
$CI_COMMIT_TAG
before_script
:
...
...
@@ -116,15 +167,16 @@ Packaging:
reports
:
dotenv
:
.packaging.env
R
elease
:
stage
:
R
elease
r
elease
:
stage
:
r
elease
image
:
studip/release-cli
cache
:
[]
rules
:
-
if
:
$CI_COMMIT_TAG
script
:
-
echo 'Running release job'
needs
:
-
job
:
P
ackaging
-
job
:
p
ackaging
artifacts
:
true
release
:
name
:
"
Stud.IP-Release-$CI_COMMIT_TAG"
...
...
This diff is collapsed.
Click to expand it.
Makefile
+
1
−
1
View file @
573bbd21
...
...
@@ -30,7 +30,7 @@ clean-composer:
npm
:
node_modules/.package-lock.json
node_modules/.package-lock.json
:
package.json package-lock.json
npm
install
--no-save
npm
install
--no-save
--no-audit
--no-fund
clean-npm
:
rm
-rf
node_modules
...
...
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