Commit Graph

62 Commits (copilot/fix-182)

Author SHA1 Message Date
copilot-swe-agent[bot] c98099194d Fix circular dependency in workflow file_host usage
Co-authored-by: aparcar <16000931+aparcar@users.noreply.github.com>
2025-08-23 15:44:08 +00:00
Paul Spooren 67bc46afd4 ci: s/UPSTREAM_URL/FILE_HOST and use mirror-03 as upstream provider
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>
2025-08-13 15:32:38 +02:00
dependabot[bot] 47d0e61953 build(deps): Bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-13 10:03:10 +02:00
Petr Štetiar 1c462828c0 ci: fix pushing of ImageBuilder containers
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>
2025-04-05 04:20:22 +00:00
Petr Štetiar cda8065dc5
ci: add smoke testing of SDK and IB containers
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>
2025-04-03 19:21:03 +00:00
Petr Štetiar e8012cce6a
ci: fix rootfs container smoke test during push
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>
2025-04-03 06:18:19 +00:00
Petr Štetiar b74469c8e2
ci: fix rootfs container push
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>
2025-04-03 05:21:53 +00:00
Petr Štetiar 79999f3c7e
Dockerfile: fix rootfs container generation
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>
2025-04-03 05:02:09 +00:00
Paul Spooren 22cde2e838 chore(cleanup): remove outdated schedule steps
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>
2025-01-09 10:26:59 +01:00
Paul Spooren 342193af45 ci: add missing run_setup output
Signed-off-by: Paul Spooren <mail@aparcar.org>
2024-12-04 11:57:04 +01:00
Paul Spooren 9b55784b18 BREAKING: use setup.sh instead of Dockerfile
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>
2024-11-05 12:48:08 +01:00
Paul Spooren 7d14bdaa7a ci: don't cache docker builds
Signed-off-by: Paul Spooren <mail@aparcar.org>
2024-08-06 15:17:07 +02:00
Paul Spooren 26cae77722 ci: prune after building
Without the cleanup the system is full after a single day...

Signed-off-by: Paul Spooren <mail@aparcar.org>
2024-07-31 18:41:00 +02:00
Paul Spooren 3724e26fa1 ci: only use apt during testing
Real container pushing happens on a device where QEMU is already
installed.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2024-07-31 00:37:06 +02:00
Paul Spooren d629f7ea1a ci: run on docker-builder
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>
2024-07-31 00:17:21 +02:00
Moeta Yuko 66519f65d1 ci: use whole word matching for TARGET_FILTER
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
2024-07-25 12:43:08 +02:00
dependabot[bot] 974d1ad86d build(deps): Bump docker/build-push-action from 5 to 6
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5 to 6.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-18 14:06:03 +02:00
Paul Spooren 27f2feaf3d ci: add run-name
This should make things prettier

Signed-off-by: Paul Spooren <mail@aparcar.org>
2024-06-17 11:27:07 +02:00
Paul Spooren 4f24894b84 ci: allow to set file_host and prefix
This is nice for creating APK based containers.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2024-06-12 16:46:55 +02:00
Paul Spooren 017ab6488d Support new zstd compressed archives
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>
2024-04-15 09:29:37 +02:00
dependabot[bot] cc0afc9373 build(deps): Bump docker/build-push-action from 3 to 5
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3 to 5.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v3...v5)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-12 20:15:55 +01:00
dependabot[bot] 48f2e09e43 build(deps): Bump docker/login-action from 2 to 3
Bumps [docker/login-action](https://github.com/docker/login-action) from 2 to 3.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-12 20:15:40 +01:00
dependabot[bot] 4113c96684 build(deps): Bump docker/metadata-action from 4 to 5
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 4 to 5.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Upgrade guide](https://github.com/docker/metadata-action/blob/master/UPGRADE.md)
- [Commits](https://github.com/docker/metadata-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-12 20:15:23 +01:00
dependabot[bot] 744d52c208 build(deps): Bump docker/setup-buildx-action from 2 to 3
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2 to 3.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-12 20:15:03 +01:00
Paul Spooren 02638e0c36 ci: use mirror-03 as file host
The old mirror is no longer updated, please don't use it.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2024-02-12 15:24:13 +01:00
Paul Spooren d4d19c0757 disable schedule
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>
2024-02-05 10:45:05 +01:00
Paul Spooren 28c68d4266 ci: update actions/checkout to v4
To remove Node version warnings

Signed-off-by: Paul Spooren <mail@aparcar.org>
2024-02-05 10:42:03 +01:00
Paul Spooren e46a6fb4cb fix TARGET_FILTER corner case for SDKs
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>
2023-09-30 03:42:08 +02:00
Paul Spooren 9681edad58 use mirror-01 as filehost
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>
2023-09-30 03:09:08 +02:00
Paul Spooren 5464f28b6a don't fail on empty rootfs matrix
Some targets don't create a rootfs. Don't fail in those cases.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2023-09-29 23:23:30 +02:00
Jeffery To da8723d08f CI: Change 21.02 builds from weekly to monthly
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2023-06-29 20:37:33 +02:00
Jeffery To b0deb277e1 CI: Change 22.03 builds to Tuesdays
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>
2023-06-29 20:37:33 +02:00
Jeffery To 03647585b6 CI: Add daily builds for 23.05
Fixes: https://github.com/openwrt/docker/issues/115
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2023-06-29 20:37:33 +02:00
Jeffery To 770d98ef91 CI: Fix typos
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2023-06-29 20:37:33 +02:00
Jeffery To ee6571892e CI: Skip GitHub registry login for imagebuilder/rootfs for pull requests
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2023-06-29 20:37:33 +02:00
Jeffery To bf3ae2c308 CI: Add "latest" tag for x86_64 snapshot sdk
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2023-06-29 20:37:33 +02:00
Jeffery To 01e5cfccd7 CI: Add target/arch tags (no suffix) for snapshot images
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2023-06-29 20:37:33 +02:00
Jeffery To ecd0a15ae0 Rename "master" to "main"
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>
2023-06-29 20:37:33 +02:00
Paul Spooren b3af84bc5e CI: skip push step on PRs
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>
2023-06-21 09:39:10 +02:00
Paul Spooren 0a2b84ab1e CI: format job matrix with jq
To increase readability during debugging.

Signed-off-by: Paul Spooren <paul.spooren@rhebo.com>
2023-06-21 09:39:10 +02:00
Paul Spooren f7a587c98f CI: use case instead of if to support armsr
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>
2023-06-21 09:39:10 +02:00
Brénainn Woodsend e61e5180a0 Fix multiarch rootfs containers being mislabelled as AMD64.
* 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.
2023-05-25 13:38:08 +02:00
Paul Spooren 696b2a5d3d ci: add missing wildcard to case
This should fix manual branch building.

Note to myself, always add tests to CI.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2023-04-24 08:52:18 +02:00
Paul Spooren 3f8662f697 ci: fix copy paste typo
Signed-off-by: Paul Spooren <mail@aparcar.org>
2023-04-23 14:13:20 +02:00
Paul Spooren 0fb5e4b22a ci: fix two typose resulting in snapshot fallback
VERSION_PATH would stay empty due to typo

Signed-off-by: Paul Spooren <mail@aparcar.org>
2023-04-22 20:46:01 +02:00
Paul Spooren 362524ca6d ci: move Dockerfile.unify to Dockerfile
Signed-off-by: Paul Spooren <mail@aparcar.org>
2023-04-21 00:15:52 +02:00
Paul Spooren 12858b8ed1 ci: add more tags
Signed-off-by: Paul Spooren <mail@aparcar.org>
2023-04-20 22:31:43 +02:00
Paul Spooren 0e9759bde7 ci: enable pull_request trigger for testing
Signed-off-by: Paul Spooren <mail@aparcar.org>
2023-04-20 15:44:52 +02:00
Paul Spooren 6161674e1e ci: fix TARGET_FILTER quotes
Signed-off-by: Paul Spooren <paul.spooren@rhebo.com>
2023-04-19 15:13:42 +02:00
Paul Spooren 5e4e954daa ci: s/enabled/enable/ typo
Signed-off-by: Paul Spooren <paul.spooren@rhebo.com>
2023-04-19 12:02:13 +02:00