eas-build icon indicating copy to clipboard operation
eas-build copied to clipboard

Add eas/submit and eas/downalod_artifacts functions

Open khamilowicz opened this issue 10 months ago • 1 comments

Why

ENG-14736: Add eas/submit function group ENG-14848: Add eas/download_artifact

User should be able to easily create custom build which both builds and submits an app. This PR implements eas/submit function group which can be used without configuration with the current eas/build function:

build:
  name: Build and Submit
  steps:
     - eas/build
     - eas/submit

Or with specified:

  • build id
  • artifact url
  • artifact path
build:
  name: Submit
  steps:
    - eas/submit:
        inputs:
          # optional parameters
          is_verbose_fastlane_enabled: true
          profile: development
          # These inputs are exclusive, only one can be provided
          application_archive_path: ${ step.some_other_step.archive_path }
          application_archive_url: http://expo.test/artifacts/eas/hKazUVCxF3aLxRMKcsDoPL.ipa
          build_id: 87991b81-d6de-4de5-88bb-cd910ec10972

Also, `eas/download_artifact' function is implemented, which downloads a file and optionally extracts it. The path to the file (or a directory with the unpacked content) is returned:

 build:
  name: Download
  steps:
    - eas/download_artifact:
        inputs:
          application_archive_url: http://expo.test/artifacts/eas/hKazUVCxF3aLxRMKcsDoPL.ipa

How

  • implemented a function group submit in the eas namespace
  • the iOS or the android path is selected based on current job's platform
  • if build id is not provided, EAS_BUILD_ID environment variable is used.
  • artifact url is obtained from eas build:view command. If profile is not explicitly provided, it defaults to the value found via this command.
  • the function looks for existing build artefacts in the working directory. if they are found and no additional arguments are provided, they are used for submission
  • the function fails if it founds more than one possible submission artifacts.
  • submission config is generated via eas submit:internal command

Test Plan

  1. Link eas build to the local turtle code
  2. start local www and turtle-v2 instances
  3. Submit the following custom builds (for both iOS and android):
build:
  name: Build and Submit
  steps:
     - eas/build
     - eas/submit
build:
  name: Submit
  steps:
    - eas/submit:
        inputs:
          application_archive_url: http://expo.test/artifacts/eas/existing-artifact-url.ipa
build:
  name: Submit
  steps:
    - eas/submit:
        inputs:
          build_id: existing-build-uuid
build:
  name: Download
  steps:
    - eas/download_artifact:
        inputs:
          application_archive_url: http://expo.test/artifacts/eas/hKazUVCxF3aLxRMKcsDoPL.ipa

Deploy plan

  1. https://github.com/expo/universe/pull/18902
  2. https://github.com/expo/eas-build/pull/512

khamilowicz avatar Feb 21 '25 12:02 khamilowicz

This stack of pull requests is managed by Graphite. Learn more about stacking.

khamilowicz avatar Apr 04 '25 09:04 khamilowicz