How to use branch filters with IP ranges

Overview

IP ranges is a feature for CircleCI customers who need to configure IP-based access to their restricted environments using existing wokflows and platforms. As part of this feature, CircleCI provides a list of well-defined IP address ranges associated with the CircleCI service. CircleCI jobs that have this feature enabled will have their traffic routed through one of the defined IP address ranges during job execution.

 

You may want to only enable IP ranges for a specific branch. To do this, you can use IP ranges in co-junction with branch level job execution

 

Example:

version: 2.1
jobs:
  build:
    circleci_ip_ranges: true # opts the job into the IP ranges feature
    docker:
      - image: curlimages/curl
        auth:
          username: mydockerhub-user
          password: $DOCKERHUB_PASSWORD  # context / project UI env-var reference
    steps:
      - run: echo “Hello World”
workflows:
  build-workflow:
    jobs:
      - build:
filters:
branches:
only: deploy

 

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

Comments

0 comments

Article is closed for comments.