summaryrefslogtreecommitdiff
path: root/jobs
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2018-09-03 08:29:42 +0200
committerKarel Kočí <cynerd@email.cz>2018-09-03 08:29:42 +0200
commit21013e40b8a59e675422fe23df913725f27e5bcf (patch)
treef411fdaaba30a6a0374f76f4232143be9c3396e0 /jobs
parent5a2b5ab33e6aa4a8f13aa8790843079ca3bd5d99 (diff)
downloadlaminar-cnf-21013e40b8a59e675422fe23df913725f27e5bcf.tar.gz
laminar-cnf-21013e40b8a59e675422fe23df913725f27e5bcf.tar.bz2
laminar-cnf-21013e40b8a59e675422fe23df913725f27e5bcf.zip
alpine-amd64: reorder packages repository
Diffstat (limited to 'jobs')
-rwxr-xr-xjobs/alpine-amd64.sh19
1 files changed, 10 insertions, 9 deletions
diff --git a/jobs/alpine-amd64.sh b/jobs/alpine-amd64.sh
index a529868..b737ed3 100755
--- a/jobs/alpine-amd64.sh
+++ b/jobs/alpine-amd64.sh
@@ -1,11 +1,13 @@
#!/bin/sh
. utils
-# TODO get latest uri from latest-releases.yml file
+# TODO mount global alpine repository
+# TODO get latest uri from latest-releases.yml file
if [ ! -d "$ROOT" ]; then
echo_stage "Setting up new root"
wget "http://dl-cdn.alpinelinux.org/alpine/edge/releases/x86_64/alpine-minirootfs-3.8.0-x86_64.tar.gz" -O alpine.tar.gz
+ # TODO verify signature
gunzip alpine.tar.gz
tar -f alpine.tar --delete ./dev/null
mkdir "$ROOT"
@@ -21,7 +23,7 @@ if [ ! -d "$ROOT" ]; then
chgrp abuild /var/cache/distfiles
chmod g+w /var/cache/distfiles
EOF
- uchroot "$ROOT" build 'mkdir .abuild && echo "PACKAGER_PRIVKEY=\"/build/.abuild/cynerd@email.cz-5b8aeb6d.rsa\"" > .abuild/abuild.conf'
+ uchroot "$ROOT" build 'mkdir .abuild aports && echo "PACKAGER_PRIVKEY=\"/build/.abuild/cynerd@email.cz-5b8aeb6d.rsa\"" > .abuild/abuild.conf'
uroot cp ~/alpinelinux.rsa.key "$ROOT/build/.abuild/cynerd@email.cz-5b8aeb6d.rsa"
uchroot "$ROOT" root 'chown build:build "/build/.abuild/cynerd@email.cz-5b8aeb6d.rsa"'
uroot cp ~/alpinelinux.rsa.key.pub "$ROOT/etc/apk/keys/cynerd@email.cz-5b8aeb6d.rsa.pub"
@@ -48,17 +50,16 @@ echo_stage "Update system"
uchroot "$ROOT" root 'apk update && apk upgrade'
echo_stage "Get packages source"
-git_clone "git@cynerd.cz:alpine-personal-pkgs" "$ROOT/aports"
-uchroot "$ROOT" root "rm -rf /build/aports && chown -R build:build /aports && mv /aports /build/aports"
+git_clone "git@cynerd.cz:alpine-personal-pkgs" "$ROOT/pkgs"
+uchroot "$ROOT" root "rm -rf /build/aports/personal && chown -R build:build /pkgs && mv /pkgs /build/aports/personal"
echo_stage "Build packages"
-uchroot "$ROOT" build buildrepo --purge $(ls "$ROOT/build/aports")
+uchroot "$ROOT" build buildrepo --purge personal
echo_stage "Deploy"
ssh upload rm -rf "deploy-alpine-amd64"
-scp -r "$ROOT/build/packages" upload:deploy-alpine-amd64
+scp -r "$ROOT/build/packages/personal" upload:deploy-alpine
ssh upload /bin/sh -e <<EOF
- mkdir -p /var/www/repo/alpine
- rm -rf /var/www/repo/alpine/amd64
- mv deploy-alpine-amd64 /var/www/repo/alpine/amd64
+ rm -rf /var/www/repo/alpine
+ mv deploy-alpine /var/www/repo/alpine
EOF