Deploy Script on Feature Branch

I know this question has been asked a many of times; but I still don’t get why I can’t specify my feature branch instead of my master branch.

I get the following error:

Skipping a deployment with the script provider because this branch is not permitted: features/impl-aws-sign-up-ws

Here is what my travis.yml looks like:

matrix:
  include:
  - language: java
    jdk: oraclejdk13
    cache:
      directories:
      - "$HOME/.m2"
    deploy:
      provider: script
      script: mvn deploy -Drun.jpa.tests=false
      on:
        branches:
          only:
            - features/impl-aws-sign-up-ws`

I also tried the variation of

on

:

on:
        all_branches: true

and

on:
        branch: features/impl-aws-sign-up-ws

Each time I get the same error.

So here are my questions:

  • Do I have to do something more on the travis-ci side to get this to work?
  • Do I have to do something on the GitHub side to get this to work?
  • Do I have to do something on the AWS side to get this to work?

Here is the lastest Travis-CI build

Thank you.


It’s deploy.on.branch, not deploy.on.branches. The default is to deploy only on the master branch, so it is skipped.

Actually they both work! deploy.on.branch and deploy.on.branches work. The root cause to my issue is that my travis.yml file originally had to jobs configured in it. I removed one of the jobs; but did not remove the matrix.include from my travis.yml file. After removing this, my travis.yml file looks like this:

language: java
jdk: oraclejdk13
cache:
  directories:
  - "$HOME/.m2"
deploy:
  provider: script
  script: mvn deploy -Drun.jpa.tests=false
  skip_cleanup: true
  on:
    branch: features/impl-aws-sign-up-ws

Thank you for responding.

Imprint