Clean "deploy" folder

I understand the deploy folder is common to all builds.
How can I clean the deploy?
I get the error message: "file already exists at… "
Is there a way to remove builds?

1 Like

It’s not shared between builds, the deploy folder is only created / used during the build. After the build finishes the whole environment is destroyed (see: Code security - Bitrise Docs ), no file is kept between builds.

This is more likely related to the Gradle Runner step, although without more log it’s hard to say, but it looks like this: File already exists error

If you have any questions, just let us know!

Happy Building! :slight_smile:

Ok, Thank you for the information.
I have created both include and exclude filters for apk files but it doesn’t work for me.
I want to exclude all apk files under directory “apk” and include all other apk files.
The include filter is "*.apk"
I tried various exclude filters without sucess.
How to define the exclude filter?
Here is a piece from the log (Is there a way to send log?)

find “.” “-name” ".apk" “!” “-name” "/apk/*.apk"
copy ./apk/logdog_0.5.4.20140923.apk to /bitrise/deploy/logdog_0.5.4.20140923.apk
copy ./apk/logdog_2.0.1.20160526_67/dog-client-android-release.apk to /bitrise/deploy/dog-client-android-release.apk
copy ./apk/logdog_0.5.3.20140907.apk to /bitrise/deploy/logdog_0.5.3.20140907.apk
copy ./apk/logdog_0.6.3.20141210/logdog_0.6.3.20141210.apk to /bitrise/deploy/logdog_0.6.3.20141210.apk
copy ./apk/logdog_0.5.2.20140901.apk to /bitrise/deploy/logdog_0.5.2.20140901.apk
e[33;1m 1 attempt failed:e[0m
file already exists at: /bitrise/deploy/dog-client-android-release.apk
e[33;1m Retrying…e[0m
copy ./apk/logdog_2.0.2.20160526_68/dog-client-android-release.apk to /bitrise/deploy/dog-client-android-release20170130125653.apk
copy ./apk/logdog_2.0.6.20160613_72/dog-client-release.apk to /bitrise/deploy/dog-client-release.apk
e[33;1m 1 attempt failed:e[0m

Are you sure? Based on the log you attached it seems that your include filter is “.apk” and not “*.apk”, as well as you have an exclude filter which most likely never will exclude any APK, as it’s an absolute path pattern (if the path starts with / that’s an absolute path, for relative paths you should use ./)

Somehow the leading asterik is missing, but now I understand better the problem.
I have one directory named “apk” I want to ignore.
The apk I’m interested on is located under build/output/apk
Since bitwise is using
find “.” -name "*.apk"
it is filtering only by file name pattern.
Is here a way to ignore directory or define the directory path?
Thanks, Nava.

1 Like

Sure, see File already exists error - #2 by viktorbenei for example

Or tweak/set the Gradle Runner step’s APK file include filter input. The default value is *.apk, to copy all generated APKs into the deploy directory, but you can change this to e.g. */app-knee-generic-development-debug.apk (based on your log) to only copy the app-knee-generic-development-debug.apk to the deploy directory.

Thank you.
Finally I was able to resolve the problem by moving to Gradle Runner version 1.5.4
Another question:
Is there a way to controll the images archived at Bitwise?
I’m sure there is a limit to the memory size…

Thanks, Nava.

What do you mean by the images?

If you’re interested in the CPU and RAM of the Linux/Android machines, the current ones are 2 CPU and 7.5GB RAM, but soon we’ll have a beefier config as an option too.

Maybe I’m missing here something…
All build results are available for download.
Can I control old builds? Make the artifacts non available?

Thanks ,Nava.

Yes, once a file is deployed with Deploy to Bitrise.io it will be available on the build’s page, but won’t be available for other builds, it’s not a shared storage.

Not yet, feel free to create a #feature-requests !

You can of course control what to deploy, simply don’t move the file into the $BITRISE_DEPLOY_DIR or remove it from there before the Deploy to Bitrise.io step to not to deploy it. But once the file is deployed, it will be available on the build’s page.