A green upload job tells you the update reached the server. Before production, I want a more specific answer: which JavaScript bundle did QA actually run?
An Android version can stay the same across several OTA releases, and a second upload can land on the test channel while QA is still working. Record the bundle hash at upload, verify it on a device, and use that hash to identify what gets promoted.
Publish to a test channel and keep the artifacts
This example uses Bundle Drop, which I maintain. It assumes a bare Android app with the SDK already integrated, a committed npm lockfile, and an existing develop channel. The version in android/app/build.gradle should match your test build. Use the same native configuration and compatible runtime inputs as that build.
Install dependencies with npm ci and run your normal checks first. Run this publishing step from the app root on a clean checkout of a reviewed branch. Map BUNDLE_DROP_PAT from your CI secret store into this step only. Keep it out of pull-request jobs, shell traces, and retained artifacts.
set -euo pipefail
: "${BUNDLE_DROP_PAT:?Set BUNDLE_DROP_PAT in the CI secret store}"
artifact_dir=./artifacts/bundledrop/android
mkdir -p "$artifact_dir"
git rev-parse HEAD > "$artifact_dir/source-revision.txt"
npx --no-install bundle-drop upload android \
--buildgradle-path android/app/build.gradle \
--channel develop \
--token "$BUNDLE_DROP_PAT" \
--sourcemap \
--artifact-dir "$artifact_dir"
node - "$artifact_dir/bundle-drop-result.json" <<'NODE'
const fs = require('node:fs');
const result = JSON.parse(fs.readFileSync(process.argv[2], 'utf8'));
if (result.success !== true || !/^[a-f0-9]{64}$/i.test(result.hash ?? '')) {
throw new Error('Missing successful upload hash');
}
for (const field of ['bundlePath', 'sourceMapPath']) {
const path = result[field];
const file = typeof path === 'string'
? fs.statSync(path, { throwIfNoEntry: false })
: undefined;
if (!file?.isFile() || file.size === 0) throw new Error('Missing artifact: ' + field);
}
console.log('OTA hash:', result.hash);
NODE
Archive that directory with the CI run. The result, bundle and matching source map should stay together. The CLI can warn about a failed local artifact copy after an upload succeeds. If the artifact check fails, inspect the release in the dashboard before retrying, since the server may already have accepted it.
Test what the device is actually running
Install a compatible Android Release build on a test device, with Metro stopped. Make the candidate eligible for that device on develop. Follow the app’s activation policy, then compare the active bundle identity with the saved result. In Bundle Drop, getObservabilityContext() should report source as ota and dist as the uploaded hash. Record that hash with the device test, native build version, runtime and CI run.
The app can show the expected screen while running a different update that made the same change. The hash makes that difference observable. The first-update walkthrough shows how to check it on a bare Android build.
Promote the tested hash, then control exposure
After QA accepts the bundle, use channel promotion to add that exact bundle to the production channel. Promotion reuses the artifact and preserves its hash. Check the destination channel’s release controls first. With managed publishing enabled, configure a rollout for the promoted bundle and start with the intended audience. Widen exposure after checking health and adoption. Keep the retained source map linked to the active OTA hash so a crash during the rollout resolves to the right build.
You should be able to trace one hash through the upload result, the test device and the production rollout. That is the evidence worth keeping when a CI run turns green.
Originally published on Bundle Drop Resources. This adaptation was edited with AI assistance.
Top comments (0)