Skip to content

Commit

Permalink
Remove only the "-packer.log" after successful build
Browse files Browse the repository at this point in the history
Remove only the "-packer.log" after successful build
  • Loading branch information
ruzickap committed Feb 6, 2020
1 parent 8dd4ad9 commit f20dfed
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ jobs:
echo "*** Using BOX_VERSION=${BOX_VERSION} from file: ${PACKER_CACHE_DIR}/BOX_VERSION"
./upload_box_to_vagrantup.sh ${VAGRANTUP_USER}@${PACKER_IMAGES_OUTPUT_DIR}/${{ matrix.stage }}.box
- name: Log cleanup - ${{ matrix.stage }}
run: rm -v ${LOGDIR}/${{ matrix.stage }}*
- name: Build log cleanup - ${{ matrix.stage }}
run: if [ -s "${LOGDIR}/${{ matrix.stage }}-packer.log" ]; then rm -v "${LOGDIR}/${{ matrix.stage }}-packer.log"; fi

##############
# VirtualBox
Expand Down Expand Up @@ -140,8 +140,8 @@ jobs:
echo "*** Using BOX_VERSION=${BOX_VERSION} from file: ${PACKER_CACHE_DIR}/BOX_VERSION"
./upload_box_to_vagrantup.sh ${VAGRANTUP_USER}@${PACKER_IMAGES_OUTPUT_DIR}/${{ matrix.stage }}.box
- name: Log cleanup - ${{ matrix.stage }}
run: rm -v ${LOGDIR}/${{ matrix.stage }}*
- name: Build log cleanup - ${{ matrix.stage }}
run: if [ -s "${LOGDIR}/${{ matrix.stage }}-packer.log" ]; then rm -v "${LOGDIR}/${{ matrix.stage }}-packer.log"; fi

check-vagrantcloud:
needs: build-virtualbox
Expand Down Expand Up @@ -174,4 +174,5 @@ jobs:
run: |
rm -v "${PACKER_CACHE_DIR}/BOX_VERSION"
rm -v ${PACKER_IMAGES_OUTPUT_DIR}/*.box
rm -v ${LOGDIR}/*
rmdir -v "${PACKER_IMAGES_OUTPUT_DIR}" "${LOGDIR}" "${VAGRANT_TMP}" || true

0 comments on commit f20dfed

Please sign in to comment.