Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ARSnova Backend
Manage
Activity
Members
Labels
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Privacy
Imprint
Contact
Snippets
Groups
Projects
Show more breadcrumbs
Paul-Christian Volkmer
ARSnova Backend
Commits
2b793e67
Commit
2b793e67
authored
9 years ago
by
Daniel Gerhardt
Browse files
Options
Downloads
Patches
Plain Diff
Add CI config for GitLab
parent
2c68d6e6
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+76
-0
76 additions, 0 deletions
.gitlab-ci.yml
with
76 additions
and
0 deletions
.gitlab-ci.yml
0 → 100644
+
76
−
0
View file @
2b793e67
variables
:
MIRROR_REPO
:
git@github.com:thm-projects/arsnova-backend.git
WAR_FILE
:
target/arsnova-backend-*.war
stages
:
-
analysis
-
test
-
build
-
deploy
-
synchronization
cache
:
paths
:
-
.m2/
sync_mirror
:
stage
:
synchronization
when
:
always
except
:
-
production
-
staging
allow_failure
:
true
script
:
-
git clone --bare $CI_BUILD_REPO mirror.git
-
cd mirror.git
-
git update-ref -d refs/tags/production
-
git update-ref -d refs/tags/staging
-
git push --mirror $MIRROR_REPO
sonar
:
stage
:
analysis
only
:
-
master
tags
:
-
maven
allow_failure
:
true
script
:
-
mvn sonar:sonar
checkstyle
:
stage
:
analysis
tags
:
-
maven
script
:
-
mvn checkstyle:checkstyle
test
:
stage
:
test
tags
:
-
maven
script
:
-
mvn test
package
:
stage
:
build
tags
:
-
maven
artifacts
:
paths
:
-
$WAR_FILE
script
:
-
mvn package -DskipTests
tomcat_production
:
stage
:
deploy
only
:
-
production
script
:
-
curl --upload-file $WAR_FILE https://$PROD_TOMCAT_USER:$PROD_TOMCAT_PASSWORD@$PROD_TOMCAT_HOST/manager/deploy?path=%2Fapi
tomcat_development
:
stage
:
deploy
only
:
-
staging
script
:
-
curl --upload-file $WAR_FILE https://$DEV_TOMCAT_USER:$DEV_TOMCAT_PASSWORD@$DEV_TOMCAT_HOST/manager/deploy?path=%2Fapi
This diff is collapsed.
Click to expand it.
Preview
0%
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