Allow users specify different docker memory usage for different build

Issue #18863 new
Ronald Chia staff created an issue

As of now, the user can only specify Docker service memory that applies to all the builds.
However, some scenario users would like to test their integration and would like to have different and larger docker service memory to proceed further.

It will best to provide the ability to create multiple definitions for docker service so that users can specify specific docker service memory for specific build.

Configuration Suggestion:

definitions:
  services:
    docker:
      memory: 3024
    docker-1:
      memory: 7128

pipelines:
  branches:
# Build with 4GB memory allocated
    master:
      - step:
          script:
            - echo "Hello"
          services:
            - docker

  custom:
# Build with 8GB memory allocated
    integration-tests:
      - step:
          size: 2x
          script:
            - echo "Tests completed"
          services:
            - docker-1

Comments (1)

  1. Pavel Savchenko

    I’d just like to mention that there is no known way to specify size: 2x for a specified step as when that step runs in a docker container, as the default memory limit for a docker container (which is way lower than 7GB) is hit earlier and the step fails with “out of memory”.

    Due to the above, I’d consider this a critical bug in the existing feature, which should at the very least warrant a correction in the documentation.

  2. Log in to comment