DEV Community

Karthik
Karthik

Posted on

2

Streamlining Expo Build Pipeline with Bitbucket: An Admin and Developer Guide

Admin Setup:

Step 1: Login Using Admin Account

Begin by logging into Expo using the administrator account that will manage the organization.

Step 2: Create an Organization in Expo

Navigate to the Expo dashboard and create a new organization for your project. This organization will serve as the central hub for collaboration and development.

Step 3: Create a Robot User and Access Token

In Expo, generate a robot user to handle the automated build processes. Create an access token for this user, which will be utilized in the Bitbucket pipeline.

Step 4: Save Access Token in Bitbucket

For secure integration, save the generated access token as an environment variable (EXPO_TOKEN) in Bitbucket. This token will authenticate Expo during the build process.

Step 5: Bitbucket Pipeline YAML File

Create a Bitbucket pipeline YAML file in the root of your project. This file will define the steps for testing and building your Expo project.

Below is a sample bitbucket pipeline file to build an expo application in production profile

`image: node:18.14.0

pipelines:
branches
main:
- step:
name: Build and Deploy to Production
deployment: production
script:
- npm install -g @nrwl/cli
- npm install -g nx
- npm install -g expo-cli
- npm install
- npx nx affected:build --base=main --platform all --non-interactive --no-wait
`

Step 6: Invite Users to Organization

Invite all relevant users, including developers, to the Expo organization with read access. This ensures that they can join the organization and contribute to the project seamlessly.

Developer Onboarding:

Step 1: Sign Up to Expo

For developers, the process begins with signing up for an Expo account. This account will be linked to the organization created by the admin.

Step 2: Join the Organization

Upon signing up, developers will receive an email invitation to join the organization on Expo. Click on the provided link to join the organization and gain access to the project.

By following these steps, both administrators and developers can collaborate efficiently using Expo and Bitbucket, establishing a robust build pipeline for Expo projects.

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay