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
Hi Charles,
Can you go to a pipeline result page and hover your mouse over the service name? You should see something like this:
Check that matches with what you've defined in your bitbucket-pipelines.yml.
Thanks,
Phil
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Brilliant - that works. I have the extra memory in the CLI container.
Thanks for your help.
Charles
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.