I wanted to know if there is a way we can contribute a MATLAB based template for Bitbucket pipeline users so that they simply choose our template on the below shown screen and use MATLAB commands in their workflow. I couldn't find any documentation mentioning how you can do so. Are all the following templates prepared and provided by Bitbucket/Atlassian themselves? If not, can you guide me to the process of adding one?
Thanks,
Kapil
Hello @Kapil Gupta and welcome to the Community!
The available templates provided to the user during the pipeline onboarding are created by the Bitbucket engineering team. While we currently don't have a process for vendors and the community to contribute with the templates, we do have a process in place if you are willing to develop a custom pipe for your product.
The following resource provides instructions on how third parties can contribute with a pipe:
Thank you, @Kapil Gupta !
Patrik S
Hey @Patrik S , thanks for your response!
We originally were discovering if it would be feasible for us to develop an official pipe for the users but realized the pipes functionality is not supported on self-hosted runners. This made us move towards a template based approach for informing users on how to use MATLAB with Bitbucket pipelines.
Regards,
Kapil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Kapil Gupta ,
The usage of pipes is supported for Linux Docker self-hosted runners, and you can configure the pipe on the YML file the same way you would when using the cloud runners.
Pipes are only not supported when using Linux Shell, Windows, or macOS runners, because those runners are executed directly in a shell session, and pipes are essentially a docker image, so they need to be executed on a container environment.
Thank you, @Kapil Gupta !
Patrik S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Patrik S ,
I see pipes are usable with Linux Docker self-hosted runners. Since docker is also available on Windows and macOS, are there any plans to add Windows docker and macOS docker support with Bitbucket pipelines, similar to what we have for Linux docker.
Regards,
Kapil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Kapil Gupta ,
Docker Desktop for Windows and macOS actually runs in a Linux virtual machine under the hood, so in theory, you should be able to run the Linux docker containers in a Windows and/or macOS environment with Docker Desktop. The pipes should work just fine as well as they are treated like normal containers.
However, given the extra layer of complexity added by virtualization, you might have an impact on performance or unexpected errors when running in a non-Linux host.
Thank you, @Kapil Gupta !
Patrik S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Patrik S ,
Thanks a lot for your responses, it really helped in clarifying things a lot more.
Since we are on this topic, are all bitbucket pipeline hosted agents linux based? It would be helpful if you could shed some light on what type of agents are provided when a user decides to run on Bitbucket's infrastructure.
Regards,
Kapil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Kapil Gupta
You're correct, all the cloud runners (the agents that run on Bitbucket infrastructure) are based on Linux.
So if you configure your step to run on atlassian infrastructure, it will run on an instance based on Linux.
Thank you, @Kapil Gupta !
Patrik S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Patrik S ,
Thanks for all the info!
You mentioned we can use pipes on a self hosted linux docker runner and to add a linux docker we can use this doc. When I try to add a repository runner on my Debian 11 machine, it errors out saying that the value provided is not a valid uuid even though I am using the exact command as provided. I have attached images for the error, can you please have a look and let me know what might be the issue?
Small addition to previous question:
Thanks and regards,
Kapil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Kapil Gupta ,
The error on the screenshot is returned when the UUID in the pre-defined runner command is not valid. This may be happening due to a copy/paste operation inserting invalid characters or line breaks in the command. I would suggest first copying to a text editor and then from the text editor copy to the terminal.
I also saw this error happening when using the bash terminal, so you can try executing the runner command in the sh terminal instead. To do that you can open the terminal on the host machine and execute the following sequence of commands:
$ sh # open the SH shell. Next instructions will be executed on SH
$ docker container run -it <rest of the command> # the pre-defined runner command you received when creating it
You can test the suggestion above and let us know how it goes.
As for your other questions, all bitbucket-hosted machines run in a Kubernetes cluster that uses Ubuntu. You can find more details in our Infrastructure Changes on BItbucket Pipelines page.
Thank you, @Kapil Gupta !
Patrik S
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.