Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GitBull
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
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
EIP
Labrador
GitBull
Commits
1505a7af
Verified
Commit
1505a7af
authored
Oct 31, 2023
by
Ruben Backx
Browse files
Options
Downloads
Patches
Plain Diff
Add staging deploy
parent
1a2e8de6
Branches
Branches containing commit
No related tags found
2 merge requests
!12
Deploy
,
!8
Finalise basic functionality for Q2
Pipeline
#964050
failed
Nov 5, 2023
Changes
2
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+50
-5
50 additions, 5 deletions
.gitlab-ci.yml
build.gradle.kts
+4
-0
4 additions, 0 deletions
build.gradle.kts
with
54 additions
and
5 deletions
.gitlab-ci.yml
+
50
−
5
View file @
1505a7af
image
:
gradle:jdk17
stages
:
-
build
-
test
-
publish
-
deploy
#variables:
# # Disable the Gradle daemon to ensure isolated runs of the CI pipeline.
# GRADLE_OPTS: "-Dorg.gradle.daemon=false"
build
:
image
:
gradle:jdk17
gradle_build
:
stage
:
build
cache
:
policy
:
pull-push
...
...
@@ -26,7 +29,6 @@ build:
# allow_failure: true
spotless
:
image
:
gradle:jdk17
artifacts
:
name
:
spotless
expose_as
:
Spotless
...
...
@@ -43,10 +45,9 @@ spotless:
test
:
image
:
gradle:jdk17
stage
:
test
needs
:
-
build
-
gradle_
build
cache
:
policy
:
pull-push
coverage
:
'
/Code
coverage:
\d+\.\d+/'
...
...
@@ -73,3 +74,47 @@ test:
# Print test coverage from report
-
awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, " instructions covered"; print "Code coverage:", 100*covered/instructions }' build/reports/jacoco/test/jacocoTestReport.csv ||
true
-
cp -r build/reports codecov
publish_jar
:
stage
:
publish
rules
:
-
if
:
$CI_COMMIT_BRANCH == "master" ||
$CI_COMMIT_BRANCH == "development" ||
$CI_MERGE_REQUEST_ID ||
$CI_PIPELINE_SOURCE == "push" ||
$CI_PIPELINE_SOURCE == "trigger"
needs
:
-
gradle_build
artifacts
:
name
:
gitbull
expose_as
:
GitBull JAR
expire_in
:
7 days
paths
:
-
gitbull.jar
script
:
-
cp build/libs/gitbull-*.jar ./gitbull.jar
deploy_staging
:
image
:
getsentry/sentry-cli
stage
:
deploy
dependencies
:
-
publish_jar
before_script
:
-
'
which
ssh-agent
||
(
apk
add
--update
openssh-client
)'
-
eval $(ssh-agent -s)
-
echo "$SSH_PRIVATE_KEY_STAGING" | base64 -d | ssh-add -
-
mkdir -p ~/.ssh
-
chmod 700 ~/.ssh
-
ssh-keyscan eiptest.ewi.tudelft.nl >> ~/.ssh/known_hosts
-
chmod 644 ~/.ssh/known_hosts
script
:
-
scp gitbull.jar deployer-gitbull@eiptest.ewi.tudelft.nl:/var/www/gitbull/
-
ssh deployer-gitbull@eiptest.ewi.tudelft.nl sudo /bin/systemctl restart gitbull
environment
:
name
:
staging
url
:
https://gitbull.eiptest.ewi.tudelft.nl
rules
:
-
if
:
$CI_PIPELINE_SOURCE == "trigger" ||
$CI_MERGE_REQUEST_EVENT_TYPE == "merge_train"
when
:
never
-
if
:
$CI_COMMIT_BRANCH == "development"
This diff is collapsed.
Click to expand it.
build.gradle.kts
+
4
−
0
View file @
1505a7af
...
...
@@ -269,6 +269,10 @@ tasks.jacocoTestReport {
}
}
// we don't use the "plain"/light jar
tasks
.
getByName
<
Jar
>(
"jar"
)
{
enabled
=
false
}
/*
pitest {
...
...
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
sign in
to comment