简体   繁体   English

为Android项目配置gitlab ci

[英]Configuring gitlab ci for Android project

I have a '.gitlab-ci.yml' file in my project root: 我的项目根目录中有一个'.gitlab-ci.yml'文件:

job_build_debug_apk:
  script:
    - ./gradlew assembleRelease
  stage: deploy
tags:
  - android
allow_failure: true

while I push to the master, it will build and is succesed, but I can find any apk file in my project. 当我推送到母版时,它会生成并成功,但是我可以在项目中找到任何apk文件。

This is my log: 这是我的日志:

running with gitlab-ci-multi-runner 1.4.2 (bcc1794)
Using Shell executor...
Running on userMacBook-Pro.local...
Fetching changes...
Removing .gradle/
Removing app/build/
Removing build/
HEAD is now at 3ae32fc back back
From http://gitlab.xxx.com/naiyu/AdminYDT
   3ae32fc..5312eaa  master     -> origin/master
Checking out 5312eaaf as master...
$ ./gradlew assembleRelease
Starting a new Gradle Daemon for this build (subsequent builds will be faster).
Incremental java compilation is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preReleaseBuild UP-TO-DATE
:app:checkReleaseManifest
:app:preDebugBuild UP-TO-DATE
:app:prepareComAndroidSupportAnimatedVectorDrawable2340Library
:app:prepareComAndroidSupportAppcompatV72340Library
:app:prepareComAndroidSupportSupportV42340Library
:app:prepareComAndroidSupportSupportVectorDrawable2340Library
:app:prepareReleaseDependencies
:app:compileReleaseAidl
:app:compileReleaseRenderscript
:app:generateReleaseBuildConfig
:app:mergeReleaseShaders
:app:compileReleaseShaders
:app:generateReleaseAssets
:app:mergeReleaseAssets
:app:generateReleaseResValues
:app:generateReleaseResources
:app:mergeReleaseResources
:app:processReleaseManifest
:app:processReleaseResources
:app:generateReleaseSources
:app:incrementalReleaseJavaCompilationSafeguard
:app:compileReleaseJavaWithJavac
:app:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
:app:compileReleaseNdk UP-TO-DATE
:app:compileReleaseSources
:app:lintVitalRelease
:app:prePackageMarkerForRelease
:app:transformClassesWithDexForRelease
To run dex in process, the Gradle daemon needs a larger heap.
It currently has approximately 910 MB.
For faster builds, increase the maximum heap size for the Gradle daemon to more than 2048 MB.
To do this set org.gradle.jvmargs=-Xmx2048M in the project gradle.properties.
For more information see https://docs.gradle.org/current/userguide/build_environment.html
:app:mergeReleaseJniLibFolders
:app:transformNative_libsWithMergeJniLibsForRelease
:app:processReleaseJavaRes UP-TO-DATE
:app:transformResourcesWithMergeJavaResForRelease
:app:packageRelease
:app:assembleRelease

BUILD SUCCESSFUL

Total time: 32.012 secs
Build succeeded

My runner executor is Shell on my Mac OS. 我的跑步执行者是Mac OS上的Shell

Is there any wrong with my path, or is there has any blog to show this. 我的路径有问题吗,或者有任何博客可以证明这一点。

The Gitlab CI works like that: you push changes to the server and your local runner make a clone (or a pull ) of your latest changes. Gitlab CI的工作原理是: push更改push送到服务器,而本地运行程序会clone (或pull )最新更改。

The sources will be downloaded in a subfolder of the runner, not in your project. 源文件将下载到运行程序的子文件夹中,而不是在您的项目中。 This means that the apk will be in one of these subfolders as well. 这意味着apk也将位于这些子文件夹之一中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM