Skip to content

Docker image for ESP-IDF, with Sonar Cloud support. Based on the official ESP-IDF docker image.

License

Notifications You must be signed in to change notification settings

gfurtadoalmeida/esp32-docker-sonar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ESP-IDF Docker Image with Sonar Cloud

GitHub Build Status Bugs Code Smells Maintainability Rating Security Rating Quality Gate Status
Docker image for the Espressif IoT Development Framework (ESP-IDF), with Sonar Cloud C/C++ code analysis support. It is intended for building applications and libraries with specific versions of ESP-IDF, when doing automated builds.

This image contains a copy of ESP-IDF and all the tools necessary to build and analyze ESP-IDF projects.

Characteristics

Tags

ESP-IDF release:

Basic Usage

Build a project located in the current directory using idf.py build command.
Code will be analyzed, and results will be sent to Sonar Cloud, automatically.
Omitting the environment variables will disable code analysis.

docker run --rm \
           --env SONARCLOUD_ORGANIZATION=yourSonarCloudOrganizationName \
           --env SONARCLOUD_TOKEN=yourSonarCloudOrganizationToken \
           -v $PWD:/project \
           -w /project \
           gfurtadoalmeida/esp32-docker-sonar:v5.1 \
           idf.py build

Documentation

For more information about this image and the detailed usage instructions, please refer to the ESP-IDF Programming Guide page: IDF Docker Image.

⚠️ Your project must have a sonar-project.properties file when running code analysis.

Environment Variables

  • SONARCLOUD_ORGANIZATION: a Sonar Cloud organization name.
  • SONARCLOUD_TOKEN: a Sonar Cloud organization token. If empty code analysis will not be run.
  • BUILD_WRAPPER_OUTPUT_DIR: output path for the Sonar Cloud Build Wrapper (defaults to build_wrapper_output if not passed).