diff --git a/ci/jobgenerator.py b/ci/jobgenerator.py index f4085a2..44d157b 100755 --- a/ci/jobgenerator.py +++ b/ci/jobgenerator.py @@ -176,12 +176,22 @@ class Generator: if job_type.startswith("package"): upstream = data["upstream_url"] + + # Parse the upload target into LP team names and PPA names + # Example: ppa:lubuntu-ci/unstable-ci-proposed + # This becomes ["ppa:lubuntu-ci", "/", "unstable-ci-proposed"] + # Of course, this assumes that we're uploading to a PPA + lp_info = list(upload_target.partition("/")) + lp_info[0] = lp_info[0].replace("ppa:", "") + package_config = template.render(PACKAGING_URL=url, PACKAGING_BRANCH=branch, UPSTREAM_URL=upstream, NAME=data["name"], RELEASE=data["release"], - UPLOAD_TARGET=upload_target) + UPLOAD_TARGET=upload_target, + LP_TEAM=lp_info[0], + LP_PPA=lp_info[2]) elif job_type == "merger": # Cascading merges cascade = "" diff --git a/templates/package-stable.xml b/templates/package-stable.xml index 63127b1..e27f7ec 100644 --- a/templates/package-stable.xml +++ b/templates/package-stable.xml @@ -65,13 +65,13 @@ bash -c 'for FILENAME in {{ NAME }}_$UPSTREAM_VERSION.orig*; do mv $FILENAME $(e (cd {{ NAME }}; dch --distribution {{ RELEASE }} --package "{{ NAME }}" --newversion "$VERSION-0ubuntu1~ppa1" "CI upload."; debuild -S -d -sa -k06DA7DDBBF3117FFE3FB849E4F81E626A09EB338; dput {{ UPLOAD_TARGET }} ../{{ NAME }}_$VERSION-0ubuntu1~ppa1_source.changes) sleep 5m; git clone https://phab.lubuntu.me/source/ci-tooling.git tooling; -./tooling/ci/lp_check.py -p {{ NAME }} -v $VERSION-0ubuntu1~ppa1 -t lubuntu-ci -r stable-ci-proposed; +./tooling/ci/lp_check.py -p {{ NAME }} -v $VERSION-0ubuntu1~ppa1 -t {{ LP_TEAM }} -r {{ LP_PPA }}; export VERSION="$(head -1 {{ NAME }}/debian/changelog | sed -n '/(/,/)/{:a; $!N; /)/!{$!ba}; s/.*(\([^)]*\)).*/\1/p}' | cut -d '-' -f1)"; -pull-ppa-debs --ppa=ppa:lubuntu-ci/stable-ci-proposed {{ NAME }} $VERSION-0ubuntu1~ppa1; +pull-ppa-debs --ppa={{ UPLOAD_TARGET }} {{ NAME }} $VERSION-0ubuntu1~ppa1; lintian --fail-on=error,warning --suppress-tags package-has-long-file-name -EvIL +pedantic *.dsc *.deb; 2 diff --git a/templates/package-unstable.xml b/templates/package-unstable.xml index 1b0c66b..575bd50 100644 --- a/templates/package-unstable.xml +++ b/templates/package-unstable.xml @@ -65,13 +65,13 @@ gzip {{ NAME }}_$VERSION.orig.tar; (cd {{ NAME }}; dch --distribution {{ RELEASE }} --package "{{ NAME }}" --newversion "$VERSION-0ubuntu1~ppa1" "CI upload."; debuild -S -d -sa -k06DA7DDBBF3117FFE3FB849E4F81E626A09EB338; dput {{ UPLOAD_TARGET }} ../{{ NAME }}_$VERSION-0ubuntu1~ppa1_source.changes) sleep 5m; git clone https://phab.lubuntu.me/source/ci-tooling.git tooling; -./tooling/ci/lp_check.py -p {{ NAME }} -v $VERSION-0ubuntu1~ppa1 -t lubuntu-ci -r unstable-ci-proposed; +./tooling/ci/lp_check.py -p {{ NAME }} -v $VERSION-0ubuntu1~ppa1 -t {{ LP_TEAM }} -r {{ LP_PPA }}; export VERSION="$(head -1 {{ NAME }}/debian/changelog | sed -n '/(/,/)/{:a; $!N; /)/!{$!ba}; s/.*(\([^)]*\)).*/\1/p}' | cut -d '-' -f1)"; -pull-ppa-debs --ppa=ppa:lubuntu-ci/unstable-ci-proposed {{ NAME }} $VERSION-0ubuntu1~ppa1; +pull-ppa-debs --ppa={{ UPLOAD_TARGET }} {{ NAME }} $VERSION-0ubuntu1~ppa1; lintian --fail-on=error,warning --suppress-tags orig-tarball-missing-upstream-signature,package-has-long-file-name -EvIL +pedantic *.dsc *.deb; 2