Skip to content

Production deployments in branches other than main not possible anymore #2267

Closed

Description

What is the location of your example repository?

No response

Which package or tool is having this issue?

CLI

What version of that package or tool are you using?

8.1.0

What version of Remix are you using?

No response

Steps to Reproduce

Scenario 1:

  1. Run this in your CLI in a branch hotfix/123
  2. Run npx shopify hydrogen deploy --env-branch="main" or npx shopify hydrogen deploy --env="Production"

Scenario 2:

  1. Run this in your CLI in the main branch
  2. Run npx shopify hydrogen deploy --env-branch="main-preview" or npx shopify hydrogen deploy --env="Preview"

Expected Behavior

Scenario 1: Deploy the hotfix/123 branch to Production environment
Why: When there is a bug in the live website, we want to deploy a fix for it without worrying about testing all other changes included in main. For this, it is required to deploy a branch that isn't main to Production

Scenario 2: Deploy the main branch to Preview environment
Why: Before deploying to Production, we'd like to test the changes in a Preview environment, to spot any bugs.

Why not test the preview environment in the PRs?

In PRs, the changes are deployed to a different Shopify Instance, where we have test data that isn't available for real customers.

We don't want to test PRs additionally in production as well, to avoid sending test user data to our analytics teams, and to make development faster.

Actual Behavior

Scenario 1:

  1. When using env-branch, the command runs, but deploys to Preview
  2. When using env, the command fails, warning that it shouldn't be used in CIs

Scenario 2:

  1. When using env-branch, the command runs, but deploys to Production
  2. When using env, the command fails, warning that it shouldn't be used in CIs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

BugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions