Skip to content

Commit

Permalink
dotCMS/core#11196: Adjusted Jenkins scripts releases (7)
Browse files Browse the repository at this point in the history
  • Loading branch information
agomez-dotcms committed May 15, 2017
1 parent a3ca1e3 commit f9644ac
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export AWS_CREDENTIAL_PROFILES_FILE=$JENKINS_HOME/credentials
export AWS_CREDENTIAL_PRIVATE_KEY_FILE=$JENKINS_HOME/dotcms-dev-test-deploy-2017-02-0x5513.pem


cd "$WORKSPACE/repo/dotCMS"
cd "$WORKSPACE/${GIT_BRANCH_NAME}/dotCMS"
./gradlew clean --no-daemon --refresh-dependencies


Expand All @@ -34,16 +34,16 @@ echo $AWS_RDS_INSTANCE_ID > aws-rds-instance-id.txt


# Uncompress tests results
cd "$WORKSPACE/repo/dotCMS/build"
cd "$WORKSPACE/${GIT_BRANCH_NAME}/dotCMS/build"
unzip build-aws-tests.zip

# Print logs to console
cat "$WORKSPACE/repo/dotCMS/build/tests/logs/dotcms.log"
cat "$WORKSPACE/${GIT_BRANCH_NAME}/dotCMS/build/tests/logs/dotcms.log"

# Saving tomcat logs into the build folder
mkdir -p "$WORKSPACE/logs/${BUILD_NUMBER}"
mv "$WORKSPACE/repo/dotCMS/build/tests/logs"/* "$WORKSPACE/logs/${BUILD_NUMBER}/"
rm -r "$WORKSPACE/repo/dotCMS/build/tests/logs/"
mv "$WORKSPACE/${GIT_BRANCH_NAME}/dotCMS/build/tests/logs"/* "$WORKSPACE/logs/${BUILD_NUMBER}/"
rm -r "$WORKSPACE/${GIT_BRANCH_NAME}/dotCMS/build/tests/logs/"

#Removes old logs folders, preserving the first 20 (most recent)
cd "$WORKSPACE/logs/"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ trap 'echo "[$USER@$(hostname) $PWD]\$ $BASH_COMMAND"' DEBUG
export AWS_CREDENTIAL_PROFILES_FILE=$JENKINS_HOME/credentials
export AWS_CREDENTIAL_PRIVATE_KEY_FILE=$JENKINS_HOME/dotcms-dev-test-deploy-2017-02-0x5513.pem

export VERSION='master'
export VERSION='${GIT_BRANCH_NAME}'
export TIMESTAMP=$(date +"%Y%m%d%H%M%S")


# Terminate and delete AWS instance
cd "$WORKSPACE/repo/dotCMS"
cd "$WORKSPACE/${GIT_BRANCH_NAME}/dotCMS"
if [ -f aws-ec2-instance-id.txt ]; then
export AWS_EC2_INSTANCE_ID=$(cat aws-ec2-instance-id.txt)
./gradlew -b build-aws-tests.gradle terminateInstance -PinstanceId=$AWS_EC2_INSTANCE_ID -Pdatabase=$DOT_CMS_DATABASE_TYPE -Pbranch=${GIT_BRANCH#*/} -Pcommit=$GIT_COMMIT -PkeyFile=$AWS_CREDENTIAL_PRIVATE_KEY_FILE --no-daemon
Expand Down

0 comments on commit f9644ac

Please sign in to comment.