Skip to content

Commit

Permalink
fix file filters
Browse files Browse the repository at this point in the history
  • Loading branch information
stebo85 committed Jun 22, 2024
1 parent bd2e600 commit 90d4c53
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ jobs:
- name: Set image variables
id: IMAGEVARS
run: |
DOCKERFILE=`basename $(find ./recipes/$APPLICATION/ -type f -iname "*.zip" | head -1)`
IMAGENAME=$(echo $(basename $DOCKERFILE .zip) | tr '[A-Z]' '[a-z]')
DOCKERFILE=`$(find ./recipes/$APPLICATION/ -type f -iname "*.zip" | head -1)`
echo "DOCKERFILE: $DOCKERFILE"
IMAGENAME=$(echo $(basename $DOCKERFILE .zip))
echo "IMAGENAME: $IMAGENAME"
echo "IMAGENAME_TEST=${IMAGENAME//_/ }" >> $GITHUB_ENV
echo "IMAGENAME=$IMAGENAME" >> $GITHUB_ENV
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/upload-zip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ echo "[DEBUG] recipes/$APPLICATION"
cd recipes/$APPLICATION

IMAGENAME=$1
IMAGE_HOME=/storage/openrecon

echo "[DEBUG] IMAGE_HOME: $IMAGENAME"
echo "[DEBUG] IMAGENAME: $IMAGENAME"

ls -la $IMAGENAME.zip
ls -la $IMAGE_HOME/$IMAGENAME.zip


#This prevents the sometimes stuck apt process from stopping the build
Expand All @@ -19,16 +21,16 @@ if [ -f "/var/lib/apt/lists/lock" ]; then
fi

echo "[DEBUG] Attempting upload to AWS Object Storage ..."
rclone copy --progress ${IMAGENAME}.zip aws-neurocontainers:/openrecon
rclone copy --progress $IMAGE_HOME/${IMAGENAME}.zip aws-neurocontainers:/openrecon

if curl --output /dev/null --silent --head --fail "https://openrecon.neurodeks.org/${IMAGENAME}.zip"; then
echo "[DEBUG] ${IMAGENAME}.simg was freshly build and exists now :)"
echo "[DEBUG] cleaning up ${IMAGENAME}.zip"
rm -rf ${IMAGENAME}.zip
echo "[DEBUG] cleaning up $IMAGE_HOME/${IMAGENAME}.zip"
rm -rf $IMAGE_HOME/${IMAGENAME}.zip
else
echo "[ERROR] ${IMAGENAME}.zip does not exist yet. Something is WRONG"
echo "[ERROR] cleaning up ${IMAGENAME}.zip"
rm -rf ${IMAGENAME}.zip
echo "[ERROR] cleaning up $IMAGE_HOME/${IMAGENAME}.zip"
rm -rf $IMAGE_HOME/${IMAGENAME}.zip
exit 2
fi

6 changes: 3 additions & 3 deletions recipes/defacing/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ def validateJson(jsonFilePath, schemaFilePath):
output = subprocess.check_output([zipExe, 'a', '-tzip', '-mm=Deflate', baseFilename + '.zip', baseFilename + '.tar', baseFilename + '.pdf'], stderr=subprocess.STDOUT)
print('Zip packaging output:\n' + output.decode('utf-8'))

# print('Moving file to archive storage:', baseFilename + '.zip', '...')
# output = subprocess.check_output(['mv', baseFilename + '.zip', '/storage/openrecon/' + baseFilename + '.zip'], stderr=subprocess.STDOUT)
# print('moved file to /storage/openrecon')
print('Moving file to archive storage:', baseFilename + '.zip', '...')
output = subprocess.check_output(['mv', baseFilename + '.zip', '/storage/openrecon/' + baseFilename + '.zip'], stderr=subprocess.STDOUT)
print('moved file to /storage/openrecon')



Expand Down

0 comments on commit 90d4c53

Please sign in to comment.