CI: use pmbootstrap lint for checking packages (MR 1132)

This commit is contained in:
Daniele Debernardi 2020-04-06 23:06:11 +02:00 committed by Oliver Smith
parent 233ec0d21c
commit 5ead73e86c
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
2 changed files with 7 additions and 6 deletions

View file

@ -85,9 +85,10 @@ aports-static:
aport-lint:
stage: first
before_script:
- apk -q add git atools python3
- wget "https://gitlab.com/postmarketOS/ci-common/-/raw/master/install_pmbootstrap.sh"
- sh ./install_pmbootstrap.sh
script:
- .gitlab-ci/apkbuild-linting.py
- su pmos -c ".gitlab-ci/apkbuild-linting.py"
only:
- merge_requests
allow_failure: true

View file

@ -3,7 +3,6 @@
import common
import os.path
import subprocess
import sys
if __name__ == "__main__":
@ -20,9 +19,10 @@ if __name__ == "__main__":
print(f"NOTE: Skipping linting of {apkbuild}")
continue
result = subprocess.run(["apkbuild-lint", apkbuild], capture_output=True)
if len(result.stdout) > 0:
issues.append([apkbuild, result.stdout.decode("utf-8")])
package = os.path.basename(os.path.dirname(apkbuild))
result = common.run_pmbootstrap(["-q", "lint", package], output_return=True)
if len(result) > 0:
issues.append([apkbuild, result])
if len(issues) > 0:
print("Linting issues found:")