Commit dcee4193 authored by Booloki's avatar Booloki

Gitlab CI cleaning

parent 438c3ae4
......@@ -25,6 +25,7 @@ build:deb-package:
script:
# Update env
- apt-get update -qq
# Dependencies install
- apt-get install -qq -y apt-utils git dh-make build-essential devscripts autoconf autotools-dev
# Copy Debian packaging files
- cp -r packaging/debian .
......@@ -68,27 +69,18 @@ build:archlinux-package:
script:
# Update env
- pacman -Syu --noconfirm -q
# Dependencies install
- pacman -S --noconfirm -q git base-devel sudo pacman-contrib
# Need dedicated user for building
- useradd builduser -m # Create the builduser
- passwd -d builduser # Delete the buildusers password
- printf 'builduser ALL=(ALL) ALL\n' | tee -a /etc/sudoers # Allow the builduser passwordless sudo
# Clone, build and install package-query (dependancy for yaourt)
# Clone, build and install package-query (yaourt dependancy)
- sudo -u builduser bash -c 'cd ~ && git clone https://aur.archlinux.org/package-query.git && cd package-query && makepkg -si --noconfirm'
# Clone, build and install yaourt
- sudo -u builduser bash -c 'cd ~ && git clone https://aur.archlinux.org/yaourt.git && cd yaourt && makepkg -si --noconfirm'
# Package build
- sudo -u builduser bash -c "cd ~ && git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@git.lokizone.net/booloki/wazzuf-ripper.git && cd wazzuf-ripper && cp packaging/archlinux/PKGBUILD . && sed -i s/^pkgver=.*/pkgver=${CI_COMMIT_TAG}/ PKGBUILD && updpkgsums && makepkg -s"
# - sed -i "s/^pkgver=.*/pkgver=${CI_COMMIT_TAG}/" PKGBUILD
# - sed -i "s/^pkgrel=.*/pkgrel=1/" PKGBUILD
# Update PKGBUILD sums
#- updpkgsums
# Create .SRCINFO file
# Only for AUR
#- makepkg --printsrcinfo > .SRCINFO
# Build package
#- makepkg -s
- mkdir build
# Provides packages
- mv ~builduser/wazzuf-ripper/*.pkg.tar.xz build/
# Provides PKGBUILD file
......@@ -111,8 +103,9 @@ test:deb-install:
- echo "deb [trusted=yes] http://wazzuf-ripper.lokizone.net/ubuntu/ trusty main" > /etc/apt/sources.list.d/wazzuf-ripper.list
# Add testing repository
- echo "deb [trusted=yes] http://wazzuf-ripper.lokizone.net/ubuntu/ testing main" >> /etc/apt/sources.list.d/wazzuf-ripper.list
# Update env
- apt-get update -qq
# dependency install
# Dependency install
- apt-get install -qq gdebi
# Install tests
- gdebi --non-interactive build/wazzuf-ripper_*.deb
......@@ -133,14 +126,15 @@ test:archlinux-install:
script:
# Add multilib repository
- echo -e "[multilib]\nInclude = /etc/pacman.d/mirrorlist" >> /etc/pacman.conf
# Update & install dependancies
# Update env
- pacman -Syu --noconfirm --noprogressbar -q
# Dependencies install
- pacman -S --noconfirm --noprogressbar -q git base-devel sudo
# Need dedicated user for building
- useradd builduser -m # Create the builduser
- passwd -d builduser # Delete the buildusers password
- printf 'builduser ALL=(ALL) ALL\n' | tee -a /etc/sudoers # Allow the builduser passwordless sudo
# Clone, build and install package-query (dependancy for yaourt)
# Clone, build and install package-query (yaourt dependancy)
- sudo -u builduser bash -c 'cd ~ && git clone https://aur.archlinux.org/package-query.git && cd package-query && makepkg -si --noconfirm --noprogressbar'
# Clone, build and install yaourt
- sudo -u builduser bash -c 'cd ~ && git clone https://aur.archlinux.org/yaourt.git && cd yaourt && makepkg -si --noconfirm'
......@@ -160,6 +154,6 @@ test:archlinux-install:
only:
- tags
script:
# Send to repo ?
# TODO
dependencies:
- build:deb-package
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment