Merge pull request #6887 from eclipse/che6mastermerge

Backport missing changes from master to che6
6.19.x
Sergii Kabashniuk 2017-10-21 23:06:33 +03:00 committed by GitHub
commit 6ac0ffdcbd
4 changed files with 21 additions and 2 deletions

View File

@ -233,6 +233,8 @@ che.docker.server_evaluation_strategy=default
# chePort : Che listening port number of workspace master
# wildcardNipDomain : get external address transformed into a nip.io DNS sub-domain
# wildcardXipDomain : get external address transformed into a xip.io DNS sub-domain
# user : name of the current user
# workspacesRoutingSuffix: explicit routing suffix for workspace agents (see property che.workspaces.routing-suffix)
che.docker.server_evaluation_strategy.custom.template=<serverName>.<machineName>.<workspaceId>.<wildcardNipDomain>:<chePort>
# Protocol to use for http access (for example it can be set to https)

View File

@ -237,7 +237,9 @@ public class DefaultHttpJsonRequest implements HttpJsonRequest {
str = CharStreams.toString(reader);
}
final String contentType = conn.getContentType();
if (contentType != null && contentType.startsWith(MediaType.APPLICATION_JSON)) {
if (contentType != null
&& (contentType.startsWith(MediaType.APPLICATION_JSON)
|| contentType.startsWith("application/vnd.api+json"))) {
final ServiceError serviceError =
DtoFactory.getInstance().createDtoFromJson(str, ServiceError.class);
if (serviceError.getMessage() != null) {
@ -266,7 +268,8 @@ public class DefaultHttpJsonRequest implements HttpJsonRequest {
final String contentType = conn.getContentType();
if (responseCode != HttpURLConnection.HTTP_NO_CONTENT
&& contentType != null
&& !contentType.startsWith(MediaType.APPLICATION_JSON)) {
&& !(contentType.startsWith(MediaType.APPLICATION_JSON)
|| contentType.startsWith("application/vnd.api+json"))) {
throw new IOException(conn.getResponseMessage());
}

View File

@ -8,11 +8,19 @@
COMMAND_DIR=$(dirname "$0")
export CHE_EPHEMERAL=${CHE_EPHEMERAL:-false}
"$COMMAND_DIR"/deploy_postgres_only.sh
"$COMMAND_DIR"/wait_until_postgres_is_available.sh
oc create -f "$COMMAND_DIR"/keycloak/
if [ "${CHE_EPHEMERAL}" == "true" ]; then
oc volume dc/keycloak --remove --confirm
oc delete pvc/keycloak-log
oc delete pvc/keycloak-data
fi
IMAGE_KEYCLOACK=${IMAGE_KEYCLOACK:-"jboss/keycloak-openshift:3.3.0.CR2-3"}
oc create -f - <<-EOF

View File

@ -7,11 +7,17 @@
#
COMMAND_DIR=$(dirname "$0")
export CHE_EPHEMERAL=${CHE_EPHEMERAL:-false}
oc create -f "$COMMAND_DIR"/che-init-image-stream.yaml
oc create -f "$COMMAND_DIR"/postgres/
if [ "${CHE_EPHEMERAL}" == "true" ]; then
oc volume dc/postgres --remove --confirm
oc delete pvc/postgres-data
fi
IMAGE_INIT=${IMAGE_INIT:-"eclipse/che-init:nightly"}
oc create -f - <<-EOF