2021-05-19 09:48:07 +02:00
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: default
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: build
|
2021-08-14 09:30:13 +02:00
|
|
|
pull: always
|
2021-06-04 07:44:48 +02:00
|
|
|
image: archlinux:base-devel
|
2021-05-19 09:48:07 +02:00
|
|
|
volumes:
|
|
|
|
- name: repo
|
|
|
|
path: /repo
|
|
|
|
commands:
|
2022-06-11 14:53:44 +02:00
|
|
|
- cp -f conf/{makepkg,pacman}.conf /etc/
|
2022-06-14 07:29:15 +02:00
|
|
|
- cat conf/pacman-conf.d-noextract.conf >> /etc/pacman.conf
|
2021-05-19 17:52:27 +02:00
|
|
|
- sed -i 's/# REPOSITORIES/[nyyu]\nServer = https:\\/\\/archlinux.nyyu.dev\\/nyyu\nSigLevel = Never/' /etc/pacman.conf
|
|
|
|
- sed -i 's/#PACKAGER=".*"/PACKAGER="nyyu <mail@nyyu.dev>"/' /etc/makepkg.conf
|
2022-06-11 14:53:44 +02:00
|
|
|
- pacman -Syu git jq pacman-contrib pandoc-bin --noconfirm
|
2021-05-19 11:26:24 +02:00
|
|
|
- useradd build -m
|
|
|
|
- "echo 'build ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers"
|
|
|
|
- chown -R build:build .
|
2021-08-20 07:09:29 +02:00
|
|
|
- sudo -u build --preserve-env=PGP_KEY,PGP_PWD,PGP_ID sh -c 'mkdir ~/.gnupg && echo -e "default-cache-ttl 3600\nallow-preset-passphrase" > ~/.gnupg/gpg-agent.conf && echo "$PGP_KEY" | gpg --import --no-tty --batch --yes && echo "$PGP_PWD" | /usr/lib/gnupg/gpg-preset-passphrase --preset $PGP_ID'
|
2022-06-25 11:23:01 +02:00
|
|
|
- sudo -u build --preserve-env=DRONE_GIT_HTTP_URL,DRONE_SOURCE_BRANCH,GIT_PASSWORD sh -c './build.sh'
|
2021-05-19 16:29:42 +02:00
|
|
|
environment:
|
|
|
|
PGP_KEY:
|
|
|
|
from_secret: PGP_KEY
|
2021-05-19 16:41:48 +02:00
|
|
|
PGP_PWD:
|
|
|
|
from_secret: PGP_PWD
|
|
|
|
PGP_ID:
|
|
|
|
from_secret: PGP_ID
|
2022-06-25 11:23:01 +02:00
|
|
|
GIT_PASSWORD:
|
|
|
|
from_secret: git_password
|
2021-05-19 09:48:07 +02:00
|
|
|
volumes:
|
|
|
|
- name: repo
|
|
|
|
host:
|
|
|
|
path: /mnt/archlinux/nyyu
|
2022-01-06 16:00:58 +01:00
|
|
|
|
|
|
|
trigger:
|
|
|
|
branch:
|
|
|
|
- master
|