Introduce lock and fix error emission

This commit is contained in:
sfigato 2021-02-22 19:16:46 +01:00
parent 89e2662c18
commit ca68e0dd27
Signed by: blallo
GPG Key ID: 0CBE577C9B72DC3F

View File

@ -74,7 +74,19 @@ steps:
pull: if-not-exists pull: if-not-exists
image: leophys/pikaur:0.2 image: leophys/pikaur:0.2
commands: commands:
- /usr/bin/pikaur -Sy --noconfirm electron-ozone|tee /output/electron-ozone.log - |
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
/usr/bin/pikaur -Sy --noconfirm electron-ozone|tee /output/electron-ozone.log
- rm -f /output/lock
volumes: volumes:
- name: build_electron-ozone - name: build_electron-ozone
path: /build path: /build
@ -142,6 +154,10 @@ steps:
M_SUB: "[electron-ozone] FAILURE" M_SUB: "[electron-ozone] FAILURE"
commands: commands:
- /sendmail.sh /output/electron-ozone.log - /sendmail.sh /output/electron-ozone.log
- rm -f /output/lock
volumes:
- name: output
path: /output
volumes: volumes:
- name: output - name: output
@ -232,7 +248,19 @@ steps:
pull: if-not-exists pull: if-not-exists
image: leophys/pikaur:0.2 image: leophys/pikaur:0.2
commands: commands:
- /usr/bin/pikaur -Sy --noconfirm discord_arch_electron|tee /output/discord_arch_electron.log - |
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
/usr/bin/pikaur -Sy --noconfirm discord_arch_electron|tee /output/discord_arch_electron.log
- rm -f /output/lock
volumes: volumes:
- name: build_discord_arch_electron - name: build_discord_arch_electron
path: /build path: /build
@ -300,6 +328,10 @@ steps:
M_SUB: "[discord_arch_electron] FAILURE" M_SUB: "[discord_arch_electron] FAILURE"
commands: commands:
- /sendmail.sh /output/discord_arch_electron.log - /sendmail.sh /output/discord_arch_electron.log
- rm -f /output/lock
volumes:
- name: output
path: /output
volumes: volumes:
- name: output - name: output