RPM specfiles typically use tarball build inputs, not zips. When
triggering from autorelease, we need to convert the BUNDLEURL link to
the zip-archive distro into one for the tarball distro.
Could also do this by creating a new variable parallel to BUNDLEURL for
passing a link to the tarball, something like BUNDLETARURL. I started on
this in [1] but think it's not worth the complexity, unlikely to be
reused.
[1]: https://git.opendaylight.org/gerrit/#/c/52693/
This fixes:
trello.com/c/qcwHU9u1/446-fix-build-rpm-jobs-triggered-by-autorelease
Change-Id: Ic9b4a998a4f823f4a3a3b1ef3ac0f604cf03565f
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
pip install --upgrade pip
pip install -r $WORKSPACE/packaging/rpm/requirements.txt
+# Make a URL for the tarball artifact from DOWNLOAD_URL (a zip)
+download_url="${{DOWNLOAD_URL//zip/tar.gz}}"
+
# Build release specified by build params
-$WORKSPACE/packaging/rpm/build.py --download_url "$DOWNLOAD_URL" \
+$WORKSPACE/packaging/rpm/build.py --download_url "$download_url" \
--sysd_commit "$SYSD_COMMIT" \
--changelog_date "$CHANGELOG_DATE" \
--changelog_name "$CHANGELOG_NAME" \