Authored by jimi.ji

docker

... ... @@ -2,10 +2,10 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="73f1c4c4-a4e0-4e72-aa1b-7be1b346abcf" name="Default" comment="">
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/Docker-Image-Deplopy/aws/awsdeploy.sh" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/Docker-Image-Deplopy/aws/yohobuy-node-template.json" />
<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-Image-Deplopy/aws/yohobuy-node-template.json" afterPath="$PROJECT_DIR$/Docker-Image-Deplopy/aws/yohobuy-node-template.json" />
</list>
<ignored path="$PROJECT_DIR$/out/" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
... ... @@ -41,11 +41,11 @@
</provider>
</entry>
</file>
<file leaf-file-name="Jenkinsfile" pinned="false" current-in-tab="false">
<file leaf-file-name="Jenkinsfile" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/Docker-Image-Deplopy/Jenkinsfile">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-526">
<caret line="32" column="52" lean-forward="true" selection-start-line="32" selection-start-column="52" selection-end-line="32" selection-end-column="52" />
<state relative-caret-position="311">
<caret line="86" column="14" lean-forward="false" selection-start-line="86" selection-start-column="14" selection-end-line="86" selection-end-column="14" />
<folding />
</state>
</provider>
... ... @@ -61,11 +61,11 @@
</provider>
</entry>
</file>
<file leaf-file-name="awsdeploy.sh" pinned="false" current-in-tab="true">
<file leaf-file-name="awsdeploy.sh" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/Docker-Image-Deplopy/aws/awsdeploy.sh">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="54">
<caret line="2" column="0" lean-forward="false" selection-start-line="2" selection-start-column="0" selection-end-line="2" selection-end-column="0" />
<state relative-caret-position="-54">
<caret line="13" column="112" lean-forward="false" selection-start-line="13" selection-start-column="100" selection-end-line="13" selection-end-column="112" />
<folding />
</state>
</provider>
... ... @@ -74,8 +74,8 @@
<file leaf-file-name="yohobuy-node-template.json" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/Docker-Image-Deplopy/aws/yohobuy-node-template.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="248">
<caret line="37" column="20" lean-forward="false" selection-start-line="37" selection-start-column="20" selection-end-line="37" selection-end-column="20" />
<state relative-caret-position="329">
<caret line="40" column="79" lean-forward="false" selection-start-line="40" selection-start-column="66" selection-end-line="40" selection-end-column="79" />
<folding />
</state>
</provider>
... ... @@ -110,6 +110,7 @@
<find>workdir</find>
<find>public</find>
<find>FAMILY</find>
<find>BUILD_VERSION</find>
</findStrings>
</component>
<component name="Git.Settings">
... ... @@ -131,9 +132,9 @@
<list>
<option value="$PROJECT_DIR$/Docker-Node-Build/Jenkinsfile" />
<option value="$PROJECT_DIR$/Docker-Image-Deplopy/qcloud/qcloud.sh" />
<option value="$PROJECT_DIR$/Docker-Image-Deplopy/Jenkinsfile" />
<option value="$PROJECT_DIR$/Docker-Image-Deplopy/aws/yohobuy-node-template.json" />
<option value="$PROJECT_DIR$/Docker-Image-Deplopy/aws/awsdeploy.sh" />
<option value="$PROJECT_DIR$/Docker-Image-Deplopy/Jenkinsfile" />
</list>
</option>
</component>
... ... @@ -657,12 +658,12 @@
<updated>1545890692513</updated>
<workItem from="1545890694011" duration="11746000" />
<workItem from="1545905663805" duration="1370000" />
<workItem from="1545965888175" duration="16975000" />
<workItem from="1545965888175" duration="17267000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="30091000" />
<option name="totallyTimeSpent" value="30383000" />
</component>
<component name="ToolWindowManager">
<frame x="-8" y="-8" width="1382" height="744" extended-state="6" />
... ... @@ -682,8 +683,9 @@
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4409836" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Designer" active="false" anchor="left" 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="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="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24962178" sideWeight="0.5" order="6" side_tool="false" content_ui="combo" />
<window_info id="Database" 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="3" side_tool="false" content_ui="tabs" />
<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="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
<window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
... ... @@ -695,8 +697,37 @@
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="9" side_tool="false" content_ui="combo" />
<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="Find" 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="4" side_tool="false" content_ui="tabs" />
</layout>
<layout-to-restore>
<window_info id="Palette" 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="6" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Nl-Palette" active="false" anchor="left" 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="Message" 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="3" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" 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="0" side_tool="true" content_ui="tabs" />
<window_info id="Maven Projects" 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="0" side_tool="false" content_ui="tabs" />
<window_info id="Properties" 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="1" side_tool="false" content_ui="tabs" />
<window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Designer" active="false" anchor="left" 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="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="9" side_tool="false" content_ui="combo" />
<window_info id="Database" 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="3" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
<window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Debug" 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="6" side_tool="false" content_ui="tabs" />
<window_info id="TODO" 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="9" side_tool="false" content_ui="tabs" />
<window_info id="Palette&#9;" 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="2" side_tool="false" content_ui="tabs" />
<window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Capture Analysis" 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="4" side_tool="false" content_ui="tabs" />
<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="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="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="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.4409836" 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.33" 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" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="true" content_ui="tabs" />
</layout-to-restore>
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="processedProjectFiles" value="true" />
... ... @@ -805,14 +836,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Docker-Image-Deplopy/Jenkinsfile">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-526">
<caret line="32" column="52" lean-forward="true" selection-start-line="32" selection-start-column="52" selection-end-line="32" selection-end-column="52" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Docker-Image-Deplopy/aws/deploy.sh">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
... ... @@ -831,16 +854,24 @@
</entry>
<entry file="file://$PROJECT_DIR$/Docker-Image-Deplopy/aws/yohobuy-node-template.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="248">
<caret line="37" column="20" lean-forward="false" selection-start-line="37" selection-start-column="20" selection-end-line="37" selection-end-column="20" />
<state relative-caret-position="329">
<caret line="40" column="79" lean-forward="false" selection-start-line="40" selection-start-column="66" selection-end-line="40" selection-end-column="79" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Docker-Image-Deplopy/aws/awsdeploy.sh">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="54">
<caret line="2" column="0" lean-forward="false" selection-start-line="2" selection-start-column="0" selection-end-line="2" selection-end-column="0" />
<state relative-caret-position="-54">
<caret line="13" column="112" lean-forward="false" selection-start-line="13" selection-start-column="100" selection-end-line="13" selection-end-column="112" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Docker-Image-Deplopy/Jenkinsfile">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="311">
<caret line="86" column="14" lean-forward="false" selection-start-line="86" selection-start-column="14" selection-end-line="86" selection-end-column="14" />
<folding />
</state>
</provider>
... ...
... ... @@ -52,6 +52,21 @@ pipeline {
}
}
stage('aws deploy'){
steps{
script {
println "begin upload to cdn"
if(params.deployEnv=='aws' || params.deployEnv=='all'){
//切换kubectl的认证
def shellworkdir="${env.WORKSPACE}/Docker-Image-Deplopy/aws/awsdeploy.sh"
sh "sh ${shellworkdir} ${params.serviceName} ${params.imageInfo}"
}else {
println "aws this no need restart"
}
}
}
}
... ... @@ -69,7 +84,7 @@ pipeline {
post {
always {
echo "clean up our workspace"
deleteDir() /* clean up our workspace */
/* deleteDir() clean up our workspace */
}
}
}
... ...
... ... @@ -11,7 +11,7 @@ CLUSTER=web
#Replace the build number and respository URI placeholders with the constants above
sed -e "s;%BUILD_VERSION%;${BUILD_NUMBER};g" ${SERVICE_NAME}-trmplate.json > ${SERVICE_NAME}-v_${BUILD_NUMBER}.json
sed -e "s;%IMAGE_VERSION%;${REPOSITORY_NAME};g" ${SERVICE_NAME}-trmplate.json > ${SERVICE_NAME}-v_${BUILD_NUMBER}.json
#Register the task definition in the repository
aws ecs register-task-definition --family ${SERVICE_NAME} --cli-input-json file://${WORKSPACE}/${SERVICE_NAME}-v_${BUILD_NUMBER}.json --region ${REGION}
SERVICES=`aws ecs describe-services --services ${SERVICE_NAME} --cluster ${CLUSTER} --region ${REGION} | jq .failures[]`
... ...
... ... @@ -38,7 +38,7 @@
"memory": null,
"memoryReservation": 400,
"volumesFrom": [],
"image": "860721417875.dkr.ecr.cn-north-1.amazonaws.com.cn/yoho-online/yohobuy-node:%BUILD_VERSION%",
"image": "860721417875.dkr.ecr.cn-north-1.amazonaws.com.cn/%IMAGE_VERSION%",
"disableNetworking": null,
"interactive": null,
"healthCheck": null,
... ...