-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
48 lines (39 loc) · 1.26 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
plugins {
id "base"
id "com.github.spotbugs" version "4.0.0"
id 'net.researchgate.release' version '2.6.0'
id 'org.springframework.boot' version '2.4.2'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'java'
id "com.palantir.docker" version "0.22.1"
}
description = 'Time Checker - Springboot Application'
ext.timeCheckerVersion = project.version
allprojects {
repositories {
mavenCentral()
}
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-web'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
compile 'au.com.flyingkite:mobiledetect:1.1.1'
compile 'io.micrometer:micrometer-registry-prometheus'
}
apply from: "gradle/javaProject.gradle"
docker {
name "${project.name}:${project.version}"
dockerfile file('./deployments/Dockerfile')
files jar.archiveFile
tag 'DockerHub', "rasika90/time-checker:${project.version}"
}
build.finalizedBy(tasks.docker)
task createK8Yaml(type: Copy) {
from 'template/k8-deploy-template.yaml'
rename '.*', './deployments/k8-deploy.yaml'
destinationDir projectDir
expand project: project
}
tasks.docker.finalizedBy(createK8Yaml)