sto cercando di impostare Continuous Integration (CI) in Bitbucket Pipelines per Android.Android CI utilizzando Bitbucket Condotte e Docker
ho creato un'attività bianco campione utilizzando Android Studio 2.1.1.
con i gasdotti che sto utilizzando la finestra mobile contenitore uber/android-build-environment che crea l'ambiente piacevolmente. Ecco sono necessari i miei bitbucket-pipelines.yml
image: uber/android-build-environment:latest
pipelines:
default:
- step:
script:
- echo y | android update sdk --filter "extra-android-m2repository" --no-ui -a # Grab the Android Support Repo which isn't included in the container
- ./gradlew assembleDebug
Alcune modifiche dal uber/android-build-environment si aspetta di essere eseguito in questo modo:
docker run -i -v $PWD:/project -t uber/android-build-environment /bin/bash /project/ci/build.sh
Ad esempio, l'origine non viene copiato il volume /project
ma invece copie Oleodotti il contenuto del repo Bitbucket nella directory di lavoro del contenitore a:
/opt/atlassian/bitbucketci/agent/build
E quando ./gradlew assembleDebug
è corro ottengo il seguente errore:
...
FAILURE: Build failed with an exception.
* What went wrong:
Could not create service of type TaskArtifactStateCacheAccess using TaskExecutionServices.createCacheAccess().
> Failed to create parent directory '/opt/atlassian/bitbucketci/agent/build/.gradle' when creating directory '/opt/atlassian/bitbucketci/agent/build/.gradle/2.10/taskArtifacts'
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 56.449 secs
Esecuzione ls -al
nella directory di lavoro dà:
ls -al
total 52
drwxr-xr-x 5 root root 4096 May 31 22:33 .
drwxr-xr-x 3 root root 4096 May 31 22:43 ..
drwxr-xr-x 3 root root 4096 May 31 22:33 app
-rw-r--r-- 1 root root 462 May 31 22:33 bitbucket-pipelines.yml
-rw-r--r-- 1 root root 498 May 31 22:33 build.gradle
drwxr-xr-x 8 root root 4096 May 31 22:33 .git
-rw-r--r-- 1 root root 387 May 31 22:33 .gitignore
drwxr-xr-x 3 root root 4096 May 31 22:33 gradle
-rw-r--r-- 1 root root 855 May 31 22:33 gradle.properties
-rwxr-xr-x 1 root root 4971 May 31 22:33 gradlew
-rw-r--r-- 1 root root 2314 May 31 22:33 gradlew.bat
-rw-r--r-- 1 root root 15 May 31 22:33 settings.gradle
non ho trovato altra alternativa che utilizzare il 'uber/android-build-ambiente: latest' immagine Docker per costruire e projet Android Gradle-based utilizzando bitbucket Condotte. Ci sono altri modi per farlo? Hai risolto il tuo problema? – metch
Sfortunatamente non ancora. Questo sembra essere un problema con Pipelines e non con il contenitore di build. –
@RyanR Sono nuovo all'integrazione CI che ha problemi con l'installazione di sviluppo di Android quindi, se possibile, puoi aiutarmi con l'impostazione di CI con pipeline Bitbucket –