The VERSION variable is still missing in downstream jobs even though the
documentation states it could be added like that. Add the VERSION to the
trigger job and also quote it, to avoid possible YAML parsing issues.
Adding a *depend* to the triggered job makes the CI report the
downstream success state instead of instantly marking the upstream job
as success. Meaning, if a downstream SDK or IB job fails, the upstream
job is marked as failed.
Signed-off-by: Paul Spooren <mail@aparcar.org>
Neither pipeline nor global variables are passed to downstream jobs, add
them individually per job even if it is always the same version.
Signed-off-by: Paul Spooren <mail@aparcar.org>
GitLab calls dynamically created jobs "downstream". They don't seem to
inherit any env variables from the main CI job, therefore add the
VERSION variable specifically.
Signed-off-by: Paul Spooren <mail@aparcar.org>
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>
For the rootfs containers it can be of interest to run a root container
based on used architecture. Say a CI builds a specific architecture and
a container should run the specific packages. Instead of maintaining the
mapping upstream this should happen via container tags.
Signed-off-by: Paul Spooren <mail@aparcar.org>
Currently some deploy job fails because of hub.docker.com issues, just
retry the deploy job in such cases.
Signed-off-by: Paul Spooren <mail@aparcar.org>
The script tried to tag Docker images with targets like
`target/subtarget` while `/` can't be used in tag names.
Use `tr` to replace `/` with `-`.
Error message in CI:
```
Error parsing reference: "openwrtorg/sdk:cns3xxx/generic-master" is not
a valid repository/tag: invalid reference format
```
Signed-off-by: Paul Spooren <mail@aparcar.org>
The `dumpinfo.pl` script is now part of upstream openwrt.git but was
renamed to `dump-target-info.pl` to have a more verbose name.
Reflect that in the `gen_targets.sh` scripts.
Signed-off-by: Paul Spooren <mail@aparcar.org>
Instead of having a hard coded list of available targets, this approach
makes use os the dumpinfo.pl script that automatically finds available
targets existing in the OpenWrt buildroot. The advantage is to
automatically adapt to available targets in different branches.
Additionally the tagging of SDK containers is improved. While it is
still possible to use SDK based on target tag, it is now also possible
to chose the target based on architecutre. This way less SDK container
are build as one architecutre covers multiple targets.
Signed-off-by: Paul Spooren <mail@aparcar.org>
The underscore is now used to determine the target, it was only updated
for the ImageBuilders but not SDKs. This commit fixed the deploy step
for SDKs.
Signed-off-by: Paul Spooren <mail@aparcar.org>
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>
That check is currently failing due to different x86 image generation
code refactoring which changed naming of resulting images so they're now
different in master squashfs-combined Vs combined-squashfs in 19.07.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
That check is currently failing due to x86 image generation code
refactoring which changed naming of resulting images.
ls: cannot access './bin/targets/x86/64/*combined-squashfs.img.gz': No such file or directory
Fixes#48
Signed-off-by: Petr Štetiar <ynezz@true.cz>
This was added to packages.git CI before[0].
Use -c instead of --check as alpine does not support to longer version.
[0]: eb5a9990ed
Signed-off-by: Paul Spooren <mail@aparcar.org>
This was removed during debugging and accidently forgotten to readd. It
fails to pass if no Docker credentials are given, which would be always
the case except on openwrtorg/master. In the future a test docker hub
account should be used instead of disabling it.
Fixes: 475f2f1a97
Signed-off-by: Paul Spooren <mail@aparcar.org>
to make shellcheck happy we can no longer use glob, so now the script
use find to get the actual filename.
Signed-off-by: Paul Spooren <mail@aparcar.org>
previously multiple targets were combined in a single job so failing
targets should not stop others from being deployed. However as there are
now single builds per target this is no longer required.
Signed-off-by: Paul Spooren <mail@aparcar.org>
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>