The TARGET_DIR values in just these few nightly scripts have
trailing slashes. They shouldn't, it'll lead to double slashes
in all the places that use TARGET_DIR as they expect it not to
have one.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
We set $DESTDIR in all these scripts, but then use its value
several times without just...using it. Let's use it!
Signed-off-by: Adam Williamson <awilliam@redhat.com>
For fedmsg_meta we have to provide a 'link'. At present we do
this with a rather large and icky pile of conditionals which
doesn't work properly. It's much simpler to figure out the URL
in the compose script and emit it in the fedmsg, then meta can
just...use it. For older fedmsgs we'll just point to the base
kojipkgs location for the link.
For synced composes, we use the synced URL on dl (this matches
what the meta stuff tried to do before). For non-synced composes
we just use the kojipkgs location.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This applies the same changes I recently submitted for the
nightly compose scripts to nightly-modular.sh on the 27 branch,
which is used for the Fedora-Modular 27 nightly composes. So
it makes that script include the shortname in fedmsgs and
simplifies the release variables etc. just as for the other
scripts.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
When nightly-modular.sh was added, it wasn't set to check the
exit code from pungi-koji, as nightly.sh does. This was I guess
because it didn't do much after the compose finished at that
time, and the author thought it was OK for the few things it
*did* do to happen on both successful and failed composes.
However, it now does more stuff after compose completion, like
nightly.sh, including trying to generate changelog files and
send out a compose report email. But because the pungi-koji
exit code check is missing, it tries to do these things even
for failed composes. Changelog generation will fail when the
compose failed, and the email that gets sent out will have a
missing compose ID (because NEWCOMPOSE_ID and SHORTCOMPOSE_ID
can't be set properly and will be blank), and will be empty
because the changelog file that's supposed to be read in as the
content of the email isn't there. This is why we are getting
an empty mail with subject "Fedora Modular bikeshed compose
report: changes" every time a compose fails.
So, let's put that check in just like nightly.sh does.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
The nightly scripts try to send an announcement about compose starting.
As this happens before Pungi even started, the compose ID is not known
and can not be included in the message. The message about starting rsync
sent later will contain the ID correctly.
Without the json defined there is a traceback in the cron output, but
the errors are not logged anywhere else (but don't actually block
anything in the compose process).
Relates: https://pagure.io/pungi/issue/698
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>