Skip to content
Snippets Groups Projects
  • Nico's avatar
    1c3c1782
    allow enabling BROKEN images · 1c3c1782
    Nico authored
    People asked for the Raspberry Pi 4, but it's currently broken and hence
    is not build if one doesn't set BROKEN. Thus, allow us to set BROKEN for
    some targets to allow these images to be built.
    1c3c1782
    History
    allow enabling BROKEN images
    Nico authored
    People asked for the Raspberry Pi 4, but it's currently broken and hence
    is not build if one doesn't set BROKEN. Thus, allow us to set BROKEN for
    some targets to allow these images to be built.
.gitlab-ci.yml 4.05 KiB
image: registry.gitlab.freifunk-stuttgart.de/firmware/ffs-buildenv:master

variables:
  GIT_SUBMODULE_STRATEGY: normal
  DOCKER_DRIVER: overlay2

stages:
  - generate_date
  - update
  - build
  - package

generate_date:
  stage: generate_date
  script: 
    - date '+%Y-%m-%d' > build.date
  artifacts:
    paths:
      - build.date
    expire_in: 1 day
  except:
    - tags

update:
  stage: update
  script:
    - make -C gluon update GLUON_SITEDIR="$CI_PROJECT_DIR" FFS_BUILD_DATE=$(cat build.date)
  artifacts:
    paths:
      - gluon/
    expire_in: 1 day
  except:
    - tags

.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
    - rm -rf gluon/openwrt/staging_dir && mkdir -p staging_dir && ln -s ../../staging_dir gluon/openwrt/staging_dir
  script:
    - make -C gluon GLUON_SITEDIR="$CI_PROJECT_DIR" GLUON_TARGET="$GLUON_TARGET" GLUON_BRANCH=stable FFS_BUILD_DATE=$(cat build.date) BROKEN="$BROKEN" V=1 -j`nproc`
    - cd gluon/openwrt/dl && git add . && git commit -m "update DL cache" && git push || true
  except:
    - tags
  artifacts: 
    paths:
      - gluon/output/
    expire_in: 1 day
  cache:
    paths:
      - ffs-openwrt-dl-cache
      - staging_dir
    key: "build-$CI_COMMIT_REF_SLUG"
 
target:ar71xx-generic:
  extends: .target
  variables:
    GLUON_TARGET: ar71xx-generic
 
target:ar71xx-tiny:
  extends: .target