Skip to content

Commit

Permalink
pipeline(precompile): refine blobstore related error detection
Browse files Browse the repository at this point in the history
We ensure 'error' and 'blobstore' keywords are matched on the same line...
  • Loading branch information
o-orand committed Aug 10, 2023
1 parent 6f043c3 commit cde03a4
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 @@ -533,7 +533,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 "blobstore" exported-release/${RELEASE_NAME}-${RELEASE_VERSION}-${TIMESTAMP}.log |wc -l)
BLOBSTORE_ERROR_COUNT=$(grep -i error|grep -i "blobstore" exported-release/${RELEASE_NAME}-${RELEASE_VERSION}-${TIMESTAMP}.log |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 @@ -346,7 +346,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 "blobstore" exported-release/${RELEASE_NAME}-${RELEASE_VERSION}-${TIMESTAMP}.log |wc -l)
BLOBSTORE_ERROR_COUNT=$(grep -i error|grep -i "blobstore" exported-release/${RELEASE_NAME}-${RELEASE_VERSION}-${TIMESTAMP}.log |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 @@ -476,7 +476,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 "blobstore" exported-release/${RELEASE_NAME}-${RELEASE_VERSION}-${TIMESTAMP}.log |wc -l)
BLOBSTORE_ERROR_COUNT=$(grep -i error|grep -i "blobstore" exported-release/${RELEASE_NAME}-${RELEASE_VERSION}-${TIMESTAMP}.log |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 cde03a4

Please sign in to comment.