DeviceCloud
Console UIMaestro DocsDiscord
  • Welcome to DeviceCloud
  • Getting Started
    • Quick Start
    • API Keys
    • Executing Flows
    • Limits
    • Upgrade Guide
    • Device Configuration
  • CI/CD Integration
    • Overview
    • GitHub Actions
    • BitRise
    • Any CI
    • Status API
  • Reference
    • Test Execution
    • App Management
    • Environment Variables
    • Device Orientation
    • Device Locale
    • Async Execution
    • Retry Strategies
    • Report Formats
    • Download Artifacts
    • Quiet Mode
    • Maestro Versions
    • Test Run Name
    • Google Play APIs
    • Email Notifications
    • Exit Codes
    • Runner Type
  • Infrastructure & Security
    • IP Addresses
    • Security Overview
    • IT Security Policies
    • Enterprise SSO
  • Legal
    • Service Level Agreements
    • Open Source Notices
    • Privacy Policy
    • Terms and Conditions
    • Refund Policy
Powered by GitBook
On this page
  • Setting Environment Variables
  • Command Line
  • Multiple Variables
  • Use Cases
  • Configuration Management
  • Secure Credentials
  • Best Practices

Was this helpful?

Edit on GitHub
  1. Reference

Environment Variables

Device Cloud allows you to inject environment variables into your test flows, enabling dynamic configuration and secure credential management.

Setting Environment Variables

Command Line

dcd cloud -e API_URL=https://api.example.com -e API_KEY=secret

Multiple Variables

dcd cloud -e DB_HOST=localhost \
          -e DB_USER=test \
          -e DB_PASS=password \
          -e ENVIRONMENT=staging

Use Cases

Configuration Management

# Development
dcd cloud -e API_URL=https://dev-api.example.com

# Staging
dcd cloud -e API_URL=https://staging-api.example.com

# Production
dcd cloud -e API_URL=https://api.example.com

Secure Credentials

dcd cloud -e USERNAME=${CI_USERNAME} \
          -e PASSWORD=${CI_PASSWORD}

Best Practices

  • Never commit sensitive values

  • Use CI/CD secrets

  • Use UPPERCASE for variable names

  • Use descriptive names

PreviousApp ManagementNextDevice Orientation

Last updated 4 months ago

Was this helpful?