As part of our github action, we are now successfully “pushing” draft and release Balena container images using:
balena push myorg/myapp --nocache --registry-secrets /tmp/image_pull_secrets.yaml --draft --release-tag sha {github-commit-sha-here}
balena-cli succeeds:
[Success] Successfully uploaded images
[Info] Built on x64_01
[Success] Release successfully created!
[Info] Release: {balena-app-sha-here} (id: 12345678)
[Info] ┌─────────────┬────────────┬────────────┐
[Info] │ Service │ Image Size │ Build Time │
[Info] ├─────────────┼────────────┼────────────┤
[Info] │ myapp │ 306.77 MB │ 31 seconds │
[Info] └─────────────┴────────────┴────────────┘
[Info] Build finished in 1 minute, 5 seconds
In Balena Cloud, under Apps–>MyApp–>Releases we see the release, as can be seen at:
Imgur: The magic of the Internet (private info removed prior to screenshot).
Going back to the MyApp page, the “Deploy to fleet” button is disabled and just says “coming soon”.
From the cli, we tried:
balena deploy test-fleet myorg/myapp
balena deploy test-fleet myorg/myapp:{balena-app-sha-here}
balena deploy test-fleet myapp:{balena-app-sha-here}
balena deploy test-fleet {balena-app-sha-here}
all of which attempt to rebuild the app release that is already sitting in the balena cloud (same arch, same target device - Intel NUC), and then fail because those deploy
cli commands don’t specify registry-secrets
- on purpose, as we want to use the GitHub Actions/Balena Cloud built container, NOT build it again.
We also tried:
balena push test-fleet myorg/myapp
balena push test-fleet myorg/myapp:{balena-app-sha-here}
balena push test-fleet myapp:{balena-app-sha-here}
balena push test-fleet {balena-app-sha-here}
which all seem to function just like deploy, wanting to build locally and then deploy rather than using the existing App release/draft in balena cloud.
What am I missing here? How do we deploy to a fleet where this balena cloud hosted/built app wasn’t preloaded?