Hello, I have a requirements as follow:
We have two cluster, dev and prod, and our team appointed:
develop branch -(deploy to )-> dev env -(use)-> drone.dev.domain.com
master branch -(deploy to)-> prod env -(use)-> drone.prod.domain.com
My questions is how to trigger branch from secret, like:
trigger:
environment:
BUILD_BRANCH:
from_secret: build_branch
branch:
- ${BUILD_BRANCH}
build_branch
is a secret i configured as develop or master, I know i can use different .drone.yml whit conditions in between this two branches. However, when i merge branch or create PR, the .drone.yml will be overridden.
I have tried to config .drone.yml like this:
steps:
- name: build
image: node
environment:
BUILD_BRANCH:
from_secret: build_branch
commands:
- yarn install
when:
branch:
- ${BUILD_BRANCH}
It seems that it can’t works. What should i do? Thanks.