diff --git a/.woodpecker/update-package-index.yaml b/.woodpecker/update-package-index.yaml new file mode 100644 index 0000000..cd7d42f --- /dev/null +++ b/.woodpecker/update-package-index.yaml @@ -0,0 +1,43 @@ +when: + - event: [cron] + cron: update-package-index + +skip_clone: true + +matrix: + include: + - PLATFORM: redhat-9 + - PLATFORM: redhat-8 + - PLATFORM: ubuntu-2404 + - PLATFORM: ubuntu-2204 +steps: + - name: Upload PACKAGES files + secrets: [red_hat_dev_pw, aws_access_key_id, aws_secret_access_key, pgpass, git_ro_token, GITHUB_PAT] + image: docker.io/devxygmbh/arm-binaries-r-${PLATFORM} + pull: true + environment: + GIT_USER: pat-s + # set the location of the 'pkgcache' cache dir which persists the R package dependencies needed to install the packages themselves + R_PKG_CACHE_DIR: /mnt/cache/pkgcache + R_LIBS_USER: /mnt/cache/R-pkgs + volumes: + - arm-binaries-r-dep-cache-${PLATFORM}:/mnt/cache + commands: + # download latest package version (avoid having to rebuild image every time) + # rscript_startup arg: required to pass down global option to future workers https://github.com/HenrikBengtsson/future/issues/134#issuecomment-2245666169 + - git clone https://pat-s:$$git_ro_token@git.devxy.io/devxy/arm64-r-binaries.git . + - R -q -e 'devtools::install(); packageVersion("rBinaries")' + - R -q -e 'pak::pak(c("dyfanjones/s3fs", "pat-s/desc@description-from-remote", "pat-s/cranlike@s3"))' + - cd /mnt/cache/packages + - R -q -e 'options(crayon.enabled = TRUE); library(rBinaries); upload_package_index()' + backend_options: + kubernetes: + resources: + requests: + memory: 1000Mi + cpu: 0m + limits: + memory: 1300Mi + cpu: 1000m + nodeSelector: + kubernetes.io/arch: 'arm64'