diff --git a/.github/workflows/build-apps.yml b/.github/workflows/build-apps.yml index 62fb3db..049ad75 100644 --- a/.github/workflows/build-apps.yml +++ b/.github/workflows/build-apps.yml @@ -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 diff --git a/.github/workflows/upload-zip.sh b/.github/workflows/upload-zip.sh index c2092a5..4a8a251 100644 --- a/.github/workflows/upload-zip.sh +++ b/.github/workflows/upload-zip.sh @@ -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 @@ -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 diff --git a/recipes/defacing/build.py b/recipes/defacing/build.py index 9004bba..a7a7209 100644 --- a/recipes/defacing/build.py +++ b/recipes/defacing/build.py @@ -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')