Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MosógépSCH
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Disappointment industries™
MosógépSCH
Commits
de21a676
Verified
Commit
de21a676
authored
3 years ago
by
Réthelyi Bálint
Browse files
Options
Downloads
Patches
Plain Diff
deploy backend
parent
d60133e8
No related branches found
No related tags found
No related merge requests found
Pipeline
#19766
failed
3 years ago
Stage: build
Stage: docker
Stage: deploy
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+39
-2
39 additions, 2 deletions
.gitlab-ci.yml
backend/build.gradle.kts
+11
-0
11 additions, 0 deletions
backend/build.gradle.kts
backend/mosogepsch-backend.service
+12
-0
12 additions, 0 deletions
backend/mosogepsch-backend.service
with
62 additions
and
2 deletions
.gitlab-ci.yml
+
39
−
2
View file @
de21a676
...
...
@@ -2,13 +2,14 @@ image: golang:alpine
variables
:
CONTAINER_IMAGE
:
"
mosogepsch-notification-server:$CI_COMMIT_REF_NAME"
MOSOGEPSCH_HOST
:
"
root@mosogep-ng.sch.bme.hu"
stages
:
-
build
-
docker
-
deploy
backend build
:
noti
backend build
:
image
:
golang:alpine
stage
:
build
before_script
:
...
...
@@ -24,6 +25,20 @@ backend build:
-
notifications/**/*
-
.gitlab-ci.yml
backend build
:
image
:
gradle:7.1
stage
:
build
script
:
-
cd backend
-
./gradlew shadowJar
artifacts
:
paths
:
-
backend/build/libs/mosogepsch-backend.jar
only
:
changes
:
-
backend/**/*
-
.gitlab-ci.yml
android-debug
:
variables
:
GRADLE_USER_HOME
:
/cache/gradle/android/mosogepsch
...
...
@@ -78,7 +93,7 @@ dockerhub:
-
echo "{\"auths\":{\"https://index.docker.io/v1/\":{\"username\":\"$DOCKERHUB_USER\",\"password\":\"$DOCKERHUB_PASSWORD\"}}}" > /kaniko/.docker/config.json
-
/kaniko/executor --force --context $CI_PROJECT_DIR/notifications --dockerfile $CI_PROJECT_DIR/notifications/Dockerfile --destination blintmester/$CONTAINER_IMAGE
needs
:
-
backend build
-
noti
backend build
only
:
changes
:
-
notifications/**/*
...
...
@@ -104,3 +119,25 @@ k8s:
-
.gitlab-ci.yml
refs
:
-
main
deploy backend
:
stage
:
deploy
image
:
kroniak/ssh-client
before_script
:
-
eval $(ssh-agent -s)
-
echo "$SSH" | tr -d '\r' | ssh-add -
-
mkdir -p ~/.ssh
-
chmod 700 ~/.ssh
-
'
echo
-e
"Host
*\n\tStrictHostKeyChecking
no\n\n"
>
~/.ssh/config'
needs
:
-
backend build
script
:
-
scp backend/mosogepch-backend.service $MOSOGEPSCH_HOST:/etc/systemd/system/
-
scp backend/build/libs/mosogepsch-backend.jar $MOSOGEPSCH_HOST:/opt/mosogepsch/
-
ssh $MOSOGEPSCH_HOST systemctl restart mosogepsch-backend.service
only
:
changes
:
-
backend/**/*
-
.gitlab-ci.yml
refs
:
-
main
\ No newline at end of file
This diff is collapsed.
Click to expand it.
backend/build.gradle.kts
+
11
−
0
View file @
de21a676
...
...
@@ -6,8 +6,19 @@ plugins {
application
kotlin
(
"jvm"
)
version
"1.6.10"
id
(
"org.jetbrains.kotlin.plugin.serialization"
)
version
"1.6.10"
id
(
"com.github.johnrengelman.shadow"
)
version
"7.1.2"
}
tasks
{
shadowJar
{
archiveBaseName
.
set
(
"mosogepsch-backend"
)
archiveClassifier
.
set
(
""
)
archiveVersion
.
set
(
""
)
}
}
group
=
"space.rethelyi"
version
=
"0.0.1"
application
{
...
...
This diff is collapsed.
Click to expand it.
backend/mosogepsch-backend.service
0 → 100644
+
12
−
0
View file @
de21a676
[Unit]
Description
=
MosogepSCH backend
[Service]
Type
=
simple
User
=
mosogepsch
Group
=
mosogepsch
ExecStart
=
java -jar /opt/mosogepsch/mosogepsch-backend.jar
Restart
=
on-failure
[Install]
WantedBy
=
multi-user.target
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