Stop hardcoding PPA names in.

master
Simon Quigley 5 years ago
parent fec50ac982
commit 89ca7bdef0

@ -176,12 +176,22 @@ class Generator:
if job_type.startswith("package"): if job_type.startswith("package"):
upstream = data["upstream_url"] 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, package_config = template.render(PACKAGING_URL=url,
PACKAGING_BRANCH=branch, PACKAGING_BRANCH=branch,
UPSTREAM_URL=upstream, UPSTREAM_URL=upstream,
NAME=data["name"], NAME=data["name"],
RELEASE=data["release"], 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": elif job_type == "merger":
# Cascading merges # Cascading merges
cascade = "" cascade = ""

@ -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) (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; sleep 5m;
git clone https://phab.lubuntu.me/source/ci-tooling.git tooling; 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 }};
</command> </command>
</hudson.tasks.Shell> </hudson.tasks.Shell>
<hudson.tasks.Shell> <hudson.tasks.Shell>
<command> <command>
export VERSION=&quot;$(head -1 {{ NAME }}/debian/changelog | sed -n &apos;/(/,/)/{:a; $!N; /)/!{$!ba}; s/.*(\([^)]*\)).*/\1/p}&apos; | cut -d &apos;-&apos; -f1)&quot;; export VERSION=&quot;$(head -1 {{ NAME }}/debian/changelog | sed -n &apos;/(/,/)/{:a; $!N; /)/!{$!ba}; s/.*(\([^)]*\)).*/\1/p}&apos; | cut -d &apos;-&apos; -f1)&quot;;
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; lintian --fail-on=error,warning --suppress-tags package-has-long-file-name -EvIL +pedantic *.dsc *.deb;
</command> </command>
<unstableReturn>2</unstableReturn> <unstableReturn>2</unstableReturn>

@ -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) (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; sleep 5m;
git clone https://phab.lubuntu.me/source/ci-tooling.git tooling; 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 }};
</command> </command>
</hudson.tasks.Shell> </hudson.tasks.Shell>
<hudson.tasks.Shell> <hudson.tasks.Shell>
<command> <command>
export VERSION=&quot;$(head -1 {{ NAME }}/debian/changelog | sed -n &apos;/(/,/)/{:a; $!N; /)/!{$!ba}; s/.*(\([^)]*\)).*/\1/p}&apos; | cut -d &apos;-&apos; -f1)&quot;; export VERSION=&quot;$(head -1 {{ NAME }}/debian/changelog | sed -n &apos;/(/,/)/{:a; $!N; /)/!{$!ba}; s/.*(\([^)]*\)).*/\1/p}&apos; | cut -d &apos;-&apos; -f1)&quot;;
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; lintian --fail-on=error,warning --suppress-tags orig-tarball-missing-upstream-signature,package-has-long-file-name -EvIL +pedantic *.dsc *.deb;
</command> </command>
<unstableReturn>2</unstableReturn> <unstableReturn>2</unstableReturn>

Loading…
Cancel
Save