Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BattleArena
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package 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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Scherbaum Maximilian
BattleArena
Commits
63de3d0d
Commit
63de3d0d
authored
1 year ago
by
Gashi Erzan
Browse files
Options
Downloads
Patches
Plain Diff
Update .gitlab-ci.yml file
parent
f42a7ab2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#58634
failed
1 year ago
Stage: build
Stage: test
Stage: package
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+56
-27
56 additions, 27 deletions
.gitlab-ci.yml
with
56 additions
and
27 deletions
.gitlab-ci.yml
+
56
−
27
View file @
63de3d0d
...
...
@@ -16,34 +16,63 @@
# This specific template is located at:
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Getting-Started.gitlab-ci.yml
stages
:
# List of stages for jobs, and their order of execution
-
build
-
test
-
deploy
build-job
:
# This job runs in the build stage, which runs first.
include
:
-
template
:
Jobs/SAST.gitlab-ci.yml
-
template
:
Security/Dependency-Scanning.gitlab-ci.yml
cache
:
paths
:
-
"
.m2/repository"
variables
:
MAVEN_OPTS
:
"
-Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository"
stages
:
-
build
-
test
-
package
build-musicmanager
:
stage
:
build
image
:
maven:3.8-openjdk-18
script
:
-
echo "Compiling the code..."
-
echo "Compile complete."
unit-test-job
:
# This job runs in the test stage.
stage
:
test
# It only starts when the job in the build stage completes successfully.
-
echo 'Starting Build Stage'
-
mvn compile
test-musicmanager
:
stage
:
test
image
:
maven:3.8-openjdk-18
services
:
-
mariadb
-
mongo
variables
:
MYSQL_ROOT_PASSWORD
:
ultr4_s4ve_pwd
MYSQL_DATABASE
:
musicmanagerdb
MYSQL_USER
:
musicmanageruser
MONGO_INITDB_ROOT_USERNAME
:
musicmanageruser
MONGO_INITDB_ROOT_PASSWORD
:
sup3r_s4ve_pwd
script
:
-
echo "Running unit tests... This will take about 60 seconds."
-
sleep
60
-
echo "Code coverage is 90%"
lint-test-job
:
# This job also runs in the test stage.
stage
:
test
# It can run at the same time as unit-test-job (in parallel).
script
:
-
echo "Linting code... This will take about 10 seconds."
-
sleep
10
-
echo "No lint issues found."
deploy-job
:
# This job runs in the deploy stage.
stage
:
deploy
# It only runs when *both* jobs in the test stage complete successfully.
environment
:
production
-
echo 'Starting Test Stage'
-
mvn test -Dtest='!NoSqlManagerTest,!SqlDbManagerTest, !AudioTrackApiControllerTest'
artifacts
:
reports
:
junit
:
-
target/surefire-reports/TEST-*.xml
-
target/failsafe-reports/TEST-*.xml
package-musicmanager
:
stage
:
package
image
:
maven:3.8-openjdk-18
services
:
-
mariadb
-
mongo
variables
:
MYSQL_ROOT_PASSWORD
:
ultr4_s4ve_pwd
MYSQL_DATABASE
:
musicmanagerdb
MYSQL_USER
:
musicmanageruser
MONGO_INITDB_ROOT_USERNAME
:
musicmanageruser
MONGO_INITDB_ROOT_PASSWORD
:
sup3r_s4ve_pwd
script
:
-
echo "Deploying application..."
-
echo "Application successfully deployed."
-
echo 'Starting Package Stage'
-
mvn package -Dtest='!NoSqlManagerTest,!SqlDbManagerTest, !AudioTrackApiControllerTest'
only
:
refs
:
-
main
artifacts
:
paths
:
-
target/*.jar
expire_in
:
2 days
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