expo / eas-cli

Fastest way to build, submit, and update iOS and Android apps
https://docs.expo.dev/eas/
MIT License
824 stars 84 forks source link

Unable to extend multiple build profiles #2664

Open dannyBies opened 1 week ago

dannyBies commented 1 week ago

Summary

I am trying to enable Maestro E2E tests in my project. I have to run my tests in multiple different environments and thus would like to reuse common shared config like this:

"e2e": {
      "withoutCredentials": true,
      "config": "build-and-maestro-test.yml",
      "android": {
        "buildType": "apk",
        "image": "latest"
      },
      "ios": {
        "simulator": true,
        "image": "latest"
      }
    },

I would then like to use this base profile together with my environment specific profile. This is currently not possible as I'm not able to pass in an array of profiles to extend from. I'd like to be able to pass in an array of profiles in which the last specified profile takes precedence in case the same config gets used in multiple profiles. This is needed as I need access to the profile specific env variables + the e2e config but I don't want to redefine my env variables as this makes it easy to accidentally make a mistake.

Example code of what I would like:

"e2e": {
      "withoutCredentials": true,
      "config": "build-and-maestro-test.yml",
      "android": {
        "buildType": "apk",
        "image": "latest"
      },
      "ios": {
        "simulator": true,
        "image": "latest"
      }
    },
"qa": {
      "distribution": "internal",
      "autoIncrement": true,
      "env": {
        "EXPO_PUBLIC_APP_VARIANT": "qa",
        "EXPO_PUBLIC_API_URL": "...",
        "...": "...",
      }
    },
"qa:e2e: {
      "extends": ["qa", "e2e"]
}

As I need to manage many different profiles this would make it much easier to reuse different profiles and reduce the chance of making mistakes.

Managed or bare?

Managed

Environment

expo-env-info 1.2.0 environment info: System: OS: macOS 15.0.1 Shell: 5.9 - /bin/zsh Binaries: Node: 20.10.0 - /usr/local/bin/node Yarn: 3.6.4 - /usr/local/bin/yarn npm: 10.9.0 - /usr/local/bin/npm Managers: CocoaPods: 1.15.2 - /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: DriverKit 23.2, iOS 17.2, macOS 14.2, tvOS 17.2, visionOS 1.0, watchOS 10.2 Android SDK: API Levels: 33, 34 Build Tools: 30.0.3, 33.0.1, 34.0.0, 35.0.0 System Images: android-29 | Google Play ARM 64 v8a, android-34 | Google APIs ARM 64 v8a, android-34 | Google Play ARM 64 v8a, android-UpsideDownCakePrivacySandbox | Google Play ARM 64 v8a IDEs: Android Studio: 2024.1 AI-241.19072.14.2412.12360217 Xcode: 15.2/15C500b - /usr/bin/xcodebuild npmPackages: expo: ^50.0.17 => 50.0.17 expo-router: ~3.4.8 => 3.4.8 react: 18.2.0 => 18.2.0 react-native: 0.73.6 => 0.73.6 npmGlobalPackages: eas-cli: 12.6.0 expo-cli: 6.3.12 Expo Workflow: managed

Error output

No response

Reproducible demo or steps to reproduce from a blank project

N/A

szdziedzic commented 17 hours ago

This is a valid idea 👍 I can't promise any dates though, because we are currently under a heavy workload.

expo-bot commented 17 hours ago

Thank you for filing this issue! This comment acknowledges we believe this may be a bug and there’s enough information to investigate it. However, we can’t promise any sort of timeline for resolution. We prioritize issues based on severity, breadth of impact, and alignment with our roadmap. If you’d like to help move it more quickly, you can continue to investigate it more deeply and/or you can open a pull request that fixes the cause.