Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

I want to allocate more resources to my pipeline for docker build

mayank Sharma
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 25, 2024

With the new 4x and 8x size capabilities, how do i use the max memory and CPU to accomodate a large project build requirements. Is there a way to explicitly define memory and CPU in pipeline.yml. PFB curretn yaml


image: atlassian/default-image:2

pipelines:
tags:
'*[0-9].*[0-9].*[0-9]-*':
- step:
name: dev-release
image: atlassian/default-image:2
deployment: staging
clone:
enabled: true
services:
- docker
size: 8x
caches:
- maven
- gradle
script:
- docker login --username $HUB_USERNAME --password $HUB_PASSWORD
- VERSION=${BITBUCKET_TAG}
# build the Docker image (this will use the Dockerfile in the root of the repo)
- docker build -f Dockerfile.pipeline -t myrepo/jupyter-notebook:${BITBUCKET_TAG} . --build-arg build_version=$VERSION
# push the new Docker image to the Docker registry
- docker push myrepo/jupyter-notebook:${BITBUCKET_TAG}

definitions:
services:
docker:
memory: 4096

1 answer

1 vote
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 27, 2024

Hi mayank,

Memory allocation is customizable, whereas CPU will remain as a set amount depending on the option selected:

  • 4x builds will be provisioned with 8 CPU cores and 16GB of memory.
  • 8x builds will be provisioned with 16 CPU cores and 32GB of memory.

Allocating memory to service containers functions the same way as before, we have documentation that covers this below:

Cheers!

- Ben (Bitbucket Cloud Support)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events