[OpenWrt-Devel] [RFC] additional Docker images and CI testing

Ted Hess owrt at kitschensync.net
Sun Jun 2 12:31:38 EDT 2019


Hi Paul -

This sounds like a good idea - would giving you commit 
access to our
docker hub [0] repo be of any help? Is there anything else I 
could help with?

I don't know if you saw this posting I made last year about 
a simple
use of our Docker image for test buiilds. Issue #7735 [1]. I 
had pinned it
but for some reason @heil un-pinned it and I left it be.

/ted

[0]: https://hub.docker.com/u/openwrtorg
[1]: https://github.com/openwrt/packages/issues/7735


-----Original Message----- 
From: Paul Spooren
Sent: Saturday, June 01, 2019 10:26 AM
To: openwrt-devel at lists.openwrt.org
Cc: Etienne Champetier ; Ted Hess ; Rosen Penev
Subject: [OpenWrt-Devel] [RFC] additional Docker images and 
CI testing

Hi all,

currently OpenWrt only offers a very basic Docker image[0] 
for testing
of the packages.git repo. The image is not directly usable 
as the CI
does most of the work, like setting up the SDK and adding 
feeds[1]. I'd
like to propose two additional images and added CI test 
examples for
illustration, `openwrt` and `openwrt-sdk`

## openwrt:x86-64

Now that OpenWrt can run within Docker containers[2] (thanks 
@mikma,
@dangowrt and @ynezz) it's possible for local or CI tests:

* Running the image locally:

    docker run --rm -it aparcar/openwrt:x86-64

* Test example via CircleCI

Checks if procd starts basic services[3].

The container image is created via a config.yml similar to 
the one from
packages.git[4].

## openwrt-sdk:x86-64

The OpenWrt SDK in a Docker container, also usable for local 
building or CI:

* Using the SDK locally

    docker run --rm -v ./bin/:/sdk/bin -it 
aparcar/openwrt-sdk:x86-64
    # within the Docker container
    ./scripts/feeds update base
    make defconfig
    ./scripts/feeds install firewall
    make package/firewall/{clean,compile} -j$(nproc)

The compiled output is found in ./bin/

* Test example via CircleCI

Compiles firewall package[5].

The openwrt-sdk container image is also created via CI[6].

All examples are based on this[7] repo and the *interesting* 
branches are:

* openwrt
* openwrt-test
* openwrt-sdk
* openwrt-sdk-test

I'd be happy if OpenWrt offers OS, SDK and ImageBuilder 
container images
in the future. Currently only the x86/64 target is 
supported, however
it'd be easy to support all (popular) targets via tags.

Eventually we could use this to develop test cases for 
OpenWrt specific
tools like netifd, procd, ubus, firewall3, etc...

Best,
Paul

[0]: https://hub.docker.com/r/openwrtorg/packages-cci
[1]:
https://git.openwrt.org/?p=feed/packages.git;a=blob;f=.circleci/config.yml;h=02a87146d91f19638bfbfc1fbc46913256cf358d;hb=refs/heads/master
[2]:
https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=6a92eb5b382860017fd00cd05350a648c4a4ac56
[3]: 
https://circleci.com/gh/aparcar/openwrt-ci-test/53#config/containers/0
[4]: 
https://circleci.com/gh/aparcar/openwrt-ci-test/41#config/containers/0
[5]: 
https://circleci.com/gh/aparcar/openwrt-ci-test/45#config/containers/0
[6]: 
https://circleci.com/gh/aparcar/openwrt-ci-test/46#config/containers/0
[7]: https://github.com/aparcar/openwrt-ci-test



_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel 


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list