Support fetching the last known good build When users pass `-branch` and not `-build_id`, it'll fetch the latest passed build ID in the given branch and the given target. Bug: 349534024 Test: fetch_artifact -target=aosp_arm64-trunk_staging-userdebug -branch=aosp-main -artifact=COPIED Change-Id: Ifee522be4a7829b0044948913890d77a0904bc0d
Fetch artifact is a tool for downloading artifacts from Android's continuous integration service.
target: Required - The target you would like to download the artifact from.artifact: Required - The artifact to download.build_id or branch, but not bothbuild_id is provided, the script would download the artifact from that build_id.branch is provided, the script would download the artifact from the last known good build of that branch.output: Optional - If you would like the contents of the file to be written to a specific file.-: Optional - If you would like the contents of the file to be written to stdout (must be the last arg)fetch_artifact -target=aosp_arm64-userdebug -build_id=7000390 -artifact=COPIED
fetch_artifact -target=aosp_arm64-userdebug -build_id=7000390 -artifact=COPIED -
fetch_artifact -target=aosp_arm64-trunk_staging-userdebug -branch=aosp-main -artifact=COPIED
OUT_DIR=out ./build