Add jenkinsfile & dockerfile
This commit is contained in:
parent
40ff1d67bc
commit
8f9f0d8c5d
7
Dockerfile
Normal file
7
Dockerfile
Normal file
@ -0,0 +1,7 @@
|
||||
FROM eclipse-temurin:11
|
||||
EXPOSE 8080:8080
|
||||
|
||||
# When this is run, Jenkins has already built the FAT JAR
|
||||
RUN mkdir /app
|
||||
COPY ./build/libs/rimajon-0.0.1-all.jar /app/backend.jar
|
||||
ENTRYPOINT ["java","-jar","/app/backend.jar"]
|
20
Jenkinsfile
vendored
Normal file
20
Jenkinsfile
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
pipeline {
|
||||
agent {
|
||||
docker {
|
||||
image "gradle:7.6.4-jdk11"
|
||||
}
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Build FAT JAR') {
|
||||
steps {
|
||||
sh 'gradle shadowJar'
|
||||
}
|
||||
}
|
||||
stage("Deploy jar") {
|
||||
steps {
|
||||
sh "echo ':D (need to spin up container)'"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
12
build.gradle
12
build.gradle
@ -8,6 +8,10 @@ buildscript {
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'com.github.johnrengelman.shadow' version '7.0.0'
|
||||
}
|
||||
|
||||
apply plugin: 'kotlin'
|
||||
apply plugin: 'application'
|
||||
|
||||
@ -28,6 +32,12 @@ repositories {
|
||||
maven { url 'https://kotlin.bintray.com/ktor' }
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
manifest {
|
||||
attributes 'Main-Class': 'com.example.ApplicationKt'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile("org.jetbrains.exposed:exposed-core:0.24.1")
|
||||
compile("org.jetbrains.exposed:exposed-dao:0.24.1")
|
||||
@ -40,5 +50,5 @@ dependencies {
|
||||
implementation "io.ktor:ktor-gson:$ktor_version"
|
||||
implementation 'com.google.code.gson:gson:2.8.5'
|
||||
testImplementation "io.ktor:ktor-server-tests:$ktor_version"
|
||||
testImplementation 'io.kotest:kotest-runner-junit5:$version'
|
||||
// testImplementation 'io.kotest:kotest-runner-junit5:$version'
|
||||
}
|
||||
|
6
docker-compose.yml
Normal file
6
docker-compose.yml
Normal file
@ -0,0 +1,6 @@
|
||||
services:
|
||||
web:
|
||||
build: .
|
||||
ports:
|
||||
- "9124:8080"
|
||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
3
resources/META-INF/MANIFEST.MF
Normal file
3
resources/META-INF/MANIFEST.MF
Normal file
@ -0,0 +1,3 @@
|
||||
Manifest-Version: 1.0
|
||||
Main-Class: dev.araozu.ApplicationKt
|
||||
|
Loading…
Reference in New Issue
Block a user