EGI-Federation / glite-info-update-endpoints

A cron job that runs every hour to download the list of site BDII URLs that are going to be used by the top level BDII to publish their resources.
Apache License 2.0
0 stars 5 forks source link

Travis doesn't catch failing installations #20

Closed brucellino closed 1 year ago

brucellino commented 5 years ago

In Travis, we run the installation of a product in a container - it recently failed (see #17 ) silently. Since the installation is done in the container, Travis sees an exit 0 of docker exec, not the exit 1 of rpm -ivh

Somewhere between the python script, the rpm post we are losing the error code.

gwarf commented 5 years ago

@brucellino, may we try something like: https://github.com/docker/compose/issues/3379#issuecomment-254366136

gwarf commented 5 years ago

It seems it doesn't work with actual .travis.yml, need to dig more why error code is being lost.

gwarf commented 5 years ago

So it seems that in fact the problem is that a failing postscript does not make the install fail!

[root@beeb16c596bf src]# rpm -Uvh build/RPMS/noarch/glite-info-update-endpoints-3.0.1-1.el7.noarch.rpm  ; echo $?
Preparing...                          ################################# [100%]
Updating / installing...
   1:glite-info-update-endpoints-3.0.1################################# [100%]
warning: %post(glite-info-update-endpoints-3.0.1-1.el7.noarch) scriptlet failed, exit status 1
0
gwarf commented 5 years ago

So it's a known thing: https://bugzilla.redhat.com/show_bug.cgi?id=569930

gwarf commented 1 year ago

Move away from Travis, not planning to hack a workaround for this right now.