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
We are trying to set the value for the environment_type parameter dynamically using the following logic based on the branch being updated while keeping the value as one from the enum
- run:
name: Set environment type
command: |
if [ "${CIRCLE_BRANCH}" == "main" ]; then
export environment_type="production"
elif [ "${CIRCLE_BRANCH}" == "staging" ]; then
export environment_type="staging"
elif [ "${CIRCLE_BRANCH}" == "dev" ]; then
export environment_type="development"
fi
- jira/notify:
pipeline_id: << pipeline.id >>
pipeline_number: << pipeline.number >>
environment: $CIRCLE_BRANCH
environment_type: $environment_type
job_type: deployment
However, the workflow fails with the following error before the pipeline runs.
Type error for argument environment_type: expected type: enum ("production" "staging" "testing" "development" "unmapped"), actual value: "$environment_type" (type string)
This workflow triggers directly from GitHub when a new commit is pushed to one of the environment branches so we cannot add trigger parameters for each branch and environment separately.
What do you think is the best way to do this dynamically? Will it be possible to convert the environment_type parameter to a string type to prevent circleCI from stopping the pipeline from triggering?
The text was updated successfully, but these errors were encountered:
We are trying to set the value for the
environment_type
parameter dynamically using the following logic based on the branch being updated while keeping the value as one from the enumHowever, the workflow fails with the following error before the pipeline runs.
This workflow triggers directly from GitHub when a new commit is pushed to one of the environment branches so we cannot add trigger parameters for each branch and environment separately.
What do you think is the best way to do this dynamically? Will it be possible to convert the
environment_type
parameter to astring
type to prevent circleCI from stopping the pipeline from triggering?The text was updated successfully, but these errors were encountered: