The job is triggered whenever a new target is uploaded. This happens the same
moment the CDN cache is flushed, so it's possible that there is a flaky
situation where the CDN is half way through purging the cache.
Unify the variables for the upstream URL, in Dockerfile it's called FILE_HOST,
in the setup.sh it's called UPSTREAM_URL. Use FILE_HOST everywhere but fallback
to UPSTREAM_URL if defined.
Let's use our own mirror for this.
Signed-off-by: Paul Spooren <mail@aparcar.org>
Eric reported, that he is having problem with
imagebuilder:mediatek-filogic-master. The issue is caused by refactoring
of Build Push stage in commit cda8065dc5 ("ci: add smoke testing of
SDK and IB containers"), where I forget to enable pushing with `push:
true` input as the default is `push: false`.
So lets fix it by explicitly enabling the push input, while at it unify
the Push stage configs.
Fixes: #167
Fixes: cda8065dc5 ("ci: add smoke testing of SDK and IB containers")
Link: https://github.com/openwrt/docker/pull/168
Reported-by: Eric Fahlgren <ericfahlgren@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Currently we happily accept changes, which might break SDK and/or IB
containers. So lets try to minimize the regressions by adding a smoke
test before pushing the container.
References: #164
Link: https://github.com/openwrt/docker/pull/165
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Currently the Smoke test stage fails in the push event pipeline:
Run docker run --platform=linux/mips_24kc sha256:d1700df716390394450d4851555b1904fd245c02e79573f6e97b4c24cdaafc8d uname -m
exec /bin/uname: exec format error
Error: Process completed with exit code 255.
This is not failing in the pull_request pipeline as the QEMU is properly
configured. So lets fix the push event pipeline by configuring the QEMU
in the same way, so the smoke test can pass.
Fixes: 3724e26fa1 ("ci: only use apt during testing")
Link: https://github.com/openwrt/docker/pull/163
Reference: https://github.com/openwrt/docker/actions/runs/14235928616/job/39895103039#step:10:53
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Currently the Push stage fails for rootfs containers:
ERROR: failed to solve: process "/bin/sh -c if [ \"$RUN_SETUP\" -eq 1 ]; then /builder/setup.sh; fi" did not complete successfully: unable to find user root: invalid argument
This is happening as the commit 9999f3c7e58 ("Dockerfile: fix rootfs container generation")
changed the file argument on Build stage, but Push stage was omitted.
So lets fix it now by using working Dockerfile.rootfs.
References: https://github.com/openwrt/docker/actions/runs/14235351624/job/39893588545#step:11:288
Fixes: 79999f3c7e ("Dockerfile: fix rootfs container generation")
Fixes: 9b55784b18 ("BREAKING: use setup.sh instead of Dockerfile")
Link: https://github.com/openwrt/docker/pull/162
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Currently several rootfs containers are failing to build, as the
buildbot user doesn't exists in those FROM:scratch containers:
/usr/bin/docker buildx build (snip) --build-arg USER=root --build-arg BASE_IMAGE=scratch (snip)
...snip...
#2 [1/5] ADD --chown=buildbot:buildbot keys/*.asc /builder/keys/
#2 ERROR: invalid user index: -1
So lets fix it by avoiding need for ownership and simply import the keys
through pipe. Move the gpg key import into setup.sh script as well,
since this is the place where the keys are being used.
Also add a new Dockerfile.rootfs that must be used to generate a rootfs
container as the generic Dockerfile is not able to build the rootfs image.
Fixes: 9b55784b18 ("BREAKING: use setup.sh instead of Dockerfile")
References: https://github.com/openwrt/routing/pull/1107#issuecomment-2768156513
References: https://github.com/openwrt/docker/actions/runs/14165468179/job/39681375639#step:9:243
Link: https://github.com/openwrt/docker/pull/161
Acked-by: Paul Spooren <mail@aparcar.org>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Those are no longer used and commit 9b55784 "BREAKING: use setup.sh
instead of Dockerfile" cleaned them only half way.
Signed-off-by: Paul Spooren <mail@aparcar.org>
Instead of causing infinite amounts of traffic per day, only ship a
preconfigured setup.sh file with SNAPSHOT containers and ask the
downstream user to run `setup.sh` on their own.
Signed-off-by: Paul Spooren <mail@aparcar.org>
Our CI is often heavily overloaded by CI testing jobs, however those
Docker containers shouldn't be delayed by multiple hours. Let's have our
own builder that does nothing but uploading those containers in time.
Signed-off-by: Paul Spooren <mail@aparcar.org>
If the target name is a substring of another (e.g. malta/be and malta/be64),
pushing the current target image will mistakenly override the other one.
Fixes#142
ImageBuilder and SDK compression switched to zstd due to the recent XZ
backdoor event and overall complexity of the XZ design.
Signed-off-by: Paul Spooren <mail@aparcar.org>
An external script is used that polls our buildbot infrastructure and
triggers container builds.
It's only commented out so downstream project could use this as a
reference.
Signed-off-by: Paul Spooren <mail@aparcar.org>
If a TARGET_FILTER is set only imagebuilder/sdk/rootfs for that target
are created. In case of the SDK multiple valid targets are in the same
row printed via `dump-target-info.pl`. With the previous logic the
"first" target is used expecting all targets to be on the same commit.
However when using TARGET_FILTER the specific target should be used for
the SDK, not just one that supports the same architecture.
A logic is added that if TARGET_FILTER is set, it's used as the SDK
target.
Signed-off-by: Paul Spooren <mail@aparcar.org>
Previously the container would use downloads.openwrt.org aka mirror-02
which has a short delay on images. This would break webhooks since they
fire one ready on mirror-01 while not yet fully transferred to mirror-02.
Signed-off-by: Paul Spooren <mail@aparcar.org>
22.03 snapshots appear to be built on weekends, so shifting builds to
Tuesdays should allow the Docker images to package the newest snapshots
more consistently.
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
Continue to accept "master" for manual releases, and add "master"
suffixed tags for main branch images, for backwards compatibility.
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
Add the condition on the step level and not the push action. This way
it's clear nothing got pushed from the CI overview.
Signed-off-by: Paul Spooren <paul.spooren@rhebo.com>
Instead of using a definied list with an if condition, use a case
statement with wildcards to match on either `armsr` or `armvirt`
(legacy). This should keep support for both 23.05.x and newer releases.
Signed-off-by: Paul Spooren <paul.spooren@rhebo.com>
* Set the platforms argument to docker/build-push-action.
* Insert a minimal *is it runable* test in between building and pushing
the rootfs images.
Fixes#112.