Warning
The information in this repository is subject to change without notice and does not constitute a commitment by IAR. While it serves as a valuable reference for DevOps Engineers implementing Continuous Integration with IAR Tools, IAR assumes no responsibility for any errors, omissions, or specific implementations.
From a CI/CD perspective, the IAR Build Tools for Arm comes with everything you need to build embedded firmware projects from the command line. This tutorial provides a simple example with general guidelines on how to set up a CI/CD pipeline using Bitbucket while taking advantage of the so-called Bitbucket self-hosted runners.
In case you need an introduction on how to get started with Bitbucket, refer to Getting started with Bitbucket.
Before you begin, you will need to download and install the following:
- IAR Build Tools for Arm 9.60.2 for Ubuntu 22.04 x64 (
bxarm-9.60.2.deb
)- IAR customers can download it directly from IAR MyPages. If you do not have a license, contact IAR Sales.
You also will need
Under your Bitbucket account:
- Click
Import repository
. (https://bitbucket.org/<username>/workspace/repository/import
) - Fill Old repository with this repository's URL.
- Set the Project name*. (e.g.,
ci
) - Set the Repository name*. (e.g.,
bx-bitbucket-ci
) - Set the Access level to [x] Private.
- Finally click Import repository.
Once the importing process is complete, Bitbucket will take you to your newly imported repository.
On your private repository, navigate to bitbucket-pipelines.yml workflow file. This file uses the Bitbucket-flavored YAML to describe an example of a pipeline workflow containing multiple jobs typically performed in embedded firmware projects.
Note
- Refer to the bitbucket-pipelines.yml workflow file for detailed comments.
- Learn how to configure your pipeline.
Bitbucket makes it easy to setup a new self-hosted runner in a Linux host. Add a self-hosted runner to your build to run pipelines on your own Linux server with the IAR Build Tools for Arm pre-installed:
- Go to Repository settings → Pipelines → Runners → Add runner.
- Click
Add runner
. - Select
Linux shell
as System and architecture*. - Set your runner's name in Runner name* (e.g.,
bxarm-runner
). - Leave Runner labels* on its default (
self.hosted
,linux.shell
). - Click
Next
.
Tip
A "Runner installation" frame will pop-up containing your exclusive steps for a) downloading the runner archive, b) extracting the archive, and finally c) launching the runner. Each of these steps provide you with a "Copy command" button, located at the right-side of each step.
- Once you have the Bitbucket runner software installed and running on your server, click
Next
.
Tip
The last wizard's screen provides hints for using the Bitbucket Runner you just added in a pipeline workflow file.
- Click
Finish
and you will be taken back to the page where you can see your active runners as well as add more runners.
You can have as many parallel build nodes with runners as your license allows you to. Contact IAR Sales for expanding your build capacity.
Now we are good to perform a quick test to see if your runner is taking jobs properly.
- From the repository page, go to Settings → Pipelines.
- Check [x] Enable Pipelines.
- Go to Pipelines → Run pipeline.
Now you and/or your team can start pushing code to your repository and get automated results.
This tutorial provided an overview of how to get started with the IAR Build Tools for Arm on Bitbucket pipelines using self-hosted Linux runners. Development teams can immediately benefit from the comprehensive feedback these modern workflows offer, enabling them to quickly build, analyze, test, and deploy with high quality.
Follow us
on GitHub to get updates about tutorials like this and more.
For technical support contact IAR Customer Support.
For questions or suggestions related to this tutorial: try the wiki or check earlier issues. If those don't help, create a new issue with detailed information.