Commit ff7d7856 authored by Nico's avatar Nico

Add OpenWRT download cache

Some server hosting firmware binaries crashed[1] and no mirrors are
available in OpenWRT build system. This causes builds to fail for some
architectures.

To avoid these kinds of failures in the future, add a Git repository
where build jobs will commit their downloaded artifacts. Subsequent
build jobs will check out this repository and use it as their download
directory.

[1] https://github.com/openwrt/openwrt/pull/3573#issuecomment-723530425
parent 884417e2
Pipeline #676 passed with stages
in 401 minutes and 18 seconds
......@@ -30,8 +30,20 @@ update:
.target:
stage: build
before_script:
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s)
- ssh-add <(echo "$GIT_SSH_PRIV_KEY")
- git config --global user.email "firmware@freifunk-stuttgart.de"
- git config --global user.name "FFS Buildbot"
- mkdir -p ~/.ssh
- cat gitlab-known-hosts >> ~/.ssh/known_hosts
- test -d ffs-openwrt-dl-cache || git clone ssh://git@gitlab.freifunk-stuttgart.de:22220/firmware/ffs-openwrt-dl-cache.git
- git -C ffs-openwrt-dl-cache pull
- rm -rf gluon/openwrt/dl && mkdir -p gluon/openwrt && ln -s ../../ffs-openwrt-dl-cache gluon/openwrt/dl
script:
- make -C gluon GLUON_SITEDIR="$CI_PROJECT_DIR" GLUON_TARGET="$GLUON_TARGET" GLUON_BRANCH=stable FFS_BUILD_DATE=$(cat build.date) V=1 -j`nproc`
- cd gluon/openwrt/dl && git add . && git commit -m "update DL cache" && git push || true
except:
- tags
artifacts:
......@@ -40,7 +52,7 @@ update:
expire_in: 1 day
cache:
paths:
- gluon/openwrt/dl
- ffs-openwrt-dl-cache
- gluon/openwrt/staging_dir
key: "build-$CI_COMMIT_REF_SLUG"
......
[gitlab.freifunk-stuttgart.de]:22220 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGNCe5DNM3hGY+oEy5JeGjCDg68YrpjFivgxIAuFvhJkRdPPQpnOURuXFt/wQ0PCF/MZHVLPKwSLEfI3pkQRAg2bLyXFnLMlaaC2Q+9eZoQ6K2+NFWlKiVd3EmYGMt2USFfgFiHKeA4NNhvqtINj5pk1usFRCuUYfAegIVQl+vIvW7rpdK68Y33MGPrP81XD0E7TpasQnqnxVIaTe+QG3oNlPCToE6e8sZij3lwKGmR0gopbvUjXjuY7SCIbzEwzNET+olVfVHWMlDwuzM8tUOSbOSg6mX+I1gTJXndxdGl/dSsI9HXAe1HAa3B7zN+SDwcz+ySxsAgS8loyJMT2SD
[gitlab.freifunk-stuttgart.de]:22220 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBJPXKTRXP1BULVuiWD92F3VdNDLkNV3B7Dv7hb9/PVsCVZnH+s6lsdqYZZL/7QvzyqB/eOlXRs5PE/opGkS84Qw=
[gitlab.freifunk-stuttgart.de]:22220 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKCt1kYnQIF17lAw7kRBAZOJFOS67ZQpBPsq79srBpwu
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment