snapcraft remote-build will return an exit code of 0 even if the remote build fails. This makes it hard to use in automated scripts, as the return value cannot be used to determine if the build succeeded. It should return a non-zero exit value if the operation fails, in line with Unix conventions.
12:21:20 Build status as of 2024-09-30 17:21:20.064750:
12:21:20 arch=s390x state=Currently building
12:21:20 arch=ppc64el state=Currently building
12:21:50 Build status as of 2024-09-30 17:21:50.664508:
12:21:50 arch=s390x state=Failed to build
12:21:50 arch=ppc64el state=Failed to build
12:21:51 Starting Snapcraft 7.5.6
12:21:51 Logging execution to '/home/jenkins/.local/state/snapcraft/log/snapcraft-20240930-171430.461014.log'
12:21:51 Snap file not available for arch 's390x'.
12:21:52 Build log available at 'juju_s390x.txt'
12:21:52 Build failed for arch 's390x'.
12:21:52 Snap file not available for arch 'ppc64el'.
12:21:53 Build log available at 'juju_ppc64el.txt'
12:21:53 Build failed for arch 'ppc64el'.
12:21:53 Build complete.
12:21:55 + '[' 0 -ne 0 ']' # this line was checking the exit status
Bug Description
snapcraft remote-build
will return an exit code of 0 even if the remote build fails. This makes it hard to use in automated scripts, as the return value cannot be used to determine if the build succeeded. It should return a non-zero exit value if the operation fails, in line with Unix conventions.To Reproduce
snapcraft remote-build --launchpad-accept-public-upload --build-on="amd64,arm64,ppc64el,s390x"
Environment
Running on an AWS instance in Jenkins. Ubuntu Focal, amd64. Snapcraft 7.5.6.
snapcraft.yaml
Relevant log output
Additional context
No response