Azure Pipelines
Store APPBARN_TOKEN as a secret pipeline variable and run the CLI after producing the artifact.
yaml
- script: |
npm install --global appbarn-cli
appbarn config set api https://api.app-barn.com
appbarn config set app "$(APPBARN_APP_ID)"
appbarn config set environment "$(APPBARN_ENVIRONMENT_ID)"
appbarn upload ./build/app.apk --app-identifier "$(APPBARN_APP_IDENTIFIER)" --version "$(APPBARN_VERSION)" --build-number "$(APPBARN_BUILD_NUMBER)"
displayName: Upload to AppBarn
env:
APPBARN_TOKEN: $(APPBARN_TOKEN)AppBarn detects Azure Pipelines provenance from standard environment variables.
Prompt an agent to add Azure Pipelines upload
text
Add an AppBarn upload step to this repository's Azure Pipelines mobile-build pipeline.
Inspect the existing pipeline YAML and build output before editing. Run the upload only after the selected mobile artifact is available in the agent workspace. Install `appbarn-cli`, configure the API origin plus the App and Environment UUIDs, and upload the resolved IPA, APK or AAB path. Pass `APPBARN_TOKEN` to the step only as a secret pipeline variable. Keep App/Environment IDs and required Android application identity, version and build-number values as non-secret variables. Do not manually provide provenance metadata or print secrets.
Before editing, ask me to choose the pipeline/job and artifact when several options exist. Ask which variable group or pipeline-variable scope to use if that is not already defined, and ask for the target App/Environment and identity source whenever they are ambiguous. If the secret is not configured, tell me its required name and ask me to add it without sharing the value.
Validate the YAML and summarize the required variables and final artifact path.Common failures
Mark the token secret, verify the artifact path in the agent workspace and keep the Automation Token scoped to only the required Project/App.