EkLine Bitbucket Integration Guide
This guide walks you through setting up the EkLine integration with Bitbucket.
Prerequisites
Section titled “Prerequisites”- You have an EkLine integration token. You can obtain this by visiting the EkLine dashboard and clicking on the View Integration Token button.
- You have a Bitbucket account and the necessary permissions to configure pipelines.
Create bitbucket-pipelines.yml file
Section titled “Create bitbucket-pipelines.yml file”Create a new file named bitbucket-pipelines.yml in your project’s root directory and add the following content:
runEkLineStep: &runEkLineStep name: EkLine Documentation Review image: name: ghcr.io/ekline-io/ekline-ci-cd:v6.8 script: - export EK_TOKEN=$EK_TOKEN - export INPUT_CONTENT_DIR='<path_to_content_directory>' # Uncomment and configure the following lines to use additional options: # - export INPUT_EXCLUDE_DIRECTORIES='<dir1>,<dir2>' # - export INPUT_EXCLUDE_FILES='<file1.md>,<file2.txt>' # - export INPUT_STYLE_GUIDE='GOOGLE' - /entrypoint.sh
pipelines: branches: main: - step: *runEkLineStep
pull-requests: '**': - step: *runEkLineStepReplace <path_to_content_directory> with the actual path to your content directory.
Configure Bitbucket environment variables
Section titled “Configure Bitbucket environment variables”- In Bitbucket, navigate to your repository settings.
- Go to Repository settings > Pipelines > Repository variables.
- Add the following variables:
EK_TOKEN: Your EkLine integration token.
Configure input options
Section titled “Configure input options”Ignoring specific rules (Optional)
Section titled “Ignoring specific rules (Optional)”To ignore specific rules during the review process, you can use the INPUT_IGNORE_RULE flag. This flag accepts a comma-separated list of rule identifiers that you wish to skip.
For example, if you want to ignore rules EK00001 and EK00004, you can set the INPUT_IGNORE_RULE flag in your configuration like this:
INPUT_IGNORE_RULE: "EK00001,EK00004"