Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add eas/submit and eas/downalod_artifacts functions #512

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

khamilowicz
Copy link
Contributor

@khamilowicz khamilowicz commented Feb 21, 2025

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/18836
  2. Add eas/submit and eas/downalod_artifacts functions #512

Copy link

linear bot commented Feb 21, 2025

@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-14736-add-eassubmit-function-group branch from 4aff381 to d78d100 Compare February 21, 2025 12:59
@khamilowicz khamilowicz marked this pull request as ready for review February 21, 2025 12:59
@khamilowicz khamilowicz marked this pull request as draft February 21, 2025 13:42
@khamilowicz khamilowicz marked this pull request as ready for review February 21, 2025 14:10
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-14736-add-eassubmit-function-group branch from d78d100 to 055ffcd Compare February 21, 2025 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant