Overriding executor for job from orb

gradle

#1

Hi.

I’m trying to use a job from circleci/gradle@1.0.1 to run my tests. However, the executor image defined in the orb uses java8 while we need java11. Is there any way to override the executor from an orb?

Something like this:

orbs:
  gradle: circleci/gradle@1.0.1
executors:
  java_11:
    docker:
      image: circleci/openjdk:11-jdk-sid

workflows:
    checkout-build-test:
      jobs:
        - gradle/test:
            test_command: test
            executor: java_11

#2

Hello @tommybo-entur,

You make an excellent point. I do not have an immediate solution for you outside of duplicating the orb with your modification.

However, we are going to look into this and most likely allow executors as a parameter to deal with this. https://github.com/CircleCI-Public/circleci-orbs/issues/88

We’ll try to get that resolved shortly! Thank you again.


#3

Thanks for the request @tommybo-entur!

Just merged a PR to add this feature—check the registry shortly for the latest version of the Gradle orb :slight_smile:


#4

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.