Setting up Jenkins item + Bitbucket

jenkins + bitbucket

In this article, I will share with you how I setup my Jenkins to get updates from Bitbucket.

Jenkins

Make sure you already installed Jenkins "Bitbucket Plugin"

  1. General
    This is where you put all the basic setting for your Jenkins item like Name, Description
  2. Source Code Management
    This is the part where you put your Bitbucket repository details.
    1. Put your repository URL in Repository URL input box.
    2. Credentials - The credentials for the repository URL. This should be your Bitbucket account credentials. Click the "Add" button beside the select box to create a new credential.
    3. Branch Specifier - The git branch you want to deploy. Usually you want to use "refs/heads/master" for the master branch.
  3. Build Triggers
    Tick "Build when a change is pushed to BitBucket"
  4. Build
    Click "Add build step" and select "Execute shell" and put all the shell commands you want to execute during build like running composer update and drush commands.
  5. Execute the build

Server

  1. Login to SSH
  2. Create a symbolic link of your workspace
    We need to create the symbolic link of your project workspace to the actual project that was setup in your web server like Apache.
    ln -sv /var/lib/jenkins/workspace/[your-cool-project] /var/www/html/[your-cool-project]

     

Follow these steps to install Jenkins on Ubuntu 16.04

Add new comment

This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.