Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fill-system
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
廖旭伟
fill-system
Commits
29860117
Commit
29860117
authored
Feb 25, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改打包脚本
parent
54120250
Pipeline
#2494
canceled with stages
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
152 additions
and
34 deletions
+152
-34
assembly/assembly.xml
assembly/assembly.xml
+38
-0
fill-manager/pom.xml
fill-manager/pom.xml
+50
-6
fill-manager/src/main/bin/deploy.sh
fill-manager/src/main/bin/deploy.sh
+1
-17
fill-manager/src/main/bin/start.cmd
fill-manager/src/main/bin/start.cmd
+1
-0
fill-manager/src/main/bin/start.sh
fill-manager/src/main/bin/start.sh
+10
-11
fill-manager/src/main/bin/stop.sh
fill-manager/src/main/bin/stop.sh
+52
-0
No files found.
assembly/assembly.xml
0 → 100644
View file @
29860117
<assembly
xmlns=
"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd"
>
<id>
release
</id>
<formats>
<format>
tar.gz
</format>
</formats>
<fileSets>
<fileSet>
<directory>
target/bin
</directory>
<outputDirectory>
bin
</outputDirectory>
<fileMode>
0755
</fileMode>
</fileSet>
<fileSet>
<directory>
${project.parent.basedir}/dist/${project.parent.artifactId}/boot
</directory>
<outputDirectory>
boot
</outputDirectory>
<fileMode>
0755
</fileMode>
</fileSet>
<fileSet>
<directory>
./db
</directory>
<includes>
<include>
*.sql
</include>
</includes>
<outputDirectory>
db
</outputDirectory>
<fileMode>
0755
</fileMode>
</fileSet>
</fileSets>
<files>
<file>
<source>
target/${project.artifactId}-${project.version}.jar
</source>
<outputDirectory>
boot
</outputDirectory>
</file>
</files>
</assembly>
\ No newline at end of file
fill-manager/pom.xml
View file @
29860117
...
@@ -212,11 +212,6 @@
...
@@ -212,11 +212,6 @@
<plugin>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<configuration>
<jvmArguments>
-Dfile.encoding=UTF-8
</jvmArguments>
<outputDirectory>
${project.parent.basedir}/dist/${project.parent.artifactId}/boot
</outputDirectory>
<layout>
ZIP
</layout>
</configuration>
</plugin>
</plugin>
<plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<groupId>
org.apache.maven.plugins
</groupId>
...
@@ -240,10 +235,36 @@
...
@@ -240,10 +235,36 @@
</goals>
</goals>
<configuration>
<configuration>
<encoding>
UTF-8
</encoding>
<encoding>
UTF-8
</encoding>
<outputDirectory>
${project.parent.basedir}/dist/${project.parent.artifactId}/bin
</outputDirectory>
<outputDirectory>
target/bin
</outputDirectory>
<resources>
<resources>
<resource>
<resource>
<directory>
src/main/bin/
</directory>
<directory>
src/main/bin/
</directory>
<excludes>
<exclude>
deploy.sh
</exclude>
</excludes>
<filtering>
true
</filtering>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>
copy-deploy
</id>
<phase>
package
</phase>
<goals>
<goal>
copy-resources
</goal>
</goals>
<configuration>
<encoding>
UTF-8
</encoding>
<outputDirectory>
${project.parent.basedir}/dist/${project.artifactId}/
</outputDirectory>
<resources>
<resource>
<directory>
src/main/bin
</directory>
<includes>
<include>
deploy.sh
</include>
</includes>
<filtering>
true
</filtering>
<filtering>
true
</filtering>
</resource>
</resource>
</resources>
</resources>
...
@@ -251,6 +272,29 @@
...
@@ -251,6 +272,29 @@
</execution>
</execution>
</executions>
</executions>
</plugin>
</plugin>
<plugin>
<artifactId>
maven-assembly-plugin
</artifactId>
<version>
3.3.0
</version>
<executions>
<execution>
<id>
make-assembly
</id>
<phase>
package
</phase>
<goals>
<goal>
single
</goal>
</goals>
<configuration>
<finalName>
${project.artifactId}
</finalName>
<appendAssemblyId>
false
</appendAssemblyId>
<descriptors>
<descriptor>
../assembly/assembly.xml
</descriptor>
</descriptors>
<outputDirectory>
${project.parent.basedir}/dist/${project.artifactId}
</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</plugins>
</build>
</build>
...
...
fill-manager/src/main/bin/deploy.sh
View file @
29860117
...
@@ -40,13 +40,6 @@ clear_deploy() {
...
@@ -40,13 +40,6 @@ clear_deploy() {
rm
-rf
${
EXECPATH
}
rm
-rf
${
EXECPATH
}
}
}
#清理ui
clear_ui_deploy
()
{
EXEC_UI_PATH
=
$1
rm
-rf
${
EXEC_UI_PATH
}
mkdir
-p
${
EXEC_UI_PATH
}
}
build_service
()
{
build_service
()
{
SERVICE
=
$1
SERVICE
=
$1
EXECPATH
=
$2
EXECPATH
=
$2
...
@@ -81,6 +74,7 @@ start_service() {
...
@@ -81,6 +74,7 @@ start_service() {
#部署后台服务
#部署后台服务
project_deploy
()
{
project_deploy
()
{
writelog
"
${
PROJECT_NAME
}
_deploy"
writelog
"
${
PROJECT_NAME
}
_deploy"
systemctl stop
${
PROJECT_NAME
}
clear_deploy
${
PROJECT_SERVICE
}
${
PROJECT_EXECPATH
}
clear_deploy
${
PROJECT_SERVICE
}
${
PROJECT_EXECPATH
}
writelog
"
${
PROJECT_NAME
}
_clear_finish"
writelog
"
${
PROJECT_NAME
}
_clear_finish"
tar
-zvxf
./
${
PROJECT_FILENAME
}
-C
${
PUBLISH_PATH
}
tar
-zvxf
./
${
PROJECT_FILENAME
}
-C
${
PUBLISH_PATH
}
...
@@ -89,21 +83,11 @@ project_deploy() {
...
@@ -89,21 +83,11 @@ project_deploy() {
writelog
"
${
PROJECT_NAME
}
_deploy_finish"
writelog
"
${
PROJECT_NAME
}
_deploy_finish"
}
}
#部署前台服务
project_ui_deploy
()
{
writelog
"
${
PROJECT_NAME
}
_ui_deploy"
clear_ui_deploy
${
PROJECT_UI_EXECPATH
}
tar
-zvxf
./
${
PROJECT_UI_FILENAME
}
-C
${
PUBLISH_PATH
}
writelog
"
${
PROJECT_NAME
}
_ui_deploy_finish"
}
#主函数
#主函数
main
()
{
main
()
{
echo
"后台服务部署"
echo
"后台服务部署"
project_deploy
project_deploy
echo
"前端服务部署"
project_ui_deploy
exit
${
RETVAL
}
exit
${
RETVAL
}
}
}
...
...
fill-manager/src/main/bin/start.cmd
View file @
29860117
...
@@ -28,6 +28,7 @@ set JVM_CONFIG=%JVM_CONFIG% -Dapp.name=%PROJECT_NAME%
...
@@ -28,6 +28,7 @@ set JVM_CONFIG=%JVM_CONFIG% -Dapp.name=%PROJECT_NAME%
set
JVM_CONFIG
=
%JVM_CONFIG%
-Dapp
.port
=
%PORT%
set
JVM_CONFIG
=
%JVM_CONFIG%
-Dapp
.port
=
%PORT%
set
JVM_CONFIG
=
%JVM_CONFIG%
-Djava
.io.tmpdir
=
%TEMP_PATH%
set
JVM_CONFIG
=
%JVM_CONFIG%
-Djava
.io.tmpdir
=
%TEMP_PATH%
set
JVM_CONFIG
=
%JVM_CONFIG%
-Dbasedir
=
%BASEDIR%
set
JVM_CONFIG
=
%JVM_CONFIG%
-Dbasedir
=
%BASEDIR%
set
JVM_CONFIG
=
%JVM_CONFIG%
-Dloader
.path
=
file
://
%BASEDIR%
/conf
,
file
://
%BASEDIR%
/lib
set
DEBUG_OPTS
=
set
DEBUG_OPTS
=
...
...
fill-manager/src/main/bin/start.sh
View file @
29860117
...
@@ -11,17 +11,17 @@ HEAP_DUMP_PATH=$LOG_PATH/PROJECT_NAME"-heap_dump.hprof"
...
@@ -11,17 +11,17 @@ HEAP_DUMP_PATH=$LOG_PATH/PROJECT_NAME"-heap_dump.hprof"
TEMP_PATH
=
$LOG_PATH
/temp/
TEMP_PATH
=
$LOG_PATH
/temp/
SUCCESS
=
0
SUCCESS
=
0
FAIL
=
9
FAIL
=
9
if
[
!
-n
"
$PORT
"
]
;
then
if
[
!
-n
"
$PORT
"
]
;
then
echo
$"Usage:
$0
{port}"
echo
$"Usage:
$0
{port}"
exit
$FAIL
exit
$FAIL
fi
fi
if
[
!
-d
$LOG_PATH
]
;
if
[
!
-d
$LOG_PATH
]
;
then
then
mkdir
-p
$LOG_PATH
;
mkdir
-p
$LOG_PATH
;
fi
fi
if
[
!
-d
$TEMP_PATH
]
;
if
[
!
-d
$TEMP_PATH
]
;
then
then
mkdir
-p
$TEMP_PATH
;
mkdir
-p
$TEMP_PATH
;
fi
fi
if
[
-z
"
$JAVACMD
"
]
;
then
if
[
-z
"
$JAVACMD
"
]
;
then
if
[
-n
"
$JAVA_HOME
"
]
;
then
if
[
-n
"
$JAVA_HOME
"
]
;
then
...
@@ -32,9 +32,8 @@ if [ -z "$JAVACMD" ] ; then
...
@@ -32,9 +32,8 @@ if [ -z "$JAVACMD" ] ; then
JAVACMD
=
"
$JAVA_HOME
/bin/java"
JAVACMD
=
"
$JAVA_HOME
/bin/java"
fi
fi
else
else
JAVACMD
=
`
which java
>
/dev/null 2>&1
`
JAVACMD
=
`
which java
`
echo
"Error: JAVA_HOME is not defined correctly."
echo
"Error: JAVA_HOME is
$JAVACMD
"
exit
$ERR_NO_JAVA
fi
fi
fi
fi
...
@@ -61,7 +60,7 @@ exec "$JAVACMD" $JAVA_OPTS \
...
@@ -61,7 +60,7 @@ exec "$JAVACMD" $JAVA_OPTS \
-Dbasedir
=
"
$BASEDIR
"
\
-Dbasedir
=
"
$BASEDIR
"
\
-Djava
.io.tmpdir
=
$TEMP_PATH
\
-Djava
.io.tmpdir
=
$TEMP_PATH
\
-Dloader
.path
=
"file://
$BASEDIR
/conf,file://
$BASEDIR
/lib"
\
-Dloader
.path
=
"file://
$BASEDIR
/conf,file://
$BASEDIR
/lib"
\
-agentlib
:jdwp
=
transport
=
dt_socket,server
=
y,suspend
=
n,address
=
15501
\
-agentlib
:jdwp
=
transport
=
dt_socket,server
=
y,suspend
=
n,address
=
5516
\
-jar
$MAIN_CLASS
\
-jar
$MAIN_CLASS
\
>
/dev/null &
>
/dev/null &
...
...
fill-manager/src/main/bin/stop.sh
0 → 100644
View file @
29860117
#! /bin/sh
PORT
=
"@profiles.server.port@"
BASEDIR
=
`
dirname
$0
`
BASEDIR
=
`
(
cd
"
$BASEDIR
"
;
pwd
)
`
PROJECT_NAME
=
"@project.artifactId@"
MAIN_CLASS
=
"
$PROJECT_NAME
"
;
if
[
!
-n
"
$PORT
"
]
;
then
echo
$"Usage:
$0
{port}"
exit
$FAIL
fi
echo
"stoping application
$PROJECT_NAME
......"
jcpid
=
`
ps
-ef
|
grep
-v
"grep"
|
grep
"
$MAIN_CLASS
"
|
grep
"app.port=
$PORT
"
|
sed
-n
'1P'
|
awk
'{print $2}'
`
if
[
-z
$jcpid
]
;
then
echo
"
$PROJECT_NAME
is not started or has been stopped!"
else
curl
-X
POST
-i
-u
$SECURITY_USERNAME
:
$SECURITY_PASSWORD
http://127.0.0.1:
$PORT
/xxx_manager/shutdown
for
i
in
{
1..60
}
do
jcpid
=
`
ps
-ef
|
grep
-v
"grep"
|
grep
"
$MAIN_CLASS
"
|
grep
"app.port=
$PORT
"
|
sed
-n
'1P'
|
awk
'{print $2}'
`
if
[
-z
$jcpid
]
;
then
echo
"
$PROJECT_NAME
has been stopped!"
break
else
echo
"stoping the application ..
$i
"
sleep
1
fi
done
jcpid
=
`
ps
-ef
|
grep
-v
"grep"
|
grep
"
$MAIN_CLASS
"
|
grep
"app.port=
$PORT
"
|
sed
-n
'1P'
|
awk
'{print $2}'
`
if
[
$jcpid
]
;
then
[
-z
$jcpid
]
||
kill
-15
$jcpid
for
i
in
{
1..30
}
do
jcpid
=
`
ps
-ef
|
grep
-v
"grep"
|
grep
"
$MAIN_CLASS
"
|
grep
"app.port=
$PORT
"
|
sed
-n
'1P'
|
awk
'{print $2}'
`
if
[
-z
$jcpid
]
;
then
echo
"
$PROJECT_NAME
has been stopped!"
break
else
echo
"stoping the application ..
$i
"
sleep
1
fi
done
fi
jcpid
=
`
ps
-ef
|
grep
-v
"grep"
|
grep
"
$MAIN_CLASS
"
|
grep
"app.port=
$PORT
"
|
sed
-n
'1P'
|
awk
'{print $2}'
`
if
[
$jcpid
]
;
then
[
-z
$jcpid
]
||
kill
-9
$jcpid
[
$?
-eq
0
]
&&
echo
"Stop
$PROJECT_NAME
OK!"
||
echo
"Stop
$PROJECT_NAME
Fail!"
fi
fi
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