It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Contest: Share your custom Bitbucket Pipe and win Edited

Kelvin_Yap Atlassian Team Dec 18, 2019

Announced in this blog, this holiday season we’re celebrating all things CI/CD and between now and the end of 2019 we’ll be showcasing content, use cases, feature announcements and more.

One feature we added to help teams build and automate their CI/CD pipelines in Bitbucket Cloud were Pipes. With over supported 50 pipes available that let you test, deploy, scan, or manage artifacts with many of the industry’s leading vendors, it’s trivial to set up the external services your team uses across your pipelines and repositories. Best of all, these supported pipes are updated and maintained by the author meaning you never have to worry about updating or re-configuring them yourself.

But there’s no one-size-fits-all approach to software development and developers have their own preferences in terms of how they build software and the tools they want to use. As such we’ve made it easy to create your own custom pipes, allowing teams the freedom to automate and integrate their CI/CD pipeline to meet their specific needs and requirements.

Creating a custom pipe

Creating a custom pipe simplifies the configuration of your CI/CD pipeline and makes re-use easy and efficient. A custom pipe would be useful in situations where:

  • The same action is performed in several steps of your pipeline

  • Similar tasks are run in multiple repositories

  • An action being performed needs dependencies that your main pipeline doesn't have

  • Connecting with an external service to make it easier to use in pipelines

Full instructions on how to create a custom pipe can be found here, and below are guides and examples of custom pipes you can learn and gain inspiration from:

Share your custom pipe and win!

In the spirit of giving this holiday season we want you to tell us about the custom pipes you’ve built! Simply share your pipe repository with us in a comment below, along with a description of what your pipe does and how it helps your CI/CD workflow. You have until 29 February, 2020 to share your custom pipe and we’ll randomly choose a few submissions to win a limited edition Bitbucket bomber jacket.

Best of luck!

6 comments

I’m running a couple of small Spring Boot based projects in a Kubernetes cluster on IBM cloud. Until now I was always building the docker images locally with a small shell script. Pushed them to Docker Hub and also triggered a rollout on my Kubernetes cluster manually.

I’m following your #12daysofCICD on Twitter and already learned a lot about the Pipelines feature of Bitbucket. This contest here got me thinking that I could invest some time to convert my helper-scripts that I run locally into a custom pipe.

So here it is: https://bitbucket.org/rgruber/ibm-k8s-pipe

I used a base docker image which IBM provides that already contains the IBM cloud tools as well as kubectl. So my pipe is essentially a bash script which uses the IBM cloud tools to log in and retrieve the KUBECONFIG. Then kubectl is used to trigger a rollout, which will fetch the latest docker image used by the deployment and restart the pods associated to it.
So the idea is, that your project has a pipeline with a couple of steps. First would be the maven build. Then the docker build and push to Docker Hub. And the final step would be my new pipe, which would trigger the rollout of new image from Docker Hub to the Kubernetes cluster.
The pipe is fully documented, so please do not hesitate to look at https://bitbucket.org/rgruber/ibm-k8s-pipe/src/master/README.md for more details.

I had a lot of fun building this custom pipe and learning a lot about Bitbucket Pipelines along the way. Hope you enter me into the contest for winning one of these awesome looking Bitbucket jackets! I would be thrilled to win a jacket and of course I’m looking forward for more #12daysofCICD.
Happy Holidays to all of you at Atlassian!

For those of you interested in my "ibm-k8s-pipe", I created a small show-case repo. It shows how I use my custom pipe in the same way as I use it in my real private repos.

You can see how the "deployment.yaml" in my Kubernetes deployments typically looks like. And you can see the full pipeline I use to build the project, create a docker image out of it and finally run my custom pipe to roll-out the new docker image to my Kubernetes cluster.

 

Check out the show-case at:

https://bitbucket.org/rgruber/ibm-k8s-pipe-showcase/src/master/

I created a simple Tomcat Deployment Pipe that helps you deploy your WAR applications using Tomcat Manager directly from the BitBucket Pipeline.

It is already used in my current deployments and should work fine with Tomcat 7+, but if you find any bugs or experience any issues, don't hesitate to report them!

You can find all the details here:
https://bitbucket.org/cloudfolksio/bitbucket-tomcat-deploy-pipe

I created a pipe to deploy my company's applications to AWS using the new AWS CDK for infrastructure as code.

You can find it here: https://bitbucket.org/sightsoundtheatres/aws-cdk-deploy/

I'm a big Telegram messenger fan. We also use Telegram groups at work where CI/CD pipelines posts information about new builds or successful builds or test runs.

So I built a pipe for Bitbucket which can be added to any pipeline and allows us to send a message via a Telegram bot to a Telegram group or channel.

You can find my pipe here:
https://bitbucket.org/TamaraWeber/telegram-pipe/

The documentation of the pipe contains all the needed information on how to get hold of the Telegram bot and how to connect the pipe to the bot. From there it's as simple as adding the pipe at whatever step of your CI/CD pipeline and define the message which you want to send out at that point of your pipeline.

I have created a pipeline to deploy your code to the Google Cloud Functions. You can check it out here.

@Kelvin_Yap could you share any photos of the contest winners?
I'm so curious how those fancy BitBucket jackets present in day light!

@Radek Antoniuk I'm wondering too. I contacted @Kelvin_Yap a while ago. He wrote that he will be "announcing the winners on the post early next week". But that was a couple of weeks ago already. My best guess is that the current worldwide situation messed up their schedule. I hope that they do announce the winners eventually. It's strange times right now after all.

Like Radek Antoniuk likes this

Comment

Log in or Sign up to comment
Community showcase
Published in Bitbucket

Bitbucket Server 7.0 is here!

Hello Community, I’m Anton Genkin, a product manager on the Bitbucket Server and Data Center team and am excited to share that Bitbucket Server 7.0 is now available! It's a platform release, one th...

271 views 3 2
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you