-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
65 lines (52 loc) · 1.59 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//运行gradle脚本自身需要的插件依赖
buildscript {
repositories {
maven { url 'https://maven.aliyun.com/repository/public/' }
}
}
plugins {
id 'org.springframework.boot' version '2.3.9.RELEASE'
}
allprojects {
// System.setProperty('socksProxyHost','127.0.0.1')
// System.setProperty('socksProxyPort','1080')
repositories {
maven {
url 'https://maven.aliyun.com/repository/public/'
}
}
}
subprojects {
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
group = 'com.ikeyit'
version = '0.0.2-SNAPSHOT'
sourceCompatibility = '1.8'
bootJar {
layered()
}
bootBuildImage {
builder = 'registry.cn-hangzhou.aliyuncs.com/paketo-buildpacks/builder:base-platform-api-0.3'
runImage = 'registry.cn-hangzhou.aliyuncs.com/paketo-buildpacks/run:base-cnb'
imageName = "ikeyit/${project.name}:${project.version}"
}
task bootPushImage {
group = 'build'
description = 'Pushes an OCI image of the application using the output of bootBuildImage task'
dependsOn bootBuildImage
doLast {
exec {
executable 'docker'
args 'tag', "${bootBuildImage.imageName}", "registry.cn-hangzhou.aliyuncs.com/${bootBuildImage.imageName}"
}
exec {
executable 'docker'
args 'push', "registry.cn-hangzhou.aliyuncs.com/${bootBuildImage.imageName}"
}
}
}
test {
useJUnitPlatform()
}
}