Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jenkins
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Jira
Jira
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
ym
jenkins
Commits
cc34c4a9
Commit
cc34c4a9
authored
Oct 12, 2018
by
YM-RD-AP01\ymadmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
20140144: Job [Deploy_CHMB_DEV_115] configuration updated
Change performed by ·¨¼y°ó
parent
0afd610d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
27 deletions
+24
-27
jobs/Deploy_CHMB_DEV_115/config.xml
jobs/Deploy_CHMB_DEV_115/config.xml
+24
-27
No files found.
jobs/Deploy_CHMB_DEV_115/config.xml
View file @
cc34c4a9
...
...
@@ -4,13 +4,13 @@
<description></description>
<keepDependencies>
false
</keepDependencies>
<properties>
<com.dabsquared.gitlabjenkins.connection.GitLabConnectionProperty
plugin=
"gitlab-plugin@1.5.
9
"
>
<com.dabsquared.gitlabjenkins.connection.GitLabConnectionProperty
plugin=
"gitlab-plugin@1.5.
10
"
>
<gitLabConnection>
ylhealth
</gitLabConnection>
</com.dabsquared.gitlabjenkins.connection.GitLabConnectionProperty>
<jenkins.model.BuildDiscarderProperty>
<strategy
class=
"hudson.tasks.LogRotator"
>
<daysToKeep>
1
</daysToKeep>
<numToKeep>
1
</numToKeep>
<daysToKeep>
-
1
</daysToKeep>
<numToKeep>
5
</numToKeep>
<artifactDaysToKeep>
-1
</artifactDaysToKeep>
<artifactNumToKeep>
-1
</artifactNumToKeep>
</strategy>
...
...
@@ -90,32 +90,29 @@
<hudson.plugins.timestamper.TimestamperBuildWrapper
plugin=
"timestamper@1.8.10"
/>
</buildWrappers>
<prebuilders>
<hudson.tasks.BatchFile>
<command>
REM 取得今天的年、月、日 (自動補零)

SETLOCAL EnableDelayedExpansion


for /f
"
skip=1 tokens=1-6 delims=
"
%%a in (
'
wmic path Win32_LocalTime Get Day^,Hour^,Minute^,Month^,Second^,Year /Format:table
'
) do (

IF NOT
"
%%~f
"
==
""
(

set /a FormattedDate=10000 * %%f + 100 * %%d + %%a

set FormattedDate=%%f!FormattedDate:~-4,2!!FormattedDate:~-2,2!_%%b:%%c

)

)

for /f
"
tokens=*
"
%%i in (
'
git rev-parse --short HEAD
'
) do set VAR=%%i_%FormattedDate%


"
C:\Program Files\Git\usr\bin\sed
"
-i
"
s/
<
title.*/
<
title
>
CHM Booking Manage v%VAR%
<
\/title\/
>
/
"
src\main\resources\static\index.html
</command>
</hudson.tasks.BatchFile>
<hudson.tasks.Shell>
<command>
VAR=$(git rev-parse --short HEAD)_$(date +
"
%Y%m%d_%H%M
"
)
version=$(echo $GIT_BRANCH | cut -d
'
/
'
-f 3)
sed -i
"
s/
<
title.*/
<
title
>
CHM Booking Manage v${version}_${VAR}
<
\/title\/
>
/
"
src/main/resources/static/index.html
</command>
</hudson.tasks.Shell>
</prebuilders>
<postbuilders>
<hudson.tasks.BatchFile>
<command>
set target=E:\CHM\CHMB

net stop CRM_HRB

FOR /F
"
tokens=5 delims=
"
%%P IN (
'
netstat -a -n -o ^| findstr :50401 ^| findstr LISTEN
'
) DO TaskKill.exe /F /PID %%P

del %target%\lib\*.* /q

"
C:\Program Files\7-Zip\7z.exe
"
e target\CHMB-pack.zip -o%target%\lib CHMB\lib\*.* -r

xcopy /Y /S src\main\resources\template\* %target%\template

xcopy /Y /S src\main\resources\sample\* %target%\sample

net start CRM_HRB
</command>
</hudson.tasks.BatchFile>
<hudson.tasks.Shell>
<command>
sudo systemctl stop CHMB
chmb=/opt/CHMB
tempdir=$(mktemp -d)
7za x target/CHMB-pack.zip -o
"
${tempdir}
"
rm -rf ${chmb}/lib/*
rm -rf ${chmb}/sample/*
rm -rf ${chmb}/template/*
mv -f ${tempdir}/CHMB/lib/*
"
${chmb}/lib
"
mv -f ${tempdir}/CHMB/sample/*
"
${chmb}/sample
"
mv -f ${tempdir}/CHMB/template/*
"
${chmb}/template
"
rm -rf
"
${tempdir}
"
sudo systemctl start CHMB
</command>
</hudson.tasks.Shell>
</postbuilders>
<runPostStepsIfResult>
<name>
SUCCESS
</name>
...
...
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