Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
fb730dd0
Commit
fb730dd0
authored
Jun 25, 2025
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.7.12-解决社保打包问题
parent
87f52fd9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
74 additions
and
20 deletions
+74
-20
build-test.sh
yifu-social/yifu-social-biz/build-test.sh
+1
-1
pom.xml
yifu-social/yifu-social-biz/pom.xml
+73
-19
No files found.
yifu-social/yifu-social-biz/build-test.sh
View file @
fb730dd0
#!/usr/bin/env bash
DOCKER_BUILDKIT
=
1 mvn clean package
-Ptest
-Dmaven
.test.skip
=
true
docker:build
-DpushImage
\ No newline at end of file
mvn clean package
-Ptest
-Dmaven
.test.skip
=
true
docker:build
-DpushImage
\ No newline at end of file
yifu-social/yifu-social-biz/pom.xml
View file @
fb730dd0
...
...
@@ -126,31 +126,85 @@
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
</plugin>
<plugin>
<groupId>
com.spotify
</groupId>
<groupId>
io.fabric8
</groupId>
<artifactId>
docker-maven-plugin
</artifactId>
<version>
1.2
.2
</version>
<version>
0.40
.2
</version>
<configuration>
<serverId>
docker-hub
</serverId>
<!--指定生成的镜像名-->
<imageName>
${my.hub.host}/${map.group.name}/${project.artifactId}:${project.version}
</imageName>
<dockerDirectory>
${project.basedir}/
</dockerDirectory>
<!--指定远程 docker api地址-->
<!--<dockerHost>http://172.16.66.232:2375</dockerHost>-->
<!-- 这里是复制 jar 包到 docker 容器指定目录配置-->
<resources>
<resource>
<targetPath>
/
</targetPath>
<!--jar 包所在的路径 此处配置的 即对应 target 目录-->
<directory>
${project.build.directory}
</directory>
<!-- 需要包含的 jar包 ,这里对应的是 Dockerfile中添加的文件名 -->
<include>
${project.build.finalName}.jar
</include>
</resource>
</resources>
<forceTags>
true
</forceTags>
<!-- 认证配置 -->
<authConfig>
<serverId>
docker-hub
</serverId>
</authConfig>
<!-- 镜像配置 -->
<images>
<image>
<!--指定生成的镜像名-->
<name>
${my.hub.host}/${map.group.name}/${project.artifactId}:${project.version}
</name>
<!-- 构建配置 -->
<build>
<!-- 保持与原目录一致 -->
<dockerFileDir>
${project.basedir}/
</dockerFileDir>
<!-- 等效于原resources配置 -->
<assembly>
<targetDir>
/
</targetDir>
<descriptorRef>
artifact
</descriptorRef>
<inline>
<fileSets>
<fileSet>
<!--jar 包所在的路径 此处配置的 即对应 target 目录-->
<directory>
${project.build.directory}
</directory>
<includes>
<!-- 需要包含的 jar包 ,这里对应的是 Dockerfile中添加的文件名 -->
<include>
${project.build.finalName}.jar
</include>
</includes>
<outputDirectory>
/
</outputDirectory>
</fileSet>
</fileSets>
</inline>
</assembly>
<!-- 强制覆盖标签 -->
<tags>
<tag>
${project.version}
</tag>
</tags>
</build>
<!-- 推送配置 -->
<push>
<enabled>
true
</enabled>
</push>
</image>
</images>
<!-- 可选:保留原Docker主机配置 -->
<!-- <dockerHost>http://172.16.66.232:2375</dockerHost> -->
</configuration>
<!-- 绑定到Maven生命周期 -->
<executions>
<execution>
<id>
build-image
</id>
<phase>
package
</phase>
<goals>
<goal>
build
</goal>
</goals>
</execution>
<execution>
<id>
push-image
</id>
<phase>
deploy
</phase>
<goals>
<goal>
push
</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment