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
:
variables
:
MYSQL_RANDOM_ROOT_PASSWORD
:
1
MYSQL_RANDOM_ROOT_PASSWORD
:
"
true"
MYSQL_DATABASE
:
studip_db
MYSQL_DATABASE
:
studip_db
MYSQL_USER
:
studip_user
MYSQL_USER
:
studip_user
MYSQL_PASSWORD
:
studip_password
MYSQL_PASSWORD
:
studip_password
MYSQL_HOST
:
mariadb
MYSQL_HOST
:
mariadb
DEMO_DATA
:
1
DEMO_DATA
:
"
true"
MAIL_TRANSPORT
:
debug
MAIL_TRANSPORT
:
debug
# Optimize caching
FF_USE_FASTZIP
:
"
true"
CACHE_COMPRESSION_LEVEL
:
"
fast"
# User faster docker driver
DOCKER_DRIVER
:
overlay2
stages
:
stages
:
-
Checks
-
checks
-
Tests
-
tests
-
Packaging
-
packaging
-
Release
-
release
-
Build
-
build
image
:
studip/studip:tests
services
:
-
mariadb
Linting
:
.scripts
:
stage
:
Checks
install-composer
:
allow_failure
:
false
before_script
:
-
make composer-dev
-
make composer-dev
script
:
configure-studip
:
-
php -d memory_limit=-1 composer/bin/phplint --xml report.xml
-
!reference
[
.scripts
,
install-composer
]
artifacts
:
-
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
when
:
always
expire_in
:
1 week
expire_in
:
1 week
tests
:
&test-artifacts
<<
:
*common
paths
:
paths
:
-
tests/_output
-
tests/_output
reports
:
reports
:
junit
:
tests/_output/report.xml
junit
:
tests/_output/report.xml
Unit Test
:
.caches
:
stage
:
Tests
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
allow_failure
:
false
interruptible
:
true
before_script
:
before_script
:
-
cp docker/studip/config_local.php config/config_local.inc.php
-
!reference
[
.scripts
,
install-composer
]
-
cp config/config.inc.php.dist config/config.inc.php
-
make composer-dev
script
:
script
:
-
composer/bin/codecept run unit --xml
-
php -d memory_limit=-1 composer/bin/phplint --xml report.xml
# Remove absolute path in report
-
sed -i "s%$PWD/%%" tests/_output/report.xml
artifacts
:
artifacts
:
when
:
always
<<
:
*common
expire_in
:
1 week
paths
:
paths
:
-
tests/_output
-
report.xml
reports
:
reports
:
junit
:
tests/_output/
report.xml
junit
:
report.xml
Functional Test
:
lint-js
:
stage
:
Tests
stage
:
checks
needs
:
[]
cache
:
*js-cache
allow_failure
:
false
allow_failure
:
false
interruptible
:
true
before_script
:
before_script
:
-
chmod +x .gitlab/scripts/install_db.sh
-
make npm
-
.gitlab/scripts/install_db.sh
script
:
-
cp docker/studip/config_local.php config/config_local.inc.php
-
npm run lint -- --cache
-
cp config/config.inc.php.dist config/config.inc.php
-
make composer-dev
test-unit
:
-
cli/studip migrate
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
:
script
:
-
composer/bin/codecept run functional --xml
-
composer/bin/codecept run functional --xml
-
sed -i "s%$PWD/%%" tests/_output/
report
.xml
-
!reference
[
.scripts
,
remove-absolute-path-in-
report
]
artifacts
:
artifacts
:
when
:
always
<<
:
*test-artifacts
expire_in
:
1 week
paths
:
-
tests/_output
reports
:
junit
:
tests/_output/report.xml
JSONAPI Test
:
test-jsonapi
:
stage
:
Tests
stage
:
tests
needs
:
[
lint-php
]
cache
:
<<
:
*php-cache
policy
:
pull
services
:
-
mariadb
allow_failure
:
false
allow_failure
:
false
interruptible
:
true
before_script
:
before_script
:
-
chmod +x .gitlab/scripts/install_db.sh
-
!reference
[
.scripts
,
initialize-studip-database
]
-
.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
script
:
script
:
-
composer/bin/codecept run jsonapi --xml
-
composer/bin/codecept run jsonapi --xml
-
sed -i "s%$PWD/%%" tests/_output/
report
.xml
-
!reference
[
.scripts
,
remove-absolute-path-in-
report
]
artifacts
:
artifacts
:
<<
:
*test-artifacts
when
:
always
when
:
always
expire_in
:
1 week
expire_in
:
1 week
paths
:
paths
:
...
@@ -94,9 +145,9 @@ JSONAPI Test:
...
@@ -94,9 +145,9 @@ JSONAPI Test:
reports
:
reports
:
junit
:
tests/_output/report.xml
junit
:
tests/_output/report.xml
P
ackaging
:
p
ackaging
:
stage
:
P
ackaging
stage
:
p
ackaging
image
:
studip/studip:tests
cache
:
[]
rules
:
rules
:
-
if
:
$CI_COMMIT_TAG
-
if
:
$CI_COMMIT_TAG
before_script
:
before_script
:
...
@@ -116,15 +167,16 @@ Packaging:
...
@@ -116,15 +167,16 @@ Packaging:
reports
:
reports
:
dotenv
:
.packaging.env
dotenv
:
.packaging.env
R
elease
:
r
elease
:
stage
:
R
elease
stage
:
r
elease
image
:
studip/release-cli
image
:
studip/release-cli
cache
:
[]
rules
:
rules
:
-
if
:
$CI_COMMIT_TAG
-
if
:
$CI_COMMIT_TAG
script
:
script
:
-
echo 'Running release job'
-
echo 'Running release job'
needs
:
needs
:
-
job
:
P
ackaging
-
job
:
p
ackaging
artifacts
:
true
artifacts
:
true
release
:
release
:
name
:
"
Stud.IP-Release-$CI_COMMIT_TAG"
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:
...
@@ -30,7 +30,7 @@ clean-composer:
npm
:
node_modules/.package-lock.json
npm
:
node_modules/.package-lock.json
node_modules/.package-lock.json
:
package.json 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
:
clean-npm
:
rm
-rf
node_modules
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