Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Pipeline: running a custom image with more memory

Charles Cara August 10, 2018

I am trying to run a pipeline using a custom image and with increased memory.  But the bitbucket-pipelines.yml file below does not seem to use the azure-cli image (the az command is not found).

How should the pipeline be defined? 

(This is a snippet - the full version build a docker image and uploads it to Azure)

definitions: 
   services:
      mydeploy: 
         image: microsoft/azure-cli:latest
         memory: 6104 

options:
  docker: true


pipelines:
  default:
    - step:
        services: 
        - mydeploy
        size: 2x
        script:
          - az --version


 

1 answer

1 accepted

0 votes
Answer accepted
Philip Hodder
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 13, 2018

Hi Charles,

Can you go to a pipeline result page and hover your mouse over the service name? You should see something like this:

Screen Shot 2018-08-13 at 6.20.16 pm.png

Check that matches with what you've defined in your bitbucket-pipelines.yml.

Thanks,

Phil

Charles Cara August 13, 2018

Thanks for responding.

I don't get the Microsoft image.  Instead I get the default Atlassian one:

image: altassian/default-image:latest
Memory: 1064 MB
Philip Hodder
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 13, 2018

Can you try adjusting the spacing of your bitbucket-pipelines.yml to this instead:

definitions: 
   services:
      mydeploy: 
         image: microsoft/azure-cli:latest
         memory: 6104 

options:
  docker: true


pipelines:
  default:
    - step:
        services: 
          - mydeploy # Indented this line.
        size: 2x
        script:
          - az --version
Charles Cara August 13, 2018

HI Philip

Ths for your help, but that pipeline is still failing.  The 'mydeploy' service is now appearing at the top of page, but does not seem to be used for the 'az --version' command in the script.

Capture.PNG

Philip Hodder
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 13, 2018

Ah. I see now. :)

A service container is typically used as something like a separate process. Such as a database or queueing mechanism. The 'docker' is a bit special (mainly due to security requirements on our end), which may have confused you.

Can you try this configuration instead:

image: microsoft/azure-cli:latest
options: docker: true pipelines: default: - step: size: 2x script: - az --version

If you'd just like the CLI command (and a suitable build environment for windows dependencies), you can use the microsoft/azure-cli image as your build environment, instead of as a separate service container.

Like enrique piera serra likes this
Charles Cara August 13, 2018

Brilliant - that works.  I have the extra memory in the CLI container.

Thanks for your help.

Charles

 

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events