All Projects β†’ MohamedGElsharkawy β†’ Android-CICD

MohamedGElsharkawy / Android-CICD

Licence: other
This repo demonstrates how to work on CI/CD for Mobile Apps πŸ“± using Github Actions πŸ’Š + Firebase Distribution πŸŽ‰

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Android-CICD

Cml
♾️ CML - Continuous Machine Learning | CI/CD for ML
Stars: ✭ 2,843 (+7583.78%)
Mutual labels:  continuous-integration, continuous-delivery, ci, ci-cd, cicd, github-actions
qodana-action
βš™οΈ Scan your Java, Kotlin, PHP, Python, JavaScript, TypeScript projects at GitHub with Qodana
Stars: ✭ 112 (+202.7%)
Mutual labels:  static-code-analysis, continuous-integration, ci, actions, github-actions
Nevergreen
🐀 A build monitor with attitude
Stars: ✭ 170 (+359.46%)
Mutual labels:  continuous-integration, continuous-delivery, ci, continuous-deployment, ci-cd
changed-files
Github action to retrieve all (added, copied, modified, deleted, renamed, type changed, unmerged, unknown) files and directories.
Stars: ✭ 733 (+1881.08%)
Mutual labels:  continuous-integration, ci, actions, ci-cd, github-actions
www.go.cd
Github pages repo
Stars: ✭ 39 (+5.41%)
Mutual labels:  continuous-integration, continuous-delivery, ci, continuous-deployment, ci-cd
noise-php
A starter-kit for your PHP project.
Stars: ✭ 52 (+40.54%)
Mutual labels:  continuous-integration, continuous-delivery, sonarqube, sonarcloud, github-actions
ofcourse
A Concourse resource generator
Stars: ✭ 41 (+10.81%)
Mutual labels:  continuous-integration, continuous-delivery, ci, continuous-deployment, cicd
Gocd
Main repository for GoCD - Continuous Delivery server
Stars: ✭ 6,314 (+16964.86%)
Mutual labels:  continuous-integration, continuous-delivery, ci, continuous-deployment, ci-cd
actions
Set of actions for implementing CI/CD with werf and GitHub Actions
Stars: ✭ 67 (+81.08%)
Mutual labels:  continuous-integration, continuous-delivery, actions, ci-cd, github-actions
github-act-runner
act as self-hosted runner
Stars: ✭ 68 (+83.78%)
Mutual labels:  continuous-integration, ci, actions, github-actions
build-plugin-template
Template repository to create new Netlify Build plugins.
Stars: ✭ 26 (-29.73%)
Mutual labels:  continuous-integration, continuous-delivery, ci, continuous-deployment
setup-scheme
Github Actions CI / CD setup for Scheme
Stars: ✭ 13 (-64.86%)
Mutual labels:  continuous-integration, ci, continuous-deployment, github-actions
cloud-s4-sdk-pipeline
The Cloud SDK pipeline uses the Cloud SDK continuous delivery server for building, checking, and deploying extension applications. Projects based on the SAP Cloud SDK archetype will automatically use this pipeline.
Stars: ✭ 65 (+75.68%)
Mutual labels:  continuous-integration, continuous-delivery, continuous-deployment, ci-cd
cloud-s4-sdk-pipeline-docker
The Cloud SDK continuous delivery infrastructure makes heavy use of docker images. This are the docker sources of these images.
Stars: ✭ 13 (-64.86%)
Mutual labels:  continuous-integration, continuous-delivery, continuous-deployment, ci-cd
swarmci
Swarm CI - Docker Swarm-based CI system or enhancement to existing systems.
Stars: ✭ 48 (+29.73%)
Mutual labels:  continuous-integration, continuous-delivery, ci, continuous-deployment
makefiles
No description or website provided.
Stars: ✭ 23 (-37.84%)
Mutual labels:  linting, continuous-integration, ci, linter
flagsmith-nodejs-client
Flagsmith Node JS Client. Flagsmith lets you manage features flags across web, mobile and server side applications. Get builds out faster. Control who has access to new features.
Stars: ✭ 13 (-64.86%)
Mutual labels:  continuous-integration, continuous-delivery, ci, continuous-deployment
xray-action
... a GitHub action to import test results into "Xray" - A complete Test Management tool for Jira.
Stars: ✭ 16 (-56.76%)
Mutual labels:  continuous-integration, ci, actions, github-actions
bump-everywhere
πŸš€ Automate versioning, changelog creation, README updates and GitHub releases using GitHub Actions,npm, docker or bash.
Stars: ✭ 24 (-35.14%)
Mutual labels:  continuous-integration, continuous-delivery, continuous-deployment, github-actions
actions
Our Library of GitHub Actions
Stars: ✭ 49 (+32.43%)
Mutual labels:  actions, ci-cd, cicd, github-actions

Android-CICD

This repo demonstrates how to work on CI/CD for Mobile Apps πŸ“± using Github Actions πŸ’Š + Firebase Distribution πŸŽ‰

Getting Started

We are here setup a continious integration pipelines using Github Actions and a continious delivery using Firebase Distribution ⚑ ⚑

If you want to know a brief definition for the two terms CI/CD πŸ™†β€β™‚οΈ, Checkout out the quotes :

  • Continuous Integration

    Is the practice of merging all developers' working copies to a shared mainline several times a day.

  • Continuous Delivery

    Is a software engineering approach in which teams produce software in short cycles, ensuring that the software can be reliably released at any time and, when releasing the software, without doing so manually.

CI/CD

Workflows

  • πŸš€ pre_check.yaml : This workflow have to check for lint, testing and static code analyzer
  • πŸš€ build.yaml : This workflow have to build and deploy to firebase distribution

Getting Started With CI ⚑

To get start with build CI pipelines, you should use Actions tab or create a new YAML file, then you could setup your workflow, please checkout Metadata syntax for GitHub Actions 🧐

How to create your own workflow

  1. name

Name of your workflow

  1. on

Control when the workflow will be triggerd

  1. jobs

Deterimne one or more jobs / pipelines to run for the workflow, but you have to specifiy some parameters to run the job

  • job_name

Pick up your own job name

  • runs_on

Specify your runner type

  • steps

Represent a squence of tasks will be exceuted for each job / pipeline, each step have a some of parameters

  • uses

One of step parameters, you can use it when your are trying to install enviornment or repository from marketplace

  • run

One of step parameters, you can use it when your are trying to hit a command

CI Sample πŸ₯³

This workflow run as a lint checker for each Pushing on master branch πŸš€

name: Build lint checker report

on:
  push:
    branches: [ master ]

jobs:
  lint:
    runs-on: ubuntu-latest
    steps: 
      - name: Checkout
        uses: actions/checkout@v2

      - name: Setup Java JDK
        uses: actions/setup-java@v1
        with:
          java-version: 1.8

      - name: Build Lint
        run: ./gradlew lintDebug
    
      - name: Upload Build Lint Report
        uses: actions/upload-artifact@v2
        with:
          name: report
          path: app/build/reports/lint-results-debug.html
  • Checkout : This action checks-out your repository under $GITHUB_WORKSPACE, so your workflow can access it.
  • Setup Java JDK
  • Build Lint : Run lint report
  • Upload Build Lint Report : This uploads artifacts from your workflow allowing you to share data between jobs and store data once a workflow is complete.

Getting Started With CD ⚑

To get start with build CD pipelines, you should integrate your app with Firebase Distribution, then you could setup your workflow, please checkout Firebase Distribution for more how to integrate your app with firebase 🧐

Firebase App Distribution makes distributing your apps to trusted testers painless. By getting your apps onto testers' devices quickly, you can get feedback early and often.

CD Sample πŸ₯³

This workflow builds a debug APK, then upload the artifact APK to a workflow dashboard and send another one to testers group on firebase distributions dashboard after each Pull Request on master branch πŸš€

name: Integrate Firebase Distributions + Github Actions

on:
  pull_request_target:
    branches: [ master ]

jobs:
  builds:
    runs-on: ubuntu-latest
    steps: 
      - name: Checkout
        uses: actions/checkout@v2
        
      - name: Setup Java JDK
        uses: actions/setup-java@v1
        with:
         java-version: 1.8
        
      - name: Build Gradle
        run: ./gradlew build
    
      - name: Upload a Build Artifact
        uses: actions/upload-artifact@v2
        with:
          name: app
          path: app/build/outputs/apk/debug/app-debug.apk
          
      - name: Upload Artifact To Firebase App Distribution
        uses: wzieba/[email protected]
        with:
          appId: ${{ secrets.FIREBASE_ID }}
          token: ${{ secrets.FIREBASE_TOKEN }}
          groups: Android-CICD-Testers
          releaseNotes: "Hey! This my first integrate Firebase distributions with Github Actions"
          file: app/build/outputs/apk/debug/app-debug.apk   
  • Build Gradle : Build your APK.
  • Upload Artifact To Firebase App Distribution : This action uploads artifacts (.apk,.aab) to Firebase App Distribution.
  • appId : Get it from your project settings on firebase console.
  • token : Run this command firebase login:ci, for more informations about how to get your firbase token, check out Firebase CLI

Secrets : This path to encrypt your sensitive information, you can access it from Settings/Secrets Tab, for more info checkout out Encrypted Secrets

Screenshot from firebase distribution dashboard after sending the debug_app using Actions workflow

Release

How to integrate your project wih sonarcloud code analysis

Contributing

Don't hesitate to contribute with any updates or improves, just fork this repository, make the change you'd like and then submit a pull request.

Issues

Notice any issues with a repository? Please file a Github Issue in this repository.

License

The MIT License (MIT)

Copyright (c) 2021 MohamedGElsharkawy

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].