Build skipping the 'deployment' section


#1

Hey guys,

Apologies in advance if I’m hitting a snag that has been encountered by others before me. I tried searching through the forums here and was unable to find a similar issue.

The circle.yml file I have has machine, checkout, dependencies, compile, test, and deployment sections. While I am getting successful builds on the develop branch, each build is skipping the deployment section (listed below).

The build environment is Ubuntu 14.04, and the process generates a container with a golang app. I have a very similar build generating a container running a node application in which the deployment section executes (not sure if this makes any difference).

Hoping for some insight on what’s going wrong.

deployment:
  #...
  gcp:
    branch: [develop]
    commands:
      - echo 'Deploying develop'
      #...
      - ./deploy/auth.sh

    branch: [master]
    commands:
      #...
      - ./deploy/auth.sh
      - kubectl #...

Let me know if there is anything else I can provide.

Thanks


#2

The deployment sections should only have one branch and commands section for each label. Can you try this instead:

deployment:
  #...
  develop:
    branch: [develop]
    commands:
      - echo 'Deploying develop'
      #...
      - ./deploy/auth.sh

  master:
    branch: [master]
    commands:
      #...
      - ./deploy/auth.sh
      - kubectl #...

Let us know if that helps or not.


#3

Thanks Tom! That did it.


#4