.. _bitbucket_pipelines: .. highlight:: yaml Bitbucket Pipelines =================== 1. Update your ``bitbucket-pipelines.yml`` to include a Lager step :: pipelines: default: - step: name: Lager image: lagerdata/lager-cli@v0.1.41 script: # Modify the commands below to build your repository. - lager connect --device nrf52 --interface ftdi --transport swd --gateway majestic-moose --force - lager testrun --serial-device /dev/ttyACM0 --hexfile test-example.hex --gateway majestic-moose 2. Add ``LAGER_SECRET_TOKEN`` as a secure repository variable .. figure:: /_static/img/bitbucket-1.png :scale: 50 % :alt: Image of repository page with arrow pointing to "Repository settings". :align: center On your repository page, click "Repository settings" .. figure:: /_static/img/bitbucket-2.png :scale: 50 % :alt: Image of repository settings page with arrow pointing to "Repository variables". :align: center Scroll down on the left side and click "Repository variables" .. figure:: /_static/img/bitbucket-3.png :scale: 50 % :alt: Image of repository variables page LAGER_SECRET_TOKEN filled in for name, and a starred-out value. :align: center For the name, enter ``LAGER_SECRET_TOKEN``. The value can be retrieved from your `account page `_. Make sure "Secured" is checked. .. figure:: /_static/img/bitbucket-4.png :scale: 50 % :alt: Image of repository variables page after clicking "Add". :align: center Click "Add" to save your repository variable