Git Product home page Git Product logo

docker-lineage-cicd's Introduction

docker-lineage-cicd

Docker microservice for LineageOS Continuous Integration and Continous Deployment

Why

Because I always believe that even advanced technologies should be available to everyone. This is a tentative to offer everyone the possibility to build its own images of LineageOS, when it wants, how it wants. You don't have to wait anymore for build bots. No more scene drama. Just build and enjoy your favourite Android ROM.

Why Docker?

Because I'm a big fan of isolating everything if possible. I don't want to reinstall my OS or triage with dirty packages, just because today I need somethng, and tomorrow I'll need something else.

Requirements

  • At least Dual Core CPU ( Higher is better )
  • At least 6GB RAM ( Higher is better )
  • At least 200GB HDD Space ( Higher is better )

Android propretary binaries

By default when you build Android from scratch you need to pull the Binaries of your interested device via ADB. Although via Docker this is not possible to do so ( would imply having all the devices connected to that machine and ideally know how to switch from one to the other before pulling ).

In order to enable the CICD pipeline to work, I highly suggest to make use of this manifest (https://github.com/TheMuppets/manifests) and save it inside your mapped /srv/local_manifests folder, by doing for example:

$ curl -o https://raw.githubusercontent.com/TheMuppets/manifests/cm-14.1/muppets.xml /srv/local_manifests/muppets.xml

How it works

This docker will autobuild any device list given for a specified branch every midnight at 02:00 UTC. In the end, any built ZIP will be moved to the relative volume mapped directory to /srv/zips.

IMPORTANT: Remember to use VOLUME mapping. By default Docker creates containers with max 10GB of Space. If you will not map volumes, the container will just break during Source syncronization!

Configuration

You can configure the Docker by passing custom environment variables to it. See the Dockerfile for more details.

How to use

Simple mode

build cm14.1 LineageOS for hammerhead with default settings

docker run \
    --restart=always \
    -d \
    -e "USER_NAME=John Doe" \
    -e "[email protected]" \
    -e "DEVICE_LIST=hammerhead" \
    -v "/home/user/ccache:/srv/ccache" \
    -v "/home/user/source:/srv/src" \
    -v "/home/user/zips:/srv/zips" \
    julianxhokaxhiu/docker-lineage-cicd

Advanced mode

build cm-13.0 LineageOS for hammerhead and bullhead

docker run \
    --restart=always \
    -d \
    -e "USER_NAME=John Doe" \
    -e "[email protected]" \
    -e "BRANCH_NAME=cm-13.0" \
    -e "DEVICE_LIST=hammerhead,bullhead" \
    -v "/home/user/ccache:/srv/ccache" \
    -v "/home/user/source:/srv/src" \
    -v "/home/user/zips:/srv/zips" \
    julianxhokaxhiu/docker-lineage-cicd

Expert mode

build cm-14.1 LineageOS for a device that doesn't exist inside the main project, but comes from a special manifest ( has to be created inside /home/user/local_manifests/ ). Finally provide a custom OTA URL for this ROM so users can update using built-in OTA Updater.

docker run \
    --restart=always \
    -d \
    -e "USER_NAME=John Doe" \
    -e "[email protected]" \
    -e "BRANCH_NAME=cm-14.1" \
    -e "DEVICE_LIST=n80xx" \
    -e "OTA_URL=http://cool.domain/api" \
    -v "/home/user/ccache:/srv/ccache" \
    -v "/home/user/source:/srv/src" \
    -v "/home/user/zips:/srv/zips" \
    -v "/home/user/local_manifests:/srv/local_manifests" \
    julianxhokaxhiu/docker-lineage-cicd

NOTE: /home/user/local_manifests/ may contain multiple XMLs, since all the files will be then copied inside .repo/local_manifests/

docker-lineage-cicd's People

Contributors

julianxhokaxhiu avatar lucafavatella avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

docker-lineage-cicd's Issues

Failure in copying local manifests

At

cp $LMANIFEST_DIR/*.xml $SRC_DIR/.repo/local_manifests/ >&$DEBUG_LOG

code assumes that folder $SRC_DIR/.repo/local_manifests/ exists though it appears not to be the case.

Who is meant to create such folder? The repo tool? The builds.sh script?
Maybe the build.sh script makes wrong assumption on the repo tool?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.