pikaur_builder/.drone.yml
Blallo 8204b6eb88
Some checks failed
continuous-integration/drone/push Build is failing
Update paths
2021-02-23 17:33:12 +01:00

464 lines
9.5 KiB
YAML

---
kind: pipeline
type: docker
name: pre_clean
platform:
os: linux
arch: amd64
workspace:
path: /drone
steps:
- name: remove-locks
pull: if-not-exists
image: leophys/pikaur:0.3
user: root
commands:
- rm -f /output/lock
volumes:
- name: output
path: /output
volumes:
- name: output
host:
path: /store/builds/packages/output
---
kind: pipeline
type: docker
name: electron-ozone
platform:
os: linux
arch: amd64
workspace:
path: /drone
steps:
- name: cache-init_electron-ozone
pull: if-not-exists
image: leophys/pikaur:0.3
user: root
commands:
- |
if ! [ "$(ls -A /cache_stage/etc)" ]; then
cp -r /etc/. /cache_stage/etc/
getfacl -p -R /etc > /cache_stage/etc/permissions.acl
fi
- |
if ! [ "$(ls -A /cache_stage/opt)" ]; then
cp -r /opt/. /cache_stage/opt/
getfacl -p -R /opt > /cache_stage/opt/permissions.acl
fi
- |
if ! [ "$(ls -A /cache_stage/var)" ]; then
cp -r /var/. /cache_stage/var/
getfacl -p -R /var > /cache_stage/var/permissions.acl
fi
- |
if ! [ "$(ls -A /cache_stage/usr)" ]; then
cp -r /usr/. /cache_stage/usr/
getfacl -p -R /usr > /cache_stage/usr/permissions.acl
fi
- |
if ! [ "$(ls -A /build2)" ]; then
cp -r /build/. /build2/
getfacl -p -R /usr > /build2/permissions.acl
fi
- chmod a+rw /output
volumes:
- name: build_electron-ozone
path: /build2
- 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: output
path: /output
- name: cache-acl_electron-ozone
pull: if-not-exists
image: leophys/pikaur:0.3
user: root
commands:
- setfacl --restore=/etc/permissions.acl
- setfacl --restore=/opt/permissions.acl
- setfacl --restore=/var/permissions.acl
- setfacl --restore=/usr/permissions.acl
- setfacl --restore=/build/permissions.acl
- chown -R 1000:33 /build
volumes:
- name: build_electron-ozone
path: /build
- name: etc_electron-ozone
path: /etc
- name: opt_electron-ozone
path: /opt
- name: var_electron-ozone
path: /var
- name: usr_electron-ozone
path: /usr
- name: build_electron-ozone
pull: if-not-exists
image: leophys/pikaur:0.3
commands:
- git config --global http.version HTTP/1.1
- |
if [ -f /output/lock ]; then
while [ -f /output/lock ]; do
sleep 10
echo "Waiting $(cat /output/lock)"
done
else
echo "electron-ozone" >> /output/lock
fi
- |
set -euo pipefail
cd /build
/usr/bin/pikaur -G --noconfirm electron-ozone 2>&1|tee /output/electron-ozone.log
/usr/bin/pikaur -Py --keepbuilddeps --noconfirm electron-ozone/PKGBUILD 2>&1|tee /output/electron-ozone.log
- rm -f /output/lock
volumes:
- name: build_electron-ozone
path: /build
- name: etc_electron-ozone
path: /etc
- name: opt_electron-ozone
path: /opt
- name: var_electron-ozone
path: /var
- name: usr_electron-ozone
path: /usr
- name: output
path: /output
volumes:
- name: build_electron-ozone
host:
path: /store/builds/packages/electron-ozone
- name: etc_electron-ozone
host:
path: /store/builds/packages/etc/electron-ozone
- name: opt_electron-ozone
host:
path: /store/builds/packages/opt/electron-ozone
- name: var_electron-ozone
host:
path: /store/builds/packages/var/electron-ozone
- name: usr_electron-ozone
host:
path: /store/builds/packages/usr/electron-ozone
- name: output
host:
path: /store/builds/packages/output
trigger:
branch:
- master
event:
- push
- cron
depends_on:
- pre_clean
---
kind: pipeline
type: docker
name: notify_failure-electron-ozone
clone:
disable: true
steps:
- name: notify_failure
pull: if-not-exists
image: leophys/mailer:0.5-1
environment:
M_SERVER_ADDRESS:
from_secret: m_server_address
M_USER:
from_secret: m_user
M_PASSWORD:
from_secret: m_password
M_FROM:
from_secret: m_from
M_TO:
from_secret: m_to
M_SUB: "[electron-ozone] FAILURE"
commands:
- /sendmail.sh /output/electron-ozone.log
volumes:
- name: output
path: /output
- name: clean_lock
pull: if-not-exists
image: leophys/pikaur:0.3
user: root
commands:
- rm -f /output/lock
volumes:
- name: output
path: /output
volumes:
- name: output
host:
path: /store/builds/packages/output
trigger:
status:
- failure
depends_on:
- electron-ozone
---
kind: pipeline
type: docker
name: discord_arch_electron
platform:
os: linux
arch: amd64
workspace:
path: /drone
steps:
- name: cache-init_discord_arch_electron
pull: if-not-exists
image: leophys/pikaur:0.3
user: root
commands:
- |
if ! [ "$(ls -A /cache_stage/etc)" ]; then
cp -r /etc/. /cache_stage/etc/
getfacl -p -R /etc > /cache_stage/etc/permissions.acl
fi
- |
if ! [ "$(ls -A /cache_stage/opt)" ]; then
cp -r /opt/. /cache_stage/opt/
getfacl -p -R /opt > /cache_stage/opt/permissions.acl
fi
- |
if ! [ "$(ls -A /cache_stage/var)" ]; then
cp -r /var/. /cache_stage/var/
getfacl -p -R /var > /cache_stage/var/permissions.acl
fi
- |
if ! [ "$(ls -A /cache_stage/usr)" ]; then
cp -r /usr/. /cache_stage/usr/
getfacl -p -R /usr > /cache_stage/usr/permissions.acl
fi
- |
if ! [ "$(ls -A /build2)" ]; then
cp -r /build/. /build2/
getfacl -p -R /usr > /build2/permissions.acl
fi
- chmod a+rw /output
volumes:
- name: build_discord_arch_electron
path: /build2
- 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: output
path: /output
- name: cache-acl_discord_arch_electron
pull: if-not-exists
image: leophys/pikaur:0.3
user: root
commands:
- setfacl --restore=/etc/permissions.acl
- setfacl --restore=/opt/permissions.acl
- setfacl --restore=/var/permissions.acl
- setfacl --restore=/usr/permissions.acl
- setfacl --restore=/build/permissions.acl
- chown -R 1000:33 /build
volumes:
- name: build_discord_arch_electron
path: /build
- 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
- name: build_discord_arch_electron
pull: if-not-exists
image: leophys/pikaur:0.3
commands:
- |
if [ -f /output/lock ]; then
while [ -f /output/lock ]; do
sleep 10
echo "Waiting $(cat /output/lock)"
done
else
echo "discord_arch_electron" >> /output/lock
fi
- |
set -euo pipefail
cd /build
/usr/bin/pikaur -G --noconfirm discord_arch_electron 2>&1|tee /output/discord_arch_electron.log
/usr/bin/pikaur -Py --keepbuilddeps --noconfirm discord_arch_electron/PKGBUILD 2>&1|tee /output/discord_arch_electron.log
- rm -f /output/lock
volumes:
- name: build_discord_arch_electron
path: /build
- 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
- name: output
path: /output
volumes:
- name: build_discord_arch_electron
host:
path: /store/builds/packages/discord_arch_electron
- name: etc_discord_arch_electron
host:
path: /store/builds/packages/etc/discord_arch_electron
- name: opt_discord_arch_electron
host:
path: /store/builds/packages/opt/discord_arch_electron
- name: var_discord_arch_electron
host:
path: /store/builds/packages/var/discord_arch_electron
- name: usr_discord_arch_electron
host:
path: /store/builds/packages/usr/discord_arch_electron
- name: output
host:
path: /store/builds/packages/output
trigger:
branch:
- master
event:
- push
- cron
depends_on:
- pre_clean
---
kind: pipeline
type: docker
name: notify_failure-discord_arch_electron
clone:
disable: true
steps:
- name: notify_failure
pull: if-not-exists
image: leophys/mailer:0.5-1
environment:
M_SERVER_ADDRESS:
from_secret: m_server_address
M_USER:
from_secret: m_user
M_PASSWORD:
from_secret: m_password
M_FROM:
from_secret: m_from
M_TO:
from_secret: m_to
M_SUB: "[discord_arch_electron] FAILURE"
commands:
- /sendmail.sh /output/discord_arch_electron.log
volumes:
- name: output
path: /output
- name: clean_lock
pull: if-not-exists
image: leophys/pikaur:0.3
user: root
commands:
- rm -f /output/lock
volumes:
- name: output
path: /output
volumes:
- name: output
host:
path: /store/builds/packages/output
trigger:
status:
- failure
depends_on:
- discord_arch_electron
---
kind: pipeline
type: docker
name: notify_success
clone:
disable: true
steps:
- name: notify_success
pull: if-not-exists
image: leophys/mailer:0.5-1
environment:
M_SERVER_ADDRESS:
from_secret: m_server_address
M_USER:
from_secret: m_user
M_PASSWORD:
from_secret: m_password
M_FROM:
from_secret: m_from
M_TO:
from_secret: m_to
M_SUB: "[archlinux] SUCCESS"
M_TEXT: "Success building archlinux packages"
trigger:
status:
- success
depends_on:
- electron-ozone
- discord_arch_electron
---
kind: signature
hmac: 21737b767443c19d5750c6b95c253624584d09be417f072e4b0717ac1aea1148
...