Skip to content
Snippets Groups Projects
Commit cb4df0c3 authored by Luis Araujo's avatar Luis Araujo
Browse files

Add command line flag to specify the whitelists directory


This commit adds the command line flag --whitelists-dir to specify the
directory path for the whitelists files in the obs-installability
script.

This commit also updates the Jenkinsfile to use the correct path for the
whitelists files.

Signed-off-by: default avatarLuis Araujo <luis.araujo@collabora.co.uk>
parent cdac508c
No related branches found
No related tags found
1 merge request!11Add command line flag to specify the whitelists directory
......@@ -18,7 +18,7 @@ pipeline {
test -n "${params.RELEASE}" && RELEASE=${params.RELEASE}
export HOME=/tmp
./obs-installability/obs-installability \$RELEASE junit.xml
./obs-installability/obs-installability \$RELEASE junit.xml --whitelists-dir obs-installability/whitelists/
"""
}
}
......
......@@ -61,9 +61,7 @@ packages_results = { }
# URL from which the Packages.gz files will be fetched for each image type.
link = "https://repositories.apertis.org/apertis/dists/%(release)s/%(image_type)s/binary-%(arch)s/Packages.gz"
whitelists_dir = "whitelists/"
def check_packages(release):
def check_packages(release, whitelists_dir):
# Make sure to create the dir to save all the Packages files, otherwise
# remove it if it already exists.
if os.path.isdir(PKG_FILES_DIR):
......@@ -179,10 +177,13 @@ def main():
help='Image release (eg. v2020pre)')
cli_parser.add_argument('JUNIT', type=argparse.FileType('w'),
help='file to store results in JUnit format')
cli_parser.add_argument('--whitelists-dir', type=str,
default="whitelists/",
help="Dir path for whitelists files")
args = cli_parser.parse_args()
logging.basicConfig(level=logging.INFO, format='%(message)s')
junit_file = check_packages(args.RELEASE)
junit_file = check_packages(args.RELEASE, args.whitelists_dir)
logging.info("> Writing JUnit file: %s", args.JUNIT.name)
args.JUNIT.write(junit_file)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment