Skip to content

Commit

Permalink
pipeline(precompile): fix blobstore errors detection
Browse files Browse the repository at this point in the history
wrong formatted shell command
  • Loading branch information
o-orand committed Aug 21, 2023
1 parent 12ab70e commit c18a835
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ jobs:
echo "Exporting ${RELEASE_NAME}/${RELEASE_VERSION} - ${STEMCELL_OS}/${STEMCELL_VERSION}"
TIMESTAMP=$(date +'%Y-%m-%d-%H-%M-%S')
if ! bosh export-release "${RELEASE_NAME}/${RELEASE_VERSION}" "${STEMCELL_OS}/${STEMCELL_VERSION}" --dir=exported-release --tty|tee exported-release/${RELEASE_NAME}-${RELEASE_VERSION}-${TIMESTAMP}.log;then
BLOBSTORE_ERROR_COUNT=$(grep -i error|grep -i "blobstore" exported-release/${RELEASE_NAME}-${RELEASE_VERSION}-${TIMESTAMP}.log |wc -l)
BLOBSTORE_ERROR_COUNT=$(grep -i error exported-release/${RELEASE_NAME}-${RELEASE_VERSION}-${TIMESTAMP}.log|grep -i "blobstore"|wc -l)
if [ $BLOBSTORE_ERROR_COUNT -gt 0 ];then
echo "COA - Blobstore error detected, cleaning deployment and release"
bosh delete-deployment --non-interactive
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ jobs:
echo "Exporting ${RELEASE_NAME}/${RELEASE_VERSION} - ${STEMCELL_OS}/${STEMCELL_VERSION}"
TIMESTAMP=$(date +'%Y-%m-%d-%H-%M-%S')
if ! bosh export-release "${RELEASE_NAME}/${RELEASE_VERSION}" "${STEMCELL_OS}/${STEMCELL_VERSION}" --dir=exported-release --tty|tee exported-release/${RELEASE_NAME}-${RELEASE_VERSION}-${TIMESTAMP}.log;then
BLOBSTORE_ERROR_COUNT=$(grep -i error|grep -i "blobstore" exported-release/${RELEASE_NAME}-${RELEASE_VERSION}-${TIMESTAMP}.log |wc -l)
BLOBSTORE_ERROR_COUNT=$(grep -i error exported-release/${RELEASE_NAME}-${RELEASE_VERSION}-${TIMESTAMP}.log|grep -i "blobstore"|wc -l)
if [ $BLOBSTORE_ERROR_COUNT -gt 0 ];then
echo "COA - Blobstore error detected, cleaning deployment and release"
bosh delete-deployment --non-interactive
Expand Down Expand Up @@ -479,7 +479,7 @@ jobs:
echo "Exporting ${RELEASE_NAME}/${RELEASE_VERSION} - ${STEMCELL_OS}/${STEMCELL_VERSION}"
TIMESTAMP=$(date +'%Y-%m-%d-%H-%M-%S')
if ! bosh export-release "${RELEASE_NAME}/${RELEASE_VERSION}" "${STEMCELL_OS}/${STEMCELL_VERSION}" --dir=exported-release --tty|tee exported-release/${RELEASE_NAME}-${RELEASE_VERSION}-${TIMESTAMP}.log;then
BLOBSTORE_ERROR_COUNT=$(grep -i error|grep -i "blobstore" exported-release/${RELEASE_NAME}-${RELEASE_VERSION}-${TIMESTAMP}.log |wc -l)
BLOBSTORE_ERROR_COUNT=$(grep -i error exported-release/${RELEASE_NAME}-${RELEASE_VERSION}-${TIMESTAMP}.log|grep -i "blobstore"|wc -l)
if [ $BLOBSTORE_ERROR_COUNT -gt 0 ];then
echo "COA - Blobstore error detected, cleaning deployment and release"
bosh delete-deployment --non-interactive
Expand Down

0 comments on commit c18a835

Please sign in to comment.