Authored by jimi.ji

add dockerment

@@ -3,11 +3,7 @@ @@ -3,11 +3,7 @@
3 <component name="ChangeListManager"> 3 <component name="ChangeListManager">
4 <list default="true" id="73f1c4c4-a4e0-4e72-aa1b-7be1b346abcf" name="Default" comment=""> 4 <list default="true" id="73f1c4c4-a4e0-4e72-aa1b-7be1b346abcf" name="Default" comment="">
5 <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" /> 5 <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
6 - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/Docker-Image-Deplopy/Jenkinsfile" afterPath="$PROJECT_DIR$/Docker-Image-Deplopy/Jenkinsfile" />  
7 - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/Docker-Image-Deplopy/aws/awsdeploy.sh" afterPath="$PROJECT_DIR$/Docker-Image-Deplopy/aws/awsdeploy.sh" />  
8 <change type="MODIFICATION" beforePath="$PROJECT_DIR$/Docker-Node-Build/Jenkinsfile" afterPath="$PROJECT_DIR$/Docker-Node-Build/Jenkinsfile" /> 6 <change type="MODIFICATION" beforePath="$PROJECT_DIR$/Docker-Node-Build/Jenkinsfile" afterPath="$PROJECT_DIR$/Docker-Node-Build/Jenkinsfile" />
9 - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/Docker-Node-Build/LocalUploadConfig" afterPath="$PROJECT_DIR$/Docker-Node-Build/LocalUploadConfig" />  
10 - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/readme.md" afterPath="$PROJECT_DIR$/readme.md" />  
11 </list> 7 </list>
12 <ignored path="$PROJECT_DIR$/out/" /> 8 <ignored path="$PROJECT_DIR$/out/" />
13 <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> 9 <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
@@ -23,12 +19,22 @@ @@ -23,12 +19,22 @@
23 <component name="ExecutionTargetManager" SELECTED_TARGET="default_target" /> 19 <component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
24 <component name="FileEditorManager"> 20 <component name="FileEditorManager">
25 <leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> 21 <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
  22 + <file leaf-file-name="Jenkinsfile" pinned="false" current-in-tab="true">
  23 + <entry file="file://$PROJECT_DIR$/Docker-Node-Build/Jenkinsfile">
  24 + <provider selected="true" editor-type-id="text-editor">
  25 + <state relative-caret-position="351">
  26 + <caret line="34" column="56" lean-forward="false" selection-start-line="34" selection-start-column="56" selection-end-line="34" selection-end-column="56" />
  27 + <folding />
  28 + </state>
  29 + </provider>
  30 + </entry>
  31 + </file>
26 <file leaf-file-name="readme.md" pinned="false" current-in-tab="false"> 32 <file leaf-file-name="readme.md" pinned="false" current-in-tab="false">
27 <entry file="file://$PROJECT_DIR$/readme.md"> 33 <entry file="file://$PROJECT_DIR$/readme.md">
28 <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]"> 34 <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
29 <state split_layout="SPLIT"> 35 <state split_layout="SPLIT">
30 - <first_editor relative-caret-position="260">  
31 - <caret line="41" column="0" lean-forward="false" selection-start-line="41" selection-start-column="0" selection-end-line="41" selection-end-column="77" /> 36 + <first_editor relative-caret-position="378">
  37 + <caret line="44" column="21" lean-forward="true" selection-start-line="44" selection-start-column="21" selection-end-line="44" selection-end-column="21" />
32 <folding /> 38 <folding />
33 </first_editor> 39 </first_editor>
34 <second_editor /> 40 <second_editor />
@@ -36,11 +42,21 @@ @@ -36,11 +42,21 @@
36 </provider> 42 </provider>
37 </entry> 43 </entry>
38 </file> 44 </file>
39 - <file leaf-file-name="Jenkinsfile" pinned="false" current-in-tab="true"> 45 + <file leaf-file-name="LocalUploadConfig" pinned="false" current-in-tab="false">
  46 + <entry file="file://$PROJECT_DIR$/Docker-Node-Build/LocalUploadConfig">
  47 + <provider selected="true" editor-type-id="text-editor">
  48 + <state relative-caret-position="27">
  49 + <caret line="1" column="69" lean-forward="false" selection-start-line="1" selection-start-column="69" selection-end-line="1" selection-end-column="69" />
  50 + <folding />
  51 + </state>
  52 + </provider>
  53 + </entry>
  54 + </file>
  55 + <file leaf-file-name="Jenkinsfile" pinned="false" current-in-tab="false">
40 <entry file="file://$PROJECT_DIR$/Docker-Image-Deplopy/Jenkinsfile"> 56 <entry file="file://$PROJECT_DIR$/Docker-Image-Deplopy/Jenkinsfile">
41 <provider selected="true" editor-type-id="text-editor"> 57 <provider selected="true" editor-type-id="text-editor">
42 - <state relative-caret-position="243">  
43 - <caret line="9" column="85" lean-forward="false" selection-start-line="9" selection-start-column="85" selection-end-line="9" selection-end-column="85" /> 58 + <state relative-caret-position="189">
  59 + <caret line="7" column="23" lean-forward="false" selection-start-line="7" selection-start-column="23" selection-end-line="7" selection-end-column="23" />
44 <folding /> 60 <folding />
45 </state> 61 </state>
46 </provider> 62 </provider>
@@ -99,9 +115,9 @@ @@ -99,9 +115,9 @@
99 <option value="$PROJECT_DIR$/Docker-Image-Deplopy/qcloud/qcloudDeploy.py" /> 115 <option value="$PROJECT_DIR$/Docker-Image-Deplopy/qcloud/qcloudDeploy.py" />
100 <option value="$PROJECT_DIR$/Docker-Image-Deplopy/aws/awsdeploy.sh" /> 116 <option value="$PROJECT_DIR$/Docker-Image-Deplopy/aws/awsdeploy.sh" />
101 <option value="$PROJECT_DIR$/Docker-Node-Build/LocalUploadConfig" /> 117 <option value="$PROJECT_DIR$/Docker-Node-Build/LocalUploadConfig" />
102 - <option value="$PROJECT_DIR$/Docker-Node-Build/Jenkinsfile" />  
103 - <option value="$PROJECT_DIR$/readme.md" />  
104 <option value="$PROJECT_DIR$/Docker-Image-Deplopy/Jenkinsfile" /> 118 <option value="$PROJECT_DIR$/Docker-Image-Deplopy/Jenkinsfile" />
  119 + <option value="$PROJECT_DIR$/readme.md" />
  120 + <option value="$PROJECT_DIR$/Docker-Node-Build/Jenkinsfile" />
105 </list> 121 </list>
106 </option> 122 </option>
107 </component> 123 </component>
@@ -633,12 +649,12 @@ @@ -633,12 +649,12 @@
633 <workItem from="1545965888175" duration="20585000" /> 649 <workItem from="1545965888175" duration="20585000" />
634 <workItem from="1546047561789" duration="16674000" /> 650 <workItem from="1546047561789" duration="16674000" />
635 <workItem from="1546394046618" duration="10116000" /> 651 <workItem from="1546394046618" duration="10116000" />
636 - <workItem from="1546479910588" duration="10721000" /> 652 + <workItem from="1546479910588" duration="11403000" />
637 </task> 653 </task>
638 <servers /> 654 <servers />
639 </component> 655 </component>
640 <component name="TimeTrackingManager"> 656 <component name="TimeTrackingManager">
641 - <option name="totallyTimeSpent" value="71212000" /> 657 + <option name="totallyTimeSpent" value="71894000" />
642 </component> 658 </component>
643 <component name="ToolWindowManager"> 659 <component name="ToolWindowManager">
644 <frame x="-8" y="-8" width="1382" height="744" extended-state="0" /> 660 <frame x="-8" y="-8" width="1382" height="744" extended-state="0" />
@@ -697,7 +713,7 @@ @@ -697,7 +713,7 @@
697 <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" /> 713 <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" />
698 <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" /> 714 <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" />
699 <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" /> 715 <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" />
700 - <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" /> 716 + <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" />
701 <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" /> 717 <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" />
702 <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" /> 718 <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" />
703 <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" /> 719 <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 @@ @@ -1012,26 +1028,18 @@
1012 </state> 1028 </state>
1013 </provider> 1029 </provider>
1014 </entry> 1030 </entry>
1015 - <entry file="file://$PROJECT_DIR$/Docker-Node-Build/Jenkinsfile">  
1016 - <provider selected="true" editor-type-id="text-editor">  
1017 - <state relative-caret-position="324">  
1018 - <caret line="12" column="5" lean-forward="true" selection-start-line="12" selection-start-column="5" selection-end-line="12" selection-end-column="5" />  
1019 - <folding />  
1020 - </state>  
1021 - </provider>  
1022 - </entry>  
1023 - <entry file="file://$PROJECT_DIR$/Docker-Node-Build/LocalUploadConfig"> 1031 + <entry file="file://$PROJECT_DIR$/Docker-Image-Deplopy/qcloud/qcloudDeploy.py">
1024 <provider selected="true" editor-type-id="text-editor"> 1032 <provider selected="true" editor-type-id="text-editor">
1025 - <state relative-caret-position="27">  
1026 - <caret line="1" column="69" lean-forward="false" selection-start-line="1" selection-start-column="69" selection-end-line="1" selection-end-column="69" /> 1033 + <state relative-caret-position="135">
  1034 + <caret line="72" column="23" lean-forward="true" selection-start-line="72" selection-start-column="23" selection-end-line="72" selection-end-column="23" />
1027 <folding /> 1035 <folding />
1028 </state> 1036 </state>
1029 </provider> 1037 </provider>
1030 </entry> 1038 </entry>
1031 - <entry file="file://$PROJECT_DIR$/Docker-Image-Deplopy/qcloud/qcloudDeploy.py"> 1039 + <entry file="file://$PROJECT_DIR$/Docker-Image-Deplopy/Jenkinsfile">
1032 <provider selected="true" editor-type-id="text-editor"> 1040 <provider selected="true" editor-type-id="text-editor">
1033 - <state relative-caret-position="135">  
1034 - <caret line="72" column="23" lean-forward="true" selection-start-line="72" selection-start-column="23" selection-end-line="72" selection-end-column="23" /> 1041 + <state relative-caret-position="189">
  1042 + <caret line="7" column="23" lean-forward="false" selection-start-line="7" selection-start-column="23" selection-end-line="7" selection-end-column="23" />
1035 <folding /> 1043 <folding />
1036 </state> 1044 </state>
1037 </provider> 1045 </provider>
@@ -1039,18 +1047,26 @@ @@ -1039,18 +1047,26 @@
1039 <entry file="file://$PROJECT_DIR$/readme.md"> 1047 <entry file="file://$PROJECT_DIR$/readme.md">
1040 <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]"> 1048 <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
1041 <state split_layout="SPLIT"> 1049 <state split_layout="SPLIT">
1042 - <first_editor relative-caret-position="260">  
1043 - <caret line="41" column="0" lean-forward="false" selection-start-line="41" selection-start-column="0" selection-end-line="41" selection-end-column="77" /> 1050 + <first_editor relative-caret-position="378">
  1051 + <caret line="44" column="21" lean-forward="true" selection-start-line="44" selection-start-column="21" selection-end-line="44" selection-end-column="21" />
1044 <folding /> 1052 <folding />
1045 </first_editor> 1053 </first_editor>
1046 <second_editor /> 1054 <second_editor />
1047 </state> 1055 </state>
1048 </provider> 1056 </provider>
1049 </entry> 1057 </entry>
1050 - <entry file="file://$PROJECT_DIR$/Docker-Image-Deplopy/Jenkinsfile"> 1058 + <entry file="file://$PROJECT_DIR$/Docker-Node-Build/LocalUploadConfig">
1051 <provider selected="true" editor-type-id="text-editor"> 1059 <provider selected="true" editor-type-id="text-editor">
1052 - <state relative-caret-position="243">  
1053 - <caret line="9" column="85" lean-forward="false" selection-start-line="9" selection-start-column="85" selection-end-line="9" selection-end-column="85" /> 1060 + <state relative-caret-position="27">
  1061 + <caret line="1" column="69" lean-forward="false" selection-start-line="1" selection-start-column="69" selection-end-line="1" selection-end-column="69" />
  1062 + <folding />
  1063 + </state>
  1064 + </provider>
  1065 + </entry>
  1066 + <entry file="file://$PROJECT_DIR$/Docker-Node-Build/Jenkinsfile">
  1067 + <provider selected="true" editor-type-id="text-editor">
  1068 + <state relative-caret-position="351">
  1069 + <caret line="34" column="56" lean-forward="false" selection-start-line="34" selection-start-column="56" selection-end-line="34" selection-end-column="56" />
1054 <folding /> 1070 <folding />
1055 </state> 1071 </state>
1056 </provider> 1072 </provider>
@@ -32,16 +32,16 @@ pipeline { @@ -32,16 +32,16 @@ pipeline {
32 steps{ 32 steps{
33 script { 33 script {
34 echo "print the para projectName is : ${params.projectName}......" 34 echo "print the para projectName is : ${params.projectName}......"
35 - echo "print the para workdir is : ${env.PROJECT_WORK_DIR}......" 35 + echo "print the para workdir is : ${PROJECT_WORK_DIR}......"
36 echo "print the para projectGitGroup is : ${params.projectGitGroup}......" 36 echo "print the para projectGitGroup is : ${params.projectGitGroup}......"
37 echo "print the para deployName is : ${params.deployName}......" 37 echo "print the para deployName is : ${params.deployName}......"
38 echo "print the para branch is : ${params.projectBranch}......" 38 echo "print the para branch is : ${params.projectBranch}......"
39 echo "print the para isNeedCdn is : ${params.isNeedCdn}......" 39 echo "print the para isNeedCdn is : ${params.isNeedCdn}......"
40 echo "print the para imageSource is : ${params.imageSource}......" 40 echo "print the para imageSource is : ${params.imageSource}......"
41 echo "print the para imageVersion is : ${params.imageVersion}......" 41 echo "print the para imageVersion is : ${params.imageVersion}......"
42 - if(fileExists("${env.PROJECT_WORK_DIR}/")){  
43 - echo "starting delete the dir ${env.PROJECT_WORK_DIR}"  
44 - sh "rm -rf ${env.PROJECT_WORK_DIR}" 42 + if(fileExists("${PROJECT_WORK_DIR}/")){
  43 + echo "starting delete the dir ${PROJECT_WORK_DIR}"
  44 + sh "rm -rf ${PROJECT_WORK_DIR}"
45 } 45 }
46 } 46 }
47 } 47 }
@@ -50,7 +50,7 @@ pipeline { @@ -50,7 +50,7 @@ pipeline {
50 stage('git clone project'){ 50 stage('git clone project'){
51 steps{ 51 steps{
52 script { 52 script {
53 - sh "git clone -b ${params.projectBranch} git@git.yoho.cn:${params.projectGitGroup}/${params.projectName}.git ${env.PROJECT_WORK_DIR}" 53 + sh "git clone -b ${params.projectBranch} git@git.yoho.cn:${params.projectGitGroup}/${params.projectName}.git ${PROJECT_WORK_DIR}"
54 } 54 }
55 } 55 }
56 } 56 }
@@ -59,7 +59,7 @@ pipeline { @@ -59,7 +59,7 @@ pipeline {
59 stage('build project'){ 59 stage('build project'){
60 steps{ 60 steps{
61 script { 61 script {
62 - sh "cd ${env.PROJECT_WORK_DIR} && sh ${env.PROJECT_WORK_DIR}/docker.sh ${params.isNeedCdn} ${env.PROJECT_WORK_DIR}" 62 + sh "cd ${PROJECT_WORK_DIR} && sh ${PROJECT_WORK_DIR}/docker.sh ${params.isNeedCdn} ${PROJECT_WORK_DIR}"
63 } 63 }
64 } 64 }
65 } 65 }
@@ -71,7 +71,7 @@ pipeline { @@ -71,7 +71,7 @@ pipeline {
71 println "begin upload to cdn" 71 println "begin upload to cdn"
72 if(params.isNeedCdn=='YES'){ 72 if(params.isNeedCdn=='YES'){
73 def olddir = "this_is_replace_for_qshell_upload_to_cdn" 73 def olddir = "this_is_replace_for_qshell_upload_to_cdn"
74 - def repalceDir = "${env.PROJECT_WORK_DIR}/dist/statics" 74 + def repalceDir = "${PROJECT_WORK_DIR}/dist/statics"
75 println repalceDir 75 println repalceDir
76 sh "sed -i 's?${olddir}?${repalceDir}?g' ${env.WORKSPACE}/Docker-Node-Build/LocalUploadConfig" 76 sh "sed -i 's?${olddir}?${repalceDir}?g' ${env.WORKSPACE}/Docker-Node-Build/LocalUploadConfig"
77 sh "/home/soft/qshell qupload 3 ${env.WORKSPACE}/Docker-Node-Build/LocalUploadConfig" 77 sh "/home/soft/qshell qupload 3 ${env.WORKSPACE}/Docker-Node-Build/LocalUploadConfig"
@@ -88,7 +88,7 @@ pipeline { @@ -88,7 +88,7 @@ pipeline {
88 script { 88 script {
89 echo "begin bake image......" 89 echo "begin bake image......"
90 def qcloudimage = "${env.QCLOUD_IMAGE}/${params.imageSource}/${params.deployName}:${params.imageVersion}" 90 def qcloudimage = "${env.QCLOUD_IMAGE}/${params.imageSource}/${params.deployName}:${params.imageVersion}"
91 - sh "docker build -t ${qcloudimage} ${env.PROJECT_WORK_DIR}/dist/node" 91 + sh "docker build -t ${qcloudimage} ${PROJECT_WORK_DIR}/dist/node"
92 sh "docker push ${qcloudimage}" 92 sh "docker push ${qcloudimage}"
93 echo "end bake qcloud image......" 93 echo "end bake qcloud image......"
94 } 94 }