Cache the important things

This commit is contained in:
sfigato 2021-02-21 15:35:10 +01:00
parent 33aeead2e8
commit 8a10cde794
Signed by: blallo
GPG Key ID: 0CBE577C9B72DC3F

View File

@ -17,18 +17,30 @@ steps:
user: root
commands:
- |
if ! [ "$(ls -A /cache_stage/lib)" ]; then
cp -r /var/lib/pacman/. /cache_stage/lib/
if ! [ "$(ls -A /cache_stage/etc)" ]; then
cp -r /etc/. /cache_stage/etc/
fi
- |
if ! [ "$(ls -A /cache_stage/cache)" ]; then
cp -r /var/cache/pacman/. /cache_stage/cache/
if ! [ "$(ls -A /cache_stage/opt)" ]; then
cp -r /opt/. /cache_stage/opt/
fi
- |
if ! [ "$(ls -A /cache_stage/var)" ]; then
cp -r /var/. /cache_stage/var/
fi
- |
if ! [ "$(ls -A /usr_stage/usr)" ]; then
cp -r /usr/. /usr_stage/usr/
fi
volumes:
- name: lib_electron-ozone
path: /cache_stage/lib
- name: cache_electron-ozone
path: /cache_stage/cache
- name: etc_electron-ozone
path: /cache_stage/etc
- name: opt_electron-ozone
path: /cache_stage/opt
- name: var_electron-ozone
path: /cache_stage/var
- name: usr_electron-ozone
path: /cache_stage/usr
- name: build_electron-ozone
pull: if-not-exists
@ -38,21 +50,31 @@ steps:
volumes:
- name: build_electron-ozone
path: /build
- name: lib_electron-ozone
path: /var/lib/pacman2
- name: cache_electron-ozone
path: /var/cache/pacman2
- name: etc_electron-ozone
path: /etc
- name: opt_electron-ozone
path: /opt
- name: var_electron-ozone
path: /var
- name: usr_electron-ozone
path: /usr
volumes:
- name: build_electron-ozone
host:
path: /var/builds/archlinux/electron-ozone
- name: lib_electron-ozone
- name: etc_electron-ozone
host:
path: /var/builds/archlinux/lib/electron-ozone
- name: cache_electron-ozone
path: /var/builds/archlinux/etc/electron-ozone
- name: opt_electron-ozone
host:
path: /var/builds/archlinux/cache/electron-ozone
path: /var/builds/archlinux/opt/electron-ozone
- name: var_electron-ozone
host:
path: /var/builds/archlinux/var/electron-ozone
- name: usr_electron-ozone
host:
path: /var/builds/archlinux/usr/electron-ozone
trigger:
branch:
@ -113,43 +135,64 @@ steps:
user: root
commands:
- |
if ! [ "$(ls -A /cache_stage/lib)" ]; then
cp -r /var/lib/pacman/. /cache_stage/lib/
if ! [ "$(ls -A /cache_stage/etc)" ]; then
cp -r /etc/. /cache_stage/etc/
fi
- |
if ! [ "$(ls -A /cache_stage/cache)" ]; then
cp -r /var/cache/pacman/. /cache_stage/cache/
if ! [ "$(ls -A /cache_stage/opt)" ]; then
cp -r /opt/. /cache_stage/opt/
fi
- |
if ! [ "$(ls -A /cache_stage/var)" ]; then
cp -r /var/. /cache_stage/var/
fi
- |
if ! [ "$(ls -A /usr_stage/usr)" ]; then
cp -r /usr/. /usr_stage/usr/
fi
volumes:
- name: lib_discord_arch_electron
path: /cache_stage/lib
- name: cache_discord_arch_electron
path: /cache_stage/cache
- name: etc_discord_arch_electron
path: /cache_stage/etc
- name: opt_discord_arch_electron
path: /cache_stage/opt
- name: var_discord_arch_electron
path: /cache_stage/var
- name: usr_discord_arch_electron
path: /cache_stage/usr
- name: build_discord_arch_electron
pull: if-not-exists
image: leophys/pikaur:0.2
commands:
- /usr/bin/pikaur -Sy --noconfirm asar
- /usr/bin/pikaur -Sy --noconfirm discord_arch_electron
volumes:
- name: build_discord_arch_electron
path: /build
- name: lib_discord_arch_electron
path: /var/lib/pacman
- name: cache_discord_arch_electron
path: /var/cache/pacman
- name: etc_discord_arch_electron
path: /etc
- name: opt_discord_arch_electron
path: /opt
- name: var_discord_arch_electron
path: /var
- name: usr_discord_arch_electron
path: /usr
volumes:
- name: build_discord_arch_electron
host:
path: /var/builds/archlinux/discord_arch_electron
- name: lib_discord_arch_electron
- name: etc_discord_arch_electron
host:
path: /var/builds/archlinux/lib/discord_arch_electron
- name: cache_discord_arch_electron
path: /var/builds/archlinux/etc/discord_arch_electron
- name: opt_discord_arch_electron
host:
path: /var/builds/archlinux/cache/discord_arch_electron
path: /var/builds/archlinux/opt/discord_arch_electron
- name: var_discord_arch_electron
host:
path: /var/builds/archlinux/var/discord_arch_electron
- name: usr_discord_arch_electron
host:
path: /var/builds/archlinux/usr/discord_arch_electron
trigger:
branch:
@ -227,6 +270,6 @@ depends_on:
---
kind: signature
hmac: 4fd591f5fbba4c84b073b89cd48c621fc07275f31892b2753fa1abc07da4402e
hmac: fa8c819a984d73e7a3956dec51566aa26b0fae4c67c24f4d0cdbd048f477d8fa
...