Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
apollo
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openSource
apollo
Commits
2c47121b
Commit
2c47121b
authored
Apr 27, 2016
by
Yiming Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update jenkins deploy script
parent
bd4220e9
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
60 additions
and
2 deletions
+60
-2
shutdown.sh
apollo-adminservice/src/main/scripts/shutdown.sh
+2
-0
startup.sh
apollo-adminservice/src/main/scripts/startup.sh
+1
-0
deploy_jenkins.sh
apollo-buildtools/src/main/scripts/deploy_jenkins.sh
+50
-0
GlobalDefaultExceptionHandler.java
...ollo/common/controller/GlobalDefaultExceptionHandler.java
+3
-0
startup.sh
apollo-configservice/src/main/scripts/startup.sh
+1
-1
shutdown.sh
apollo-portal/src/main/scripts/shutdown.sh
+2
-0
startup.sh
apollo-portal/src/main/scripts/startup.sh
+1
-1
No files found.
apollo-adminservice/src/main/scripts/shutdown.sh
View file @
2c47121b
...
...
@@ -3,4 +3,5 @@ SERVICE_NAME=apollo-adminservice
PATH_TO_JAR
=
$SERVICE_NAME
"-0.0.1-SNAPSHOT.jar"
LOG_PATH
=
/opt/logs/100003172/
cd
`
dirname
$0
`
/..
source
bin/common.sh stop
\ No newline at end of file
apollo-adminservice/src/main/scripts/startup.sh
View file @
2c47121b
...
...
@@ -3,5 +3,6 @@ SERVICE_NAME=apollo-adminservice
PATH_TO_JAR
=
$SERVICE_NAME
"-0.0.1-SNAPSHOT.jar"
LOG_PATH
=
/opt/logs/100003172/
cd
`
dirname
$0
`
/..
source
bin/common.sh start
apollo-buildtools/src/main/scripts/deploy_jenkins.sh
0 → 100644
View file @
2c47121b
#!/bin/bash
set
-e
set
-u
cd
`
dirname
$0
`
if
[
$#
-lt
1
]
;
then
echo
"usage:
`
basename
$0
`
100003171|100003172|100003173"
exit
1
fi
valid_app
=
false
for
supported_app
in
100003171 100003172 100003173
;
do
if
[
$1
==
$supported_app
]
;
then
valid_app
=
true
break
;
fi
done
if
[
$valid_app
==
false
]
;
then
echo
"
$1
is not a supported app id"
exit
1
else
echo
"Upgrading
$1
"
fi
APP_BASE_DIR
=
/opt/ctrip/app
APP_NAME
=
$1
APP_DIR
=
$APP_BASE_DIR
/
$APP_NAME
APP_RELEASE_DIR
=
$APP_BASE_DIR
/apollo-
$APP_NAME
.releases/
`
date
"+%Y-%m-%d.%H.%M.%S"
`
APP_STARTUP_SCRIPT
=
$APP_DIR
/bin/startup.sh
APP_SHUTDOWN_SCRIPTS
=
$APP_DIR
/bin/shutdown.sh
if
[
-e
$APP_STARTUP_SCRIPT
]
;
then
$APP_SHUTDOWN_SCRIPTS
fi
mkdir
-p
$APP_RELEASE_DIR
unzip
*
.zip
-d
$APP_RELEASE_DIR
if
[
-d
$APP_DIR
]
;
then
rm
-rf
$APP_DIR
fi
ln
-s
$APP_RELEASE_DIR
$APP_DIR
chmod
+x
$APP_STARTUP_SCRIPT
chmod
+x
$APP_SHUTDOWN_SCRIPT
$APP_SHUTDOWN_SCRIPT
$APP_STARTUP_SCRIPT
wait
\ No newline at end of file
apollo-common/src/main/java/com/ctrip/apollo/common/controller/GlobalDefaultExceptionHandler.java
View file @
2c47121b
...
...
@@ -12,6 +12,7 @@ import org.springframework.web.client.HttpStatusCodeException;
import
com.ctrip.apollo.core.exception.AbstractBaseException
;
import
com.ctrip.apollo.core.exception.BadRequestException
;
import
com.ctrip.apollo.core.exception.NotFoundException
;
import
com.dianping.cat.Cat
;
import
com.google.gson.Gson
;
import
com.google.gson.reflect.TypeToken
;
...
...
@@ -53,6 +54,8 @@ public class GlobalDefaultExceptionHandler {
return
restTemplateException
(
request
,
(
HttpStatusCodeException
)
ex
.
getCause
());
}
Cat
.
logError
(
ex
);
Map
<
String
,
Object
>
errorAttributes
=
new
LinkedHashMap
<>();
errorAttributes
.
put
(
"status"
,
status
.
value
());
errorAttributes
.
put
(
"message"
,
message
);
...
...
apollo-configservice/src/main/scripts/startup.sh
View file @
2c47121b
...
...
@@ -3,5 +3,5 @@ SERVICE_NAME=apollo-configservice
PATH_TO_JAR
=
$SERVICE_NAME
"-0.0.1-SNAPSHOT.jar"
LOG_PATH
=
/opt/logs/100003171/
cd
`
dirname
$0
`
/..
source
bin/common.sh start
apollo-portal/src/main/scripts/shutdown.sh
View file @
2c47121b
...
...
@@ -3,4 +3,5 @@ SERVICE_NAME=apollo-portal
PATH_TO_JAR
=
$SERVICE_NAME
"-0.0.1-SNAPSHOT.jar"
LOG_PATH
=
/opt/logs/100003173/
cd
`
dirname
$0
`
/..
source
bin/common.sh stop
\ No newline at end of file
apollo-portal/src/main/scripts/startup.sh
View file @
2c47121b
...
...
@@ -3,5 +3,5 @@ SERVICE_NAME=apollo-portal
PATH_TO_JAR
=
$SERVICE_NAME
"-0.0.1-SNAPSHOT.jar"
LOG_PATH
=
/opt/logs/100003173/
cd
`
dirname
$0
`
/..
source
bin/common.sh start
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