You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use this feature to make sure I deploy to my correct gcp project and that my releases tags are formatted correct;y. However, it seems I may have misunderstood the use of it.
I have two environments:
Prod
Staging
In my workflow I have a matrix with the two environments:
The idea is only the environment which matches the release will deploy successfully (is this a bad approcah to achieving that?).
To ensure that I have set up the following Deployment branches and tags:
prod:
branch: main
staging:
branch: dev
With this setup I would expect the workflow to start one job for each of the environments on a release publish. So far so good. The next thing In would expect is that prod will fail (not deploy) if the target branch of the release is not main and vice versa, if the target branch is not dev I expect staging to not deploy.
However, they both succeed no matter what branch the release targets.
Have I completely misunderstood the purpose of this feature?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Select Topic Area
Question
Body
Hi,
I am trying to use this feature to make sure I deploy to my correct gcp project and that my releases tags are formatted correct;y. However, it seems I may have misunderstood the use of it.
I have two environments:
In my workflow I have a matrix with the two environments:
The idea is only the environment which matches the release will deploy successfully (is this a bad approcah to achieving that?).
To ensure that I have set up the following Deployment branches and tags:
prod:
branch: main
staging:
branch: dev
With this setup I would expect the workflow to start one job for each of the environments on a release publish. So far so good. The next thing In would expect is that prod will fail (not deploy) if the target branch of the release is not main and vice versa, if the target branch is not dev I expect staging to not deploy.
However, they both succeed no matter what branch the release targets.
Have I completely misunderstood the purpose of this feature?
Beta Was this translation helpful? Give feedback.
All reactions