Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Why is build directory (almost always) empty building Android Project?

Aaron Vargas October 4, 2016

I can see that during the setup phase my project is checked out

Cloning into '/opt/atlassian/pipelines/agent/build'...
remote: Counting objects: 2724, done.
remote: Compressing objects: 0% (1/1725)
...
Resolving deltas: 100% (1198/1198), done.
Checking connectivity... done.

But when I 'ls -al' the directory my files don't exist.

Initially, I thought that it Never worked, but then, one time it built and everything was there...

Output at end of script

+ pwd
/opt/atlassian/pipelines/agent/build
+ ls -al
total 8
drwxr-xr-x 2 root root 4096 Oct 4 22:09 [0m[01;34m.[0m
drwxr-xr-x 3 root root 4096 Oct 4 22:09 [01;34m..[0m
+ ./gradlew assembleDebug
bash: ./gradlew: No such file or directory

Full yml

image: uber/android-build-environment:latest

pipelines:
branches:
master:
- step:
script:
- echo y | android update sdk --filter "build-tools-23.0.3" --no-ui -a # get the Android build tools
- echo y | android update sdk --filter "extra-android-m2repository" --no-ui -a # Get the Android Support Repo
- pwd
- ls -al
- ./gradlew assembleDebug

 

3 answers

0 votes
Muhammad Irfan January 27, 2017

@Galya Bogdanova

why this happens ?

Actually, here is my yml script (to build java project):-
# This is a sample build configuration for Gradle.
# Check our guides at https://confluence.atlassian.com/x/VYk8Lw for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: qlik/gradle

pipelines:
default:
- step:
script:

- gradle clean
- gradle test
- gradle ear


and when i run build, it fails, on "gradle clean" comand., previously (almost 2 weeks before it was working perfect, same script) , but not now, I checked the first step (after we run build)
"Build setup", its log does not do any thing, previously it clones, and validate every thing, but now just following logs..

Build setup
+ umask 000+ git clone --branch="master" --depth 50 https://x-token-auth:$REPOSITORY_OAUTH_ACCESS_TOKEN@bitbucket.org/IT_Dev_Team/applicant_portal_pipline.git $BUILD_DIR && git reset --hard ae2cdfaf70caf5d68d17a3e5ac3679909871cf20 && git remote set-url origin https://x-token-auth:{access_token}@bitbucket.org/IT_Dev_Team/applicant_portal_pipline.gitCloning into '/opt/atlassian/pipelines/agent/build'...HEAD is now at ae2cdfa bitbucket-pipelines.yml edited online with Bitbucket+ chmod 777 $BUILD_DIR
"


Will you please help me out ?

0 votes
Aaron Vargas October 6, 2016

@Galya Bogdanova, thanks for confirming this issue! 

0 votes
Galya Bogdanova October 6, 2016

I have the same problem now. It looks like sometimes the files get copied from the project and sometimes they don't.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events