When I pass test_branch or master directly like this --data '{ "branch": "master" }'
It works fine. But I need to pass a parameter like above. When I run the config with parameter, I see info: Branch not found
I have tried "${CIRCLE_BRANCH}" also but does not work
Could you tell me how to pass a generic value there ?
Unfortunately, the problem is not solved. It worked fine but now when I call this from branch_name = feature/B1
if [ "$CIRCLE_BRANCH" = "develop" ] || [ "$CIRCLE_BRANCH" = "feature/B1" ]; then
curl -X POST \
--header "Circle-Token: $CIRCLECI_API_TOKEN" \
--header "Content-Type: application/x-www-form-urlencoded" \
--url https://circleci.com/api/v2/project/bitbucket/......... \
-d "branch: $CIRCLE_BRANCH" <----- **develop branch is called here, i do not have develop now**
fi
echo $CIRCLE_BRANCH returns feature/B1 , but why in curl I see develop ??