I had a Production environment.
I had a Staging environment based upon my Production environment.
I had a Dev environment based upon my Production environment.
I made a change on my Dev environment without creating a branch.
Because I wanted to maintain my traditional workflow, I ran forest set-origin Staging
which changed the basis of the Dev environment from Production to Staging (verified in UI).
I ran forest branch
to create a branch (yes, retroactively
).
forest push
pushed changes to Staging which agrees with the diagram in the documentation
Tested in Staging environment.
According to the documentation, forest deploy
should then take those changes on the branch and deploy them to Production but I got Cannot "deploy" to non-reference environment, please use "push"
What am I missing? I donāt see a CLI command that will change my environment so that I can deploy from Staging.
I was able to use the deploy to Production
feature in the UI and the changes are now live but Iād really like to understand the ācorrectā way. Also, this was simply adding a collection but we have some more complex changes planned and Iād like to get the hang of this dev flow before moving on.
Hey @Brett_Belka 
forest push
and forest deploy
uses your current FOREST_ENV_SECRET
to determine what to push/what to deploy.
It should be present in our documentation, but this point has been raised multiple time recently, so I guess itās not visible enough.
āDeploy to productionā on the UI is equivalent to FOREST_ENV_SECRET=<The env secret of staging> forest deploy
. Again, this was done to ease CI/CD integration.
Let me know if that helps.
Hey @jeffladiray
The explanation makes sense, but I think the implementation could maybe use some tweaking. The current setup makes sense for push
but deploy
needs tweaking.
With, what I would think is a fairly standard workflow, where you have a Dev (local), Staging (remote), and Production (remote) environment, I shouldnāt need to change an env variable to a value thatās not indicative of my current environment in order to deploy to production. It seems like forest deploy
should accept an āorigin_environmentā option or something of that nature. The only proper way that I have to deploy staging to production is in the UI - which runs contrary to this CLI model weāre trying to use.
Part of what Iām working on right now is internal documentation thatās specific to our preferred processes regarding FA. Being required to jump back and forth between CLI and UI is confusing.