Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Daniel Bayerlein
Daniel Bayerlein

Posted on • Edited on

     

Renovate meets Bitbucket Pipelines

Renovate

Renovate is an open source tool for keeping dependencies up to date automatically via pull requests. It is an alternative toGreenkeeper that only works withGitHub.

Bitbucket Pipelines

Bitbucket Pipelines brings continuous integration and delivery toBitbucket Cloud, empowering teams to build, test, and deploy their code within Bitbucket.

But how does Renovate work with Bitbucket Pipelines?

The first thing we need is a new repository with apackage.json:

{"name":"renovate","version":"1.0.0","description":"Multi-language dependency update automation","private":true,"scripts":{"start":"renovate"},"devDependencies":{"renovate":"^14.50.3"}}
Enter fullscreen modeExit fullscreen mode

Authentication

It is recommended to create a separate Bitbucket user (e.g.renovate-bot) for Renovate.
After thatcreate an app password and store it in theRENOVATE_PASSWORDenvironment variable.

Pipeline

In the root directory create the filebitbucket-pipelines.yml with the following content:

image:atlassian/default-image:2pipelines:custom:renovate:-step:caches:-nodescript:-git config --global user.email "bot@renovateapp.com"-git config --global user.name "Renovate Bot"-npm install-npm start
Enter fullscreen modeExit fullscreen mode

Use theatlassian/default-image:2 image because it comes with Node.js and Git by default.

Configuration

Renovate needs aconfiguration. Create this in the root directory. An exampleconfig.js looks like this:

module.exports={platform:'bitbucket',gitAuthor:'Renovate Bot <bot@renovateapp.com>',username:'renovate-bot',onboarding:true,onboardingConfig:{extends:['config:base']},repositories:['YOUR_USERNAME/YOUR_REPOSITORY','YOUR_USERNAME/YOUR_REPOSITORY','YOUR_USERNAME/YOUR_REPOSITORY']}
Enter fullscreen modeExit fullscreen mode

Very important are theplatform andusername keys. The value of theusername is the new user from step 1.

Test Run

Now you canmanually trigger the pipeline from Bitbucket Cloud.

An initial pull request is now created in the specified repositories.

Scheduled Pipelines

With thescheduled pipelines feature you can run the pipeline automatically at certain times.

Top comments(1)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss
CollapseExpand
 
vishyag profile image
vishyag
  • Joined

for this we need renovate bot account?

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

👨🏽‍💻 Web Dev & Consultant❤️ JavaScript, React and GraphQL😍 Full Stack Serverless🏗 AWS Community Builder
  • Location
    Bavaria, Germany
  • Work
    Senior IT Consultant at codecentric AG
  • Joined

More fromDaniel Bayerlein

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp