Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

update rsync [merge] #1908

Merged
merged 2 commits into from

3 participants

@bdecoste
Collaborator

No description provided.

@openshift-bot
Collaborator

Evaluated for origin up to 775ea4e

@openshift-bot
Collaborator

[Test]ing while waiting on the merge queue

@openshift-bot
Collaborator

Evaluated for online up to 150dbc7

@danmcp
Owner

Will be in devenv_3039

@danmcp danmcp merged commit 87fe1ac into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 4, 2013
  1. @bdecoste

    update rsync

    bdecoste authored
  2. @bdecoste

    hot_deploy

    bdecoste authored
This page is out of date. Refresh to see the latest.
View
4 cartridges/openshift-origin-cartridge-abstract/abstract-jboss/info/bin/deploy.sh
@@ -14,7 +14,9 @@ CART_NAME=$(get_cartridge_name_from_path)
if [ ! -h ${OPENSHIFT_REPO_DIR}/deployments ] && [ ! -h ${OPENSHIFT_HOMEDIR}/${CART_NAME}/${CART_NAME}/standalone/deployments ]
then
if [ "$(ls ${OPENSHIFT_REPO_DIR}/deployments)" ]; then
- rsync -r --delete --exclude ".*" ${OPENSHIFT_REPO_DIR}/deployments/* ${OPENSHIFT_HOMEDIR}/${CART_NAME}/${CART_NAME}/standalone/deployments
+ rsync -r --delete --exclude ".*" ${OPENSHIFT_REPO_DIR}/deployments/ ${OPENSHIFT_HOMEDIR}/${CART_NAME}/${CART_NAME}/standalone/deployments/
+ else
+ rm -rf ${OPENSHIFT_HOMEDIR}/${CART_NAME}/${CART_NAME}/standalone/deployments/*
fi
fi
View
7 cartridges/openshift-origin-cartridge-jbossas-7/info/bin/build.sh
@@ -96,9 +96,10 @@ then
if [ ! -h ${OPENSHIFT_REPO_DIR}/deployments ] && [ ! -h ${OPENSHIFT_HOMEDIR}/${CART_NAME}/${CART_NAME}/standalone/deployments ]
then
if [ "$(ls ${OPENSHIFT_REPO_DIR}/deployments)" ]; then
- rsync -r --delete --exclude ".*" ${OPENSHIFT_REPO_DIR}/deployments/* ${OPENSHIFT_HOMEDIR}/${CART_NAME}/${CART_NAME}/standalone/deployments
- fi
- fi
+ rsync -r --delete --exclude ".*" ${OPENSHIFT_REPO_DIR}/deployments/ ${OPENSHIFT_HOMEDIR}/${CART_NAME}/${CART_NAME}/standalone/deployments/
+ else
+ rm -rf ${OPENSHIFT_HOMEDIR}/${CART_NAME}/${CART_NAME}/standalone/deployments/*
+ fi
fi
else
export OPENSHIFT_MAVEN_MIRROR
View
6 cartridges/openshift-origin-cartridge-jbosseap-6.0/info/bin/build.sh
@@ -96,8 +96,10 @@ then
if [ ! -h ${OPENSHIFT_REPO_DIR}/deployments ] && [ ! -h ${OPENSHIFT_HOMEDIR}/${CART_NAME}/${CART_NAME}/standalone/deployments ]
then
if [ "$(ls ${OPENSHIFT_REPO_DIR}/deployments)" ]; then
- rsync -r --delete --exclude ".*" ${OPENSHIFT_REPO_DIR}/deployments/* ${OPENSHIFT_HOMEDIR}/${CART_NAME}/${CART_NAME}/standalone/deployments
- fi
+ rsync -r --delete --exclude ".*" ${OPENSHIFT_REPO_DIR}/deployments/ ${OPENSHIFT_HOMEDIR}/${CART_NAME}/${CART_NAME}/standalone/deployments/
+ else
+ rm -rf ${OPENSHIFT_HOMEDIR}/${CART_NAME}/${CART_NAME}/standalone/deployments/*
+ fi
fi
fi
else
View
28 cartridges/openshift-origin-cartridge-jbosseap/bin/control
@@ -178,8 +178,10 @@ function deploy() {
CART_NAME=redhat-${cartridge_type}
if [ "$(ls ${OPENSHIFT_REPO_DIR}/deployments)" ]; then
- rsync -r --delete --exclude ".*" ${OPENSHIFT_REPO_DIR}/deployments/* ${OPENSHIFT_HOMEDIR}/${CART_NAME}/standalone/deployments
- fi
+ rsync -r --delete --exclude ".*" ${OPENSHIFT_REPO_DIR}/deployments/ ${OPENSHIFT_HOMEDIR}/${CART_NAME}/standalone/deployments/
+ else
+ rm -rf ${OPENSHIFT_HOMEDIR}/${CART_NAME}/${CART_NAME}/standalone/deployments/*
+ fi
}
function start() {
@@ -217,15 +219,19 @@ function stop() {
if isrunning
then
- if [ -f "$JBOSSEAP_PID_FILE" ]; then
- source ${OPENSHIFT_REPO_DIR}/.openshift/action_hooks/pre_stop_${cartridge_type}
- pid=$(cat $JBOSSEAP_PID_FILE);
- echo "Sending SIGTERM to jboss:$pid ..." 1>&2
- killtree $pid
- source ${OPENSHIFT_REPO_DIR}/.openshift/action_hooks/post_stop_${cartridge_type}
- else
- echo "Failed to locate JBOSS PID File" 1>&2
- fi
+ if hot_deploy_marker_is_present ; then
+ echo "Hot deploy enabled. Not stopping"
+ else
+ if [ -f "$JBOSSEAP_PID_FILE" ]; then
+ source ${OPENSHIFT_REPO_DIR}/.openshift/action_hooks/pre_stop_${cartridge_type}
+ pid=$(cat $JBOSSEAP_PID_FILE);
+ echo "Sending SIGTERM to jboss:$pid ..." 1>&2
+ killtree $pid
+ source ${OPENSHIFT_REPO_DIR}/.openshift/action_hooks/post_stop_${cartridge_type}
+ else
+ echo "Failed to locate JBOSS PID File" 1>&2
+ fi
+ fi
fi
}
Something went wrong with that request. Please try again.