Jobs inside stages not executing in parallel

I have tried various configurations inside stages but I am unable to make travis execute jobs in parallel inside stages.

I have gone through these links:

This one snippet of the travis yaml

dist: trusty
language: java
sudo: true
group: bluezone
jdk: openjdk11
services:
  - docker

branches:
  only:
    - develop

before_cache:
  - rm -f  $HOME/.gradle/caches/modules-2/modules-2.lock
  - rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
  apt: true
  directories:
    - $HOME/.gradle/caches
    - $HOME/.gradle/wrapper
    - $HOME/.cache/pip
install:
  # Install Ansible.
  - sudo apt-get update
  - sudo apt-get install python3
  - sudo -H pip install --upgrade pip
  - sudo -H pip install ansible
  - sudo apt-get install sshpass

jobs:
  include:
    - stage: "Build and Deploy"
      script: ./playbooks/dev/deploy_image.sh
    - &fvt
      stage: test
      script: ./qa/src/test/resources/test1.sh
    - <<: *fvt
      script: ./qa/src/test/resources/test2.sh

and this is another snippet (The section above jobs.include is not pasted as it is same as the 1st snippet):

jobs:
  include:
    - stage: "Build and Deploy"
      script: 
      - ./playbooks/dev/deploy_image.sh
    - stage: "FVT"
      name: "A"
      script:
      - ./qa/src/test/resources/test1.sh
    - stage: "FVT"
      name: "B"
      script:
      - ./qa/src/test/resources/test2.sh

When reporting problems, please consider including:

  1. What you are trying to achieve
  2. What you have tried (probably a link to the configuration)
  3. What happened instead (often, pointing to a build log URL, in the form of https://travis-ci.com/OWNER/REPO/build/NNNNNNN would be helpful).

The title itself says that jobs are not executing in parallel.

Unfortunately, I cannot link the travis repo here because it’s a private repo.

Do you know what are the possible reasons for the jobs inside stages not executing in parallel?

They could be queued simultaneously, but one of them could be held in the queue for a few different reasons. Your organization might be running too many jobs, and your repo might have a limit on the number of concurrent jobs. Without concrete information, we cannot really help you. If you wish to discuss it in private, please email support@travis-ci.com.

So, I figured what the problem was.

I changed the concurrent build setting to two and parallel jobs inside stages started working


but this caused a side effect to our builds because our builds depend on external servers to test the build we deploy to.

Is there a way to only allow parallel builds inside stages and limit to 1 concurrent build?

@BanzaiMan Any updates?

Then there is no need to have these in the same stage. Just separate them into different stages. “Build 1”, “Build 2”, “Build 3”, etc.

Imprint