Commit Graph

19 Commits (53846dccff7eb3fef993398b6d4523b2e953e58d)

Author SHA1 Message Date
Paul Spooren baf01edb31 refactor build scripts
* add a functions.sh file containing functions used by all three
  container types, ImageBuilder, SDK and rootfs.
* allow SDK branch tags for other branches than `master`. This allows
  testing of release SDK versions
* Fix handling of special snapshot versions like `21.02-SNAPSHOT`

Future commits will move `docker-download.sh` and `docker-build.sh` do
`functions.sh`.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-02-23 19:53:22 -10:00
Paul Spooren 62692615da Use wget for file downloads
By changing the FILE_HOST variable it is possible to switch to different
hosts like the CDN. Overall it makes the script easier to use for other
project which don't offer the full rsync server setup.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-02-12 11:40:00 -10:00
Paul Spooren bc917bfb33 add OpenWrt branch as tag
this simplifies the CI testing

Signed-off-by: Paul Spooren <mail@aparcar.org>
2020-12-28 10:29:44 -10:00
Paul Spooren c3b582b50e version fixup
BRANCH was missing in the generate_targets.sh script.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2020-09-10 21:04:49 -10:00
Paul Spooren 962d0fb6c0 replace BRANCH with VERSION
The generate_targets.sh script requires to run on a specific branch to
only generate jobs for existing targets. The BRANCH variable was however
used for VERSION rather than the branch running on.

This changes the behaviour by automatically selecting the correct branch
and only taking the new VERSION env variable into account.

By doing so new Docker container tags include `snapshot` rather than
`master`, however for compatibility with existing setups the `master`
tag is still added.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2020-09-11 08:06:37 +02:00
Paul Spooren 570ecf2da5 Fix targets containing underscores
Signed-off-by: Paul Spooren <mail@aparcar.org>
2020-07-01 11:37:41 -10:00
Paul Spooren 368c530d00 testing
Signed-off-by: Paul Spooren <mail@aparcar.org>
2020-07-01 09:36:25 -10:00
Petr Štetiar e76c77d806 ci: refactor IB/SDK targets for DRY
We've already target specified in the CI job name, so just use this
value for TARGET variable instead of duplicating the same value.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2020-06-30 14:12:03 -10:00
Paul Spooren 475f2f1a97 fixup prebuild deploy container
define USIGNHOME and GNUPGHOME to store the keys

Signed-off-by: Paul Spooren <mail@aparcar.org>
2019-11-06 18:16:03 -10:00
Petr Štetiar 964f42b5c4 fix warnings reported by shellcheck and remove pythonisms
In ./docker-download.sh:
 SC2086: Double quote to prevent globbing and word splitting.
 SC2086: Double quote to prevent globbing and word splitting.
 SC2086: Double quote to prevent globbing and word splitting.

In ./gen-targets.sh:
 SC2188: This redirection doesn't have a command. Move to its command (or use 'true' as no-op).
 SC2027: The surrounding quotes actually unquote this. Remove or escape them.
 SC2086: Double quote to prevent globbing and word splitting.
 SC2188: This redirection doesn't have a command. Move to its command (or use 'true' as no-op).
 SC2027: The surrounding quotes actually unquote this. Remove or escape them.
 SC2086: Double quote to prevent globbing and word splitting.
 SC2027: The surrounding quotes actually unquote this. Remove or escape them.
 SC2086: Double quote to prevent globbing and word splitting.

In ./docker-imagebuilder.sh:
 SC2155: Declare and assign separately to avoid masking return values.
 SC2086: Double quote to prevent globbing and word splitting.
 SC2155: Declare and assign separately to avoid masking return values.
 SC2086: Double quote to prevent globbing and word splitting.
 SC2105: continue is only valid in loops.

In ./docker-rootfs.sh:
 SC2039: In POSIX sh, == in place of = is undefined.
 SC2155: Declare and assign separately to avoid masking return values.
 SC2086: Double quote to prevent globbing and word splitting.
 SC2155: Declare and assign separately to avoid masking return values.
 SC2086: Double quote to prevent globbing and word splitting.
 SC2105: continue is only valid in loops.

In ./docker-sdk.sh line:
 SC2155: Declare and assign separately to avoid masking return values.
 SC2086: Double quote to prevent globbing and word splitting.
 SC2155: Declare and assign separately to avoid masking return values.
 SC2086: Double quote to prevent globbing and word splitting.
 SC2105: continue is only valid in loops.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2019-10-11 11:00:08 -10:00
Paul Spooren 2db99b240b introduce gen-targets.sh script
This improves readability as it auto generates the target list.
2019-10-02 20:46:24 -10:00
Paul Spooren 133f2ad712 split TARGETS in stacks of 10
ImageBuilder/SDKs are build for each target + master & 19.07-snapshot
branch. This is to much for most CI runners, this separates the job and
also allows running it in parrallel if more workers are available.

Also add PGP key for 19.07 release builds.

Introduce $CI_COMMIT_REF_SLUG for testing.

Introduce $SKIP_ROOTFS for older builds not supporting docker images.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2019-09-19 11:11:36 -10:00
Paul Spooren 3e6f6e89c9 CI: add gitlab-ci.yml config file
Eventually this CI could move to GitLab, so start with some testing.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2019-08-08 02:15:20 +02:00
Paul Spooren 35cefd1f4f refactor: unify sdk and imagebuilder
both setups are similar enough to be unified.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2019-08-03 00:37:32 +02:00
Paul Spooren cdf2ada5e3 refactor to common/download/upload scripts
docker-download.sh - Downloads FILE_DOWNLOAD from FILE_HOST and verifies

docker-upload.sh - Uploads the created docker images to docker.io

Signed-off-by: Paul Spooren <mail@aparcar.org>
2019-08-01 09:11:32 +02:00
Paul Spooren 9915cb29b9 fixup: remove braces on wildcard file names
This was done to make shellcheck happy, however resulted in broken
images.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2019-07-13 10:59:25 +02:00
Paul Spooren 29e08aee3d Apply shellcheck recommendations
Just for good style.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2019-07-10 14:14:20 +02:00
Paul Spooren 86cd759cf0 Tag docker images with latest if x86-64/master
This way one can run openwrtorg/rootfs instead of
openwrtorg/rootfs:x86-64. This makes sense as it's the most common use
case.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2019-07-10 14:01:49 +02:00
Paul Spooren bcff431098 init
Initial push to use openwrtorg. Generatres rootfs, sdk and imagebuilder
for now.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2019-07-09 14:42:14 +02:00