This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "########## - updating local docker container with local changes - ##########" | |
# PATH_TO_CODE_REPOSITORY : path in local machine to where your code is | |
# DOCKER_CONTAINER_NAME : the container name you want to update | |
PATH_TO_CODE_REPOSITORY='' #COMPLETE THIS | |
DOCKER_CONTAINER_NAME='' #COMPLETE THIS | |
PREFIX_OF_WAR_IN_DOCKER='' #COMPLETE THIS | |
LOCAL_REPOSITORY_WAR_PREFIX='' #COMPLETE THIS | |
cd ~/PATH_TO_CODE_REPOSITORY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# HOW to set: | |
# git config --global --replace-all alias.clist 'config --list' | |
alias.cm=commit -m | |
alias.cb=checkout -b | |
alias.st=status | |
alias.br=branch | |
alias.ms=merge --squash | |
alias.ch=checkout | |
alias.cam=commit -a -m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "########## - updating continaer - ##########" | |
cd ~/sandbox/continaer | |
build_c="$(mvn clean install -DskipTests | grep FAILURE)" | |
if [ "$build_c" ] | |
then | |
echo "########## - Build failed - can not continue - ##########" | |
exit | |
fi | |
echo "########## - after clean install - ##########" | |
docker exec image_name find /opt/tomcat/webapps/ -name 'war_prefix##*SNAPSHOT*' | xargs docker exec image_name rm -rf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java_pid="$(pgrep -f java)" | |
echo "java process id: $java_pid" | |
if [ "$java_pid" ] | |
then | |
mkdir thread_dumps | |
jstack -l $java_pid >> thread_dumps/threaddumps_0.log | |
echo "created a file: threaddumps_0.log" | |
for i in {1..10} | |
do | |
sleep 60s |