Skip to main content

Drone.io CI setup

Drone.io CI setup

Drone.io is a Continuous Integration for Github and Bitbucket that monitors your code for bugs. It uses GitHub (or some other online service) to fetch repositories and Docker containers to run the build process.
It can be used as a service (free for public projects), or set up on a custom server for free.
On this page it is described how Drone was configured to build OpenWrt project hosted on GitHub.

Steps

Install and start Docker

This step depends on your build machine so it is not going to be covered here. Please refer to official Docker documentation and see how to install Docker on your machine.

Create Github application

Click the link and create a new application. In this example we are using:
Homepage URL: http://tango.drone.openwrt.ninja/ 
Authorization callback URL: http://tango.drone.openwrt.ninja/authorize
There you will get Client ID and Client Secret. You will use that in the next step.

Create Drone config file

On the host create the file /etc/drone/dronerc with the following content:
REMOTE_DRIVER=github
REMOTE_CONFIG=https://github.com?client_id=&client_secret=

DATABASE_DRIVER=sqlite3
DATABASE_CONFIG=/var/lib/drone/drone.sqlite

Create //.drone.yml// file

In this customized version the .drone.yml must be located on the path /var/lib/drone/.drone.yml. This path is now hard-coded. An example .drone.yml is given as follows:
build:
  image: "sartura/drone-openwrt-builder:arch"
  commands:
    - export FORCE_UNSAFE_CONFIGURE=1
    - make defconfig
    - make -j8
Or to build with a customized configuration:
build:
  image: "owrt/drone-openwrt-builder:arch"
  commands:
    - export FORCE_UNSAFE_CONFIGURE=1
    - make defconfig
    - wget 'https://raw.githubusercontent.com/openwrt-ninja/openwrt-configs/master/default-x86.config' -O .config
    - ./scripts/config/conf --alldefconfig Config.in
    - make -j8

Run Drone Docker container

We are hosting prebuilt Drone Docker images in Docker Hub using the owrt id. That said, if you have followed the above instructions and have Docker up and running this should bring up your own Drone instance:
docker run \\
  --volume /var/lib/drone:/var/lib/drone \\
  --volume /var/run/docker.sock:/var/run/docker.sock \\
  --env-file /etc/drone/dronerc \\
  --restart=always \\
  --publish=80:8000 \\
  --detach=true \\
  --name=drone \\
  owrt/drone:v42-static-recipe

Drone customization

Since OpenWrt builds take a while to complete make sure to increase Timeout in Minutes to a maximum value of 900 minutes.

TODOs

Builds for all architectures

At the moment only the defconfig is built. We should change it so every supported architecture is build tested with Drone CI.

Customization of the drone "continuous-integration/drone" string per architecture and donation

In the Drone CI version 0.4.2 shows hardcoded string on GitHub builds ("continuous-integration/drone"). We are going to chage this so it is clearly visisible which drone build what and if it was sucessful.

Package builds

When a pull request is made for a certain package we should build this minimal version of OpenWrt with the package in question and its dependencies. This can be done but additional scripting inside Drone CI system is needed.

Optimization of the build process

Now, on every pull request everything is built from scratch. We should optimize the process so it does not build the entire toolchain every time and that we use a mirror close to the build servers to download all 3rd party sources.

Comments

Popular posts from this blog

sxhkd volume andbrightness config for dwm on void

xbps-install  sxhkd ------------ mkdir .config/sxhkd cd .config/sxhkd nano/vim sxhkdrc -------------------------------- XF86AudioRaiseVolume         amixer -c 1 -- sset Master 2db+ XF86AudioLowerVolume         amixer -c 1 -- sset Master 2db- XF86AudioMute         amixer -c 1 -- sset Master toggle alt + shift + Escape         pkill -USR1 -x sxhkd XF86MonBrightnessUp          xbacklight -inc 20 XF86MonBrightnessDown          xbacklight -dec 20 ------------------------------------------------------------- amixer -c card_no -- sset Interface volume run alsamixer to find card no and interface names xbps-install -S git git clone https://git.suckless.org/dwm xbps-install -S base-devel libX11-devel libXft-devel libXinerama-devel  vim config.mk # FREETYPEINC = ${X11INC}/freetype2 #comment for non-bsd make clean install   cp config.def.h config.h vim config.h xbps-install -S font-symbola #for emoji on statusbar support     void audio config xbps-i

Hidden Wiki

Welcome to The Hidden Wiki New hidden wiki url 2015 http://zqktlwi4fecvo6ri.onion Add it to bookmarks and spread it!!! Editor's picks Bored? Pick a random page from the article index and replace one of these slots with it. The Matrix - Very nice to read. How to Exit the Matrix - Learn how to Protect yourself and your rights, online and off. Verifying PGP signatures - A short and simple how-to guide. In Praise Of Hawala - Anonymous informal value transfer system. Volunteer Here are five different things that you can help us out with. Plunder other hidden service lists for links and place them here! File the SnapBBSIndex links wherever they go. Set external links to HTTPS where available, good certificate, and same content. Care to start recording onionland's history? Check out Onionland's Museum Perform Dead Services Duties. Introduction Points Ahmia.fi - Clearnet search engine for Tor Hidden Services (allows you

download office 2021 and activate

get office from here  https://tb.rg-adguard.net/public.php open powershell as admin (win+x and a ) type cmd  goto insall dir 1.         cd /d %ProgramFiles(x86)%\Microsoft Office\Office16 2.           cd /d %ProgramFiles%\Microsoft Office\Office16 try 1 or 2 depending on installation  install volume license  for /f %x in ('dir /b ..\root\Licenses16\ProPlus2021VL_KMS*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%x" activate using kms cscript ospp.vbs /setprt:1688 cscript ospp.vbs /unpkey:6F7TH >nul cscript ospp.vbs /inpkey:FXYTK-NJJ8C-GB6DW-3DYQT-6F7TH cscript ospp.vbs /sethst:s8.uk.to cscript ospp.vbs /act Automatic script (windefender may block it) ------------------------------------------------------------------------------------------------------------------- @echo off title Activate Microsoft Office 2021 (ALL versions) for FREE - MSGuides.com&cls&echo =====================================================================================&