Excluding JDK Jobs Conditionally


I’m new to Travis, and I I would like to feedback, if possible.

My goal is to have all our JDK builds run during cron jobs. However, during pull requests, we would like to run only openjdk8 to run.

Based on what I read, this is configuration I created:

  - openjdk8
  - openjdk11

    - os: linux-ppc64le
      jdk: openjdk8
    - if: type = pull_request
      jdk: openjdk11
    - if: type = pull_request
      os: linux-ppc64le

Firstly, is this approach correct?

Secondly, when I request the build, it hangs in the job received for quiet a while. Is there a way to investigate why it’s queued for so long? For example, here’s one build – Travis CI - Test and Deploy with Confidence I don’t see any other build running to prevent it from moving forward.

Thank you for any help.

1 Like

From what I can see, it works! A pull request build, a regular build.

Wow, I didn’t know myself you could exclude jobs conditionally! Nice job! :tada:

I thought it was per project, but it’s per organization. Well, I guess I’ll just be more patient next time.

Thanks for the quick reply!