diff options
| -rw-r--r-- | .gitlab-ci.yml | 22 | ||||
| -rwxr-xr-x | ci-upload.sh | 19 |
2 files changed, 41 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..be5c0ac --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,22 @@ +default: + image: + archlinux:latest + +build: + tags: + - medium + + script: + - pacman --noconfirm --needed -Syu base-devel gnupg git + - ls + - useradd -m build + - ls .. + - echo 'build ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers + - cp -r ../repos-test /home/build/ + - cd /home/build/repos-test + - echo $GPG_PRIV_KEY | base64 -d > ../key.asc + - chown -R build:build ../repos-test + - su -c "bash -c 'cd repo/pod2man && makepkg -i --noconfirm'" build + - su -c 'gpg --import ../key.asc' build + - su -c 'BUILD_ONLY='' ./pkgbuild.sh' build + - su -m -c './ci-upload.sh' build
\ No newline at end of file diff --git a/ci-upload.sh b/ci-upload.sh new file mode 100755 index 0000000..9d2cff9 --- /dev/null +++ b/ci-upload.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +ARCH=$(uname -m) +PKGDEST="${PWD}/packages/$ARCH" + +curl -d "token=$UPLOAD_TOKEN&action=REQUIRE_CLEAN" -fsSL "$REMOTE_PATH" + +pushd $PKGDEST + +for file in *.pkg*; do + curl -F "file=@$file" -F "token=$UPLOAD_TOKEN" -fsSL "$REMOTE_PATH" +done + +popd + +curl -d "token=$UPLOAD_TOKEN&action=UPLOADED" -fsSL "$REMOTE_PATH" + +unset ARCH +unset PKGDEST |
