meta: improve ci
This commit is contained in:
parent
e5bbaf68f6
commit
8a8d68e43d
1 changed files with 12 additions and 52 deletions
|
@ -2,62 +2,28 @@ workflow:
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_BRANCH == "master"
|
- if: $CI_COMMIT_BRANCH == "master"
|
||||||
|
|
||||||
stages:
|
|
||||||
- fetch
|
|
||||||
- build
|
|
||||||
- upload
|
|
||||||
|
|
||||||
default:
|
|
||||||
image: alpine:edge
|
|
||||||
cache:
|
|
||||||
key: repodest
|
|
||||||
paths: [repodest/]
|
|
||||||
before_script:
|
|
||||||
# setup ssh
|
|
||||||
- apk upgrade -a
|
|
||||||
- apk add openssh-keygen
|
|
||||||
- mkdir $HOME/.ssh
|
|
||||||
- chmod 600 $PRIVATE_KEY
|
|
||||||
- echo "repo.ptrc.gay ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGTcxqAgqWGqVDH5lscsXVp6eWxFblarg+YA1EPxjUvm" > $HOME/.ssh/known_hosts
|
|
||||||
- echo "IdentityFile $PRIVATE_KEY" > $HOME/.ssh/config
|
|
||||||
# setup abuild
|
|
||||||
- confdir=/home/buildozer/.abuild
|
|
||||||
- keyname=alpine@ptrcnull.me-60610fa4.rsa
|
|
||||||
- mkdir -p $confdir
|
|
||||||
- cp $PACKAGER_PRIVKEY $confdir/$keyname
|
|
||||||
- chown 600 $confdir/$keyname
|
|
||||||
- echo "PACKAGER_PRIVKEY=$confdir/$keyname" > $confdir/abuild.conf
|
|
||||||
- ssh-keygen -e -m pkcs8 -f $confdir/$keyname > $confdir/$keyname.pub
|
|
||||||
# add our own key to trusted keys
|
|
||||||
- cp ptrcports-keys/*.pub /etc/apk/keys/
|
|
||||||
- chown -R 1000:1000 /home/buildozer
|
|
||||||
- mkdir -p repodest
|
|
||||||
|
|
||||||
fetch:
|
|
||||||
stage: fetch
|
|
||||||
script:
|
|
||||||
- apk add openssh-client rsync
|
|
||||||
- rsync --archive --update --hard-links --delete --delete-after --delay-updates buildozer@repo.ptrc.gay:repodest/ repodest/
|
|
||||||
|
|
||||||
build-x86_64: &build
|
build-x86_64: &build
|
||||||
|
image: registry.git.ptrc.gay/ptrcnull/ptrcports-builder/x86_64:latest
|
||||||
stage: build
|
stage: build
|
||||||
resource_group: build
|
|
||||||
script:
|
script:
|
||||||
- apk add lua-aports alpine-sdk s6
|
- setup-ssh-key "$PRIVATE_KEY"
|
||||||
- adduser -D buildozer
|
- setup-abuild-key "$PACKAGER_PRIVKEY" "alpine@ptrcnull.me-60610fa4.rsa"
|
||||||
- adduser buildozer abuild
|
- mkdir -p repodest
|
||||||
- chown -R buildozer:buildozer *
|
- rsync --archive --update --hard-links --delete --delete-after --delay-updates
|
||||||
- s6-setuidgid buildozer
|
buildozer@repo.ptrc.gay:repodest/
|
||||||
env HOME=/home/buildozer
|
repodest/
|
||||||
buildrepo
|
- buildrepo
|
||||||
--aports $PWD/..
|
--aports $PWD/..
|
||||||
--destdir $PWD/repodest
|
--destdir $PWD/repodest
|
||||||
--purge
|
--purge
|
||||||
ptrcports
|
ptrcports
|
||||||
|
- rsync --archive --update --hard-links --delete --delete-after --delay-updates
|
||||||
|
repodest/
|
||||||
|
buildozer@repo.ptrc.gay:repodest/
|
||||||
|
|
||||||
build-aarch64:
|
build-aarch64:
|
||||||
<<: *build
|
<<: *build
|
||||||
image: arm64v8/alpine:edge
|
image: registry.git.ptrc.gay/ptrcnull/ptrcports-builder/arm64v8:latest
|
||||||
|
|
||||||
# build-armhf:
|
# build-armhf:
|
||||||
# <<: *build
|
# <<: *build
|
||||||
|
@ -82,9 +48,3 @@ build-aarch64:
|
||||||
# build-x86:
|
# build-x86:
|
||||||
# <<: *build
|
# <<: *build
|
||||||
# image: i386/alpine:edge
|
# image: i386/alpine:edge
|
||||||
|
|
||||||
upload:
|
|
||||||
stage: upload
|
|
||||||
script:
|
|
||||||
- apk add openssh-client rsync
|
|
||||||
- rsync --archive --update --hard-links --delete --delete-after --delay-updates repodest/ buildozer@repo.ptrc.gay:repodest/
|
|
||||||
|
|
Loading…
Reference in a new issue