You are not logged in.

#1 2020-05-25 18:28:52

aminvakil
Member
From: Tehran
Registered: 2019-08-01
Posts: 29
Website

[SOLVED] Continous integration for PKBGUILD

I've recently configured travis on all of my docker repos on github:

https://github.com/aminvakil/

And I've recently created a repo for my AUR packages https://github.com/aminvakil/aur (Actually after I saw https://github.com/freswa/aur in aur-general mailing list).

I wanted to implement a CI for it in order to test it before I push it to AUR, so far the best thing that I have found was this:

https://github.com/mikkeloscar/arch-travis

But it hasn't been updated for a while and by default it has "yay" installed (which is a con in my opinion).

I have two ideas, either use the mentioned repo or build a docker container from archlinux and start tweaking it for my needs, does anyone have any other ideas? Or any ideas about my solutions?

OR is there a linter for PKGBUILD like https://github.com/hadolint/hadolint which is for Dockerfile? So at least people can check some basics before pushing their PKGBUILDs on AUR?

(I would be very happy if anyone could spare some time reviewing my PKGBUILDs too and email me or create a pull request on my github repo, but this isn't a "PKBGUILD review request" topic)

Last edited by aminvakil (2020-08-01 10:16:46)

Offline

#2 2020-07-25 12:56:06

aminvakil
Member
From: Tehran
Registered: 2019-08-01
Posts: 29
Website

Re: [SOLVED] Continous integration for PKBGUILD

So exactly after a month, I have reached a little of what I wanted to do in https://github.com/aminvakil/aur/blob/m … travis.yml.

It uses a customized archlinux image which is available in https://github.com/aminvakil/docker-arc … Dockerfile . Nothing special, just using archlinux:latest as base image and installing base-devel package afterwards, also added a sudoer user without password to do makepkg afterwards.

Then using travis it checks if it can makepkg sucessfully.

Here is an example:
https://travis-ci.com/github/aminvakil/ … /177144924

Although there are somethings that bother me, it uses

changed_pkg=$(git diff --name-only HEAD HEAD~1 | cut -d "/" -f1)

in order to figure out which package has been changed in latest commit, mount it on docker container and runs the makepkg. Therefore if .travis.yml file gets changed or multiple pacakges gets changed in one commit, this approach would give me an error.

Also some packages like https://github.com/aminvakil/aur/blob/m … n/PKGBUILD needs to run

curl https://getfedora.org/static/fedora.gpg | gpg --import

before doing the makepkg. So it would be nice if there would be a file in each package's folder which ran before doing the makepkg, so makepkg didn't face an error.

Last but not least, it would be awesome if it could push to AUR at last after successfully doing the makepkg, correctly and securely.

Last edited by aminvakil (2020-07-25 12:57:54)

Offline

#3 2020-08-01 10:16:29

aminvakil
Member
From: Tehran
Registered: 2019-08-01
Posts: 29
Website

Re: [SOLVED] Continous integration for PKBGUILD

I'm not gonna spam here anymore, just for future readers, the issues posted in previous comment have been fixed except pushing to AUR and can be seen in https://github.com/aminvakil/aur/.

Offline

Board footer

Powered by FluxBB