Authored by jimi.ji

add dockerment

... ... @@ -3,11 +3,7 @@
<component name="ChangeListManager">
<list default="true" id="73f1c4c4-a4e0-4e72-aa1b-7be1b346abcf" name="Default" comment="">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/Docker-Image-Deplopy/Jenkinsfile" afterPath="$PROJECT_DIR$/Docker-Image-Deplopy/Jenkinsfile" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/Docker-Image-Deplopy/aws/awsdeploy.sh" afterPath="$PROJECT_DIR$/Docker-Image-Deplopy/aws/awsdeploy.sh" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/Docker-Node-Build/Jenkinsfile" afterPath="$PROJECT_DIR$/Docker-Node-Build/Jenkinsfile" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/Docker-Node-Build/LocalUploadConfig" afterPath="$PROJECT_DIR$/Docker-Node-Build/LocalUploadConfig" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/readme.md" afterPath="$PROJECT_DIR$/readme.md" />
</list>
<ignored path="$PROJECT_DIR$/out/" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
... ... @@ -23,12 +19,22 @@
<component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="Jenkinsfile" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/Docker-Node-Build/Jenkinsfile">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="351">
<caret line="34" column="56" lean-forward="false" selection-start-line="34" selection-start-column="56" selection-end-line="34" selection-end-column="56" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="readme.md" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/readme.md">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="SPLIT">
<first_editor relative-caret-position="260">
<caret line="41" column="0" lean-forward="false" selection-start-line="41" selection-start-column="0" selection-end-line="41" selection-end-column="77" />
<first_editor relative-caret-position="378">
<caret line="44" column="21" lean-forward="true" selection-start-line="44" selection-start-column="21" selection-end-line="44" selection-end-column="21" />
<folding />
</first_editor>
<second_editor />
... ... @@ -36,11 +42,21 @@
</provider>
</entry>
</file>
<file leaf-file-name="Jenkinsfile" pinned="false" current-in-tab="true">
<file leaf-file-name="LocalUploadConfig" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/Docker-Node-Build/LocalUploadConfig">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="27">
<caret line="1" column="69" lean-forward="false" selection-start-line="1" selection-start-column="69" selection-end-line="1" selection-end-column="69" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Jenkinsfile" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/Docker-Image-Deplopy/Jenkinsfile">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="243">
<caret line="9" column="85" lean-forward="false" selection-start-line="9" selection-start-column="85" selection-end-line="9" selection-end-column="85" />
<state relative-caret-position="189">
<caret line="7" column="23" lean-forward="false" selection-start-line="7" selection-start-column="23" selection-end-line="7" selection-end-column="23" />
<folding />
</state>
</provider>
... ... @@ -99,9 +115,9 @@
<option value="$PROJECT_DIR$/Docker-Image-Deplopy/qcloud/qcloudDeploy.py" />
<option value="$PROJECT_DIR$/Docker-Image-Deplopy/aws/awsdeploy.sh" />
<option value="$PROJECT_DIR$/Docker-Node-Build/LocalUploadConfig" />
<option value="$PROJECT_DIR$/Docker-Node-Build/Jenkinsfile" />
<option value="$PROJECT_DIR$/readme.md" />
<option value="$PROJECT_DIR$/Docker-Image-Deplopy/Jenkinsfile" />
<option value="$PROJECT_DIR$/readme.md" />
<option value="$PROJECT_DIR$/Docker-Node-Build/Jenkinsfile" />
</list>
</option>
</component>
... ... @@ -633,12 +649,12 @@
<workItem from="1545965888175" duration="20585000" />
<workItem from="1546047561789" duration="16674000" />
<workItem from="1546394046618" duration="10116000" />
<workItem from="1546479910588" duration="10721000" />
<workItem from="1546479910588" duration="11403000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="71212000" />
<option name="totallyTimeSpent" value="71894000" />
</component>
<component name="ToolWindowManager">
<frame x="-8" y="-8" width="1382" height="744" extended-state="0" />
... ... @@ -697,7 +713,7 @@
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.5295082" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.5295082" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.24962178" sideWeight="0.5" order="6" side_tool="false" content_ui="combo" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3295082" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Theme Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
... ... @@ -1012,26 +1028,18 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Docker-Node-Build/Jenkinsfile">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="324">
<caret line="12" column="5" lean-forward="true" selection-start-line="12" selection-start-column="5" selection-end-line="12" selection-end-column="5" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Docker-Node-Build/LocalUploadConfig">
<entry file="file://$PROJECT_DIR$/Docker-Image-Deplopy/qcloud/qcloudDeploy.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="27">
<caret line="1" column="69" lean-forward="false" selection-start-line="1" selection-start-column="69" selection-end-line="1" selection-end-column="69" />
<state relative-caret-position="135">
<caret line="72" column="23" lean-forward="true" selection-start-line="72" selection-start-column="23" selection-end-line="72" selection-end-column="23" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Docker-Image-Deplopy/qcloud/qcloudDeploy.py">
<entry file="file://$PROJECT_DIR$/Docker-Image-Deplopy/Jenkinsfile">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="135">
<caret line="72" column="23" lean-forward="true" selection-start-line="72" selection-start-column="23" selection-end-line="72" selection-end-column="23" />
<state relative-caret-position="189">
<caret line="7" column="23" lean-forward="false" selection-start-line="7" selection-start-column="23" selection-end-line="7" selection-end-column="23" />
<folding />
</state>
</provider>
... ... @@ -1039,18 +1047,26 @@
<entry file="file://$PROJECT_DIR$/readme.md">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="SPLIT">
<first_editor relative-caret-position="260">
<caret line="41" column="0" lean-forward="false" selection-start-line="41" selection-start-column="0" selection-end-line="41" selection-end-column="77" />
<first_editor relative-caret-position="378">
<caret line="44" column="21" lean-forward="true" selection-start-line="44" selection-start-column="21" selection-end-line="44" selection-end-column="21" />
<folding />
</first_editor>
<second_editor />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Docker-Image-Deplopy/Jenkinsfile">
<entry file="file://$PROJECT_DIR$/Docker-Node-Build/LocalUploadConfig">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="243">
<caret line="9" column="85" lean-forward="false" selection-start-line="9" selection-start-column="85" selection-end-line="9" selection-end-column="85" />
<state relative-caret-position="27">
<caret line="1" column="69" lean-forward="false" selection-start-line="1" selection-start-column="69" selection-end-line="1" selection-end-column="69" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Docker-Node-Build/Jenkinsfile">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="351">
<caret line="34" column="56" lean-forward="false" selection-start-line="34" selection-start-column="56" selection-end-line="34" selection-end-column="56" />
<folding />
</state>
</provider>
... ...
... ... @@ -32,16 +32,16 @@ pipeline {
steps{
script {
echo "print the para projectName is : ${params.projectName}......"
echo "print the para workdir is : ${env.PROJECT_WORK_DIR}......"
echo "print the para workdir is : ${PROJECT_WORK_DIR}......"
echo "print the para projectGitGroup is : ${params.projectGitGroup}......"
echo "print the para deployName is : ${params.deployName}......"
echo "print the para branch is : ${params.projectBranch}......"
echo "print the para isNeedCdn is : ${params.isNeedCdn}......"
echo "print the para imageSource is : ${params.imageSource}......"
echo "print the para imageVersion is : ${params.imageVersion}......"
if(fileExists("${env.PROJECT_WORK_DIR}/")){
echo "starting delete the dir ${env.PROJECT_WORK_DIR}"
sh "rm -rf ${env.PROJECT_WORK_DIR}"
if(fileExists("${PROJECT_WORK_DIR}/")){
echo "starting delete the dir ${PROJECT_WORK_DIR}"
sh "rm -rf ${PROJECT_WORK_DIR}"
}
}
}
... ... @@ -50,7 +50,7 @@ pipeline {
stage('git clone project'){
steps{
script {
sh "git clone -b ${params.projectBranch} git@git.yoho.cn:${params.projectGitGroup}/${params.projectName}.git ${env.PROJECT_WORK_DIR}"
sh "git clone -b ${params.projectBranch} git@git.yoho.cn:${params.projectGitGroup}/${params.projectName}.git ${PROJECT_WORK_DIR}"
}
}
}
... ... @@ -59,7 +59,7 @@ pipeline {
stage('build project'){
steps{
script {
sh "cd ${env.PROJECT_WORK_DIR} && sh ${env.PROJECT_WORK_DIR}/docker.sh ${params.isNeedCdn} ${env.PROJECT_WORK_DIR}"
sh "cd ${PROJECT_WORK_DIR} && sh ${PROJECT_WORK_DIR}/docker.sh ${params.isNeedCdn} ${PROJECT_WORK_DIR}"
}
}
}
... ... @@ -71,7 +71,7 @@ pipeline {
println "begin upload to cdn"
if(params.isNeedCdn=='YES'){
def olddir = "this_is_replace_for_qshell_upload_to_cdn"
def repalceDir = "${env.PROJECT_WORK_DIR}/dist/statics"
def repalceDir = "${PROJECT_WORK_DIR}/dist/statics"
println repalceDir
sh "sed -i 's?${olddir}?${repalceDir}?g' ${env.WORKSPACE}/Docker-Node-Build/LocalUploadConfig"
sh "/home/soft/qshell qupload 3 ${env.WORKSPACE}/Docker-Node-Build/LocalUploadConfig"
... ... @@ -88,7 +88,7 @@ pipeline {
script {
echo "begin bake image......"
def qcloudimage = "${env.QCLOUD_IMAGE}/${params.imageSource}/${params.deployName}:${params.imageVersion}"
sh "docker build -t ${qcloudimage} ${env.PROJECT_WORK_DIR}/dist/node"
sh "docker build -t ${qcloudimage} ${PROJECT_WORK_DIR}/dist/node"
sh "docker push ${qcloudimage}"
echo "end bake qcloud image......"
}
... ...