Can I change the value of circleci_ip_ranges based on the branch?

Changing IP Ranges Based on Branch

You can utilize the workflow filtering feature to allow only specific jobs containing circleci_ip_ranges: true to run.

Example

The following example should enable a workflow where depoly_prod would only run on main branch. All the other branches will simply run deploy_dev and main branch would not run:

workflows:
  version: 2
  dev-prod:
    jobs:
      - deploy_dev:
          filters:
            branches:
              ignore: main
      - depoly_prod:
          filters:
            branches:
              only: main

Additional Resources

Branch-level job execution

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.