Only master branch detected and building

circle.yml

#1

Please help :slight_smile: I have a few branches in github but I can only see the master branch in my CircleCI projects. I thought CircleCI is supposed to detect all branches automatically.

I have used the default config file provided on project setup:

# Java Maven CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-java/ for more details
#
version: 2
jobs:
  build:
    docker:
      # specify the version you desire here
      - image: circleci/openjdk:8-jdk

      # Specify service dependencies here if necessary
      # CircleCI maintains a library of pre-built images
      # documented at https://circleci.com/docs/2.0/circleci-images/
      # - image: circleci/postgres:9.4

    working_directory: ~/repo

    environment:
      # Customize the JVM maximum heap limit
      MAVEN_OPTS: -Xmx3200m

    steps:
      - checkout

      # Download and cache dependencies
      - restore_cache:
          keys:
          - v1-dependencies-{{ checksum "pom.xml" }}
          # fallback to using the latest cache if no exact match is found
          - v1-dependencies-

      - run: mvn dependency:go-offline

      - save_cache:
          paths:
            - ~/.m2
          key: v1-dependencies-{{ checksum "pom.xml" }}

      # run tests!
      - run: mvn integration-test

I would upload more images but I’m a new user so I am limited to only one image… github link is here


#2

Sorry for the trouble. Solved my own issue. New to CI / CD and realised you had to push a change to the repo first before it will detect the branch and start a build.


#3