Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

snapcraft remote-build succeeds even if the build fails #5080

Open
barrettj12 opened this issue Sep 30, 2024 · 0 comments
Open

snapcraft remote-build succeeds even if the build fails #5080

barrettj12 opened this issue Sep 30, 2024 · 0 comments

Comments

@barrettj12
Copy link

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

https://github.com/juju/juju/blob/3.5/snap/snapcraft.yaml

Relevant log output

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

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant