Triggering Builds automatically on pull requests in AppCenter ( for Android Development ) - android

Build is not trigger for Pull request in appcenter. But build is generated for merge code
**

Related

AppCenter's responsibility

I'm trying to figure out the CI portion that provided by AppCenter. I've implemented CodePush for my app and please correct me if my understanding is wrong.
We build the native android app and generate a signed apk.
Release the generated signed apk to playstore
execute command to upload bundle appcenter codepush release-react -a <owner>/<android-app> -d Production
The above are generally the way I understand CodePush and I've tested and working fine.
Now I've noticed that we can integrate our github project branch to appcenter, and whenever there is a git push, AppCenter will build it automatically and we can configure to release to playstore automatically.
Now the part I don't understand is, is this CI auto build by AppCenter actually nothing to do with CodePush?
If now my situation is only having updates on JS code side, actually when I git-push to repo, there isn't a need to auto-release to playstore right?
Correct, Build and Push are separate services in App Center. Build does the binary build of your app while CodePush simply updates the JavaScript and related code in an Apache Cordova or React Native. They're separate workflows and it seems you want to trigger them separate ways.
If you're using CodePush, you can't also use Build to auto build and deploy the native app to devices, you're duplicating work. I'm not an expert, but you probably want to manually deploy your builds whenever you make changes to the native side of the app (which should be rarely, right?) - like when there's major updates to the native framework or new plugins added to the native app

Adding new Android and iOS apps on Fabric from command line script

I have just automated the process of new targets/flavors creation for my Android and iOS projects. For Android I use a bash script to add new flavor to Android app and then build and sign the app. For iOS I use a script which builds a target and "dynamically" sets all of the necessary parameters and then archives the app end exports to the .ipa file.
I know how to add a new build to the app "project" which already exists on Fabric, but I haven't found any way to upload completely new flavor/target for the first time from command line/script. Is there any way/hack to achieve this?
Mike from Fabric here.
There isn't a hack or workaround for this currently. We need both a build and run from the app in order to activate the app within the Fabric dashboard.

android build server with crashlytics

I have a android build server which uses APKTool to decompile and then assemble apps again. So the same code base is used and some settings and name, package page, icon and other things are changed for each app and are assembled again. This is something that is already implemented.
I wanted to integrate crashlytics into this. But the problem is crashlytics is available as a gradle plugin and they submit to their API when you build it from source. I decompiled the class files and figured out the API call and called it manually. This works fine. But just wanted to see if we can install gradle and whatever tools required on the build server and directly execute the plugin task alone?
For iOS they have provided a tool so that solves it elegantly:
http://support.crashlytics.com/knowledgebase/articles/370383-beta-distribution-with-ios-build-servers

How to trigger jenkins when a git push is attempted to github.com, and allow the push only if the build is successful?

I have an android project. I want to cinfigure jenkins ci for that. So, my expected workflow is like,
Whenever a developer hits git push, the jenkins build should be
triggered with the new changes(code shouldn't be pushed to github).
If the build is successful in jenkins, then the code should be
pushed to the github.com.
Please help me. Even if this cannot be achieved in a single run, a work-around (like multiple jenkins jobs or with some temporary branches) to achieve this will also be helpful.

where to store build artefacts: Grunt, node.js backend, github, android, iOS client

We are struggling to come up with a good idea of how to integrate our build environments, now that we start using swagger-..codegen to generate API classes from our backend api for the android app, iOS app and the webclient.
Current situation:
we use several (private) github repositories
node.js backend: grunt build with tests and CI using cloudbased CI service- running codeGen for web- and android clients api access classes on sucessful builds, continous deployment to heroku test environement,
web Frontend, grunt build with tests and CI using cloudbased CI service and and continous deployment to herku test env.
android app, using gradle build and same CI, no continous deployment so far.
and soon there will be an iOS app as well...
This is private, non-OSS-code.
The requirement:
The different clients should be able to specify a dependency to the generated backend access libraries and get them during the build. The clients should be able to get the "latest" version or a specified fixed version, like with npm semantic dependencies. I could certainly enhance our build to upload the build artefacts to somewhere on successful CI builds, but the question is where to... what is the easiest way to set this up.
do we need one, (or even several) private artefact repositories (nexus, npm, bower, ...)
should we (ab)use github repositories to store the built artefacts in?
we could also publish the build artefacts to S3 or something similar...
any good ideas?
The only things you should really store are your separate "tasks" folders if you are doing some custom tasks, your grunt.js (.coffee), resources (that you may use for pre-build tasks -less,coffee/views, coffee/models all your custom stuff), and your package.json. That way any new developer just grabs those form source, and then runs npm install to pull all your dependencies from your package.json.
/resources
grunt.coffee
package.json
I then have some tasks that pull and run bower tasks (pull latest jqm, set that up, pull various libraries.)
As far as node_modules I wouldn't store those anywhere. This is a simple script / app I wrote that works almost end to end with compiling a JQM app, calling phonegap scripts, building the app and ultimately ending up with an xcode app package.
Maybe this will give you some ideas. So far I have found it best to do the above.
https://github.com/imaginethepoet/autojqm

Categories

Resources