Skip to content

Commit

Permalink
fix: Bitrise android e2e linux builds (#7719)
Browse files Browse the repository at this point in the history
## **Description**

This PR uses `asdf` to install node and yarn versions during build
setup. Yarn setup was failing due to mismatch of node versions. The root
cause was traced down to Bitrise updating the configuration of the linux
image used to in the android builds. The specific node version did not
have yarn installed by default which cause the` yarn setup` step to
fail.

## **Related issues**

Fixes: NA

## **Manual testing steps**

1. Run this PR using the smoke test E2E workflow and it should pass. 

## **Screenshots/Recordings**

NA

### **Before**

Failing E2E:
https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/0501526b-ecd8-447d-b176-d6834586079c

### **After**

Passing E2E in comments below

## **Pre-merge author checklist**

- [x] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've clearly explained what problem this PR is solving and how it
is solved.
- [x] I've linked related issues
- [x] I've included manual testing steps
- [x] I've included screenshots/recordings if applicable
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
- [x] I’ve properly set the pull request status:
  - [ ] In case it's not yet "ready for review", I've set it to "draft".
- [x] In case it's "ready for review", I've changed it from "draft" to
"non-draft".

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

---------

Co-authored-by: Yande <andepandy@outlook.com>
  • Loading branch information
sethkfman and Andepande committed Nov 8, 2023
1 parent 42dde92 commit 088a1ae
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions bitrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,6 @@ workflows:
- activate-ssh-key@4:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone@6: {}
- nvm@1.3.0:
inputs:
- node_version: '18.17.1'
code_setup:
before_run:
- setup
Expand All @@ -133,6 +130,17 @@ workflows:
envman add --key YARN_CACHE_DIR --value "$(yarn cache dir)"
title: Get Yarn cache directory
- cache-pull@2: {}
- script@1:
inputs:
- content: |-
#!/usr/bin/env bash
echo "Node and Yarn being installed"
asdf global nodejs 18.18
asdf plugin add yarn
asdf list all yarn
asdf install yarn latest
asdf global yarn 1.22.19
title: Install node and yarn
- yarn@0:
inputs:
- command: setup
Expand All @@ -152,8 +160,6 @@ workflows:
# postinstall script modifications and could affect hoisting on subsequent installs.
- cache_paths: '$YARN_CACHE_DIR -> ./yarn.lock'
code_setup_dev:
before_run:
- setup
steps:
- script@1:
title: Generate `.npmrc` file for preview builds
Expand Down

0 comments on commit 088a1ae

Please sign in to comment.