Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleaned up the old legacy names #21

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/build-docker-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
display_help() {
echo "Usage: $0 -i image_name -v version -r registry -a architecture " >&2
echo
echo " -i image_name Specify the image name, for example: devs_xg24_aoa_poc"
echo " -i image_name Specify the image name, for example: bluetooth-aoa-example-build-env"
echo " -v version Specify the version of docker image, for example: 1.0.0"
echo " -r registry Specify the Docker registry to push the image to (optional) example: lx0017637.silabs.com:5000"
echo " -r registry Specify the Docker registry to push the image to (optional)"
echo " If internal registry is used, SonarQube will be included."
echo " -a architecture Specify the architecture, for example: x86_64 or aarch64"
echo
Expand Down
6 changes: 3 additions & 3 deletions .github/build-with-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
display_help() {
echo "Usage: $0 -i image_name -v version -r registry -a architecture -c clean" >&2
echo
echo " -i image_name Specify the image name, for example: devs_xg24_aoa_poc"
echo " -i image_name Specify the image name, for example: bluetooth-aoa-example-build-env"
echo " -v version Specify the version of docker image, for example: 1.0.0"
echo " -r registry Specify the Docker registry to push the image to"
echo " -a architecture Specify the architecture, for example: x86_64 or aarch64 (optional)"
Expand All @@ -12,7 +12,7 @@ display_help() {
exit 1
}

image_name="devs_xg24_aoa_poc"
image_name="bluetooth-aoa-example-build-env"
version="1.0.0"
registry="none"
architecture="x86_64"
Expand Down Expand Up @@ -53,7 +53,7 @@ sh ./.github/build-docker-image.sh -i $image_name -v $version -r $registry -a $a

echo "<----- Running the docker based build environment ----->"
# Run the docker image
docker run -u root --rm -v $(pwd):/home/jenkins/devs_xg24_aoa_poc $image_name:$version /bin/sh -c "cd devs_xg24_aoa_poc && make all"
docker run -u root --rm -v $(pwd):/home/jenkins/$image_name $image_name:$version /bin/sh -c "cd $image_name && make all"

if [ "$clean" = "true" ]; then
docker rmi $image_name:$version
Expand Down
68 changes: 34 additions & 34 deletions .github/workflows/03-SonarQube-Analysis.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
name: 03-SonarQube-Analysis

on:
#It is an internal tool, it can only ran a self hosted runner. Currently it can be triggered only manually.
# It is an internal tool, it can only run on a self-hosted runner. Currently, it can be triggered only manually.
workflow_dispatch:


jobs:
sonarqube:
runs-on: llbp-bud-lab006
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2

- name: Pull a docker image file
run: docker pull lx0017637.silabs.com:5000/devs_identec_xg24_aoa_poc:1.0.0
sonarqube:
runs-on: llbp-bud-lab006
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
INTERNAL_REPOSITORY_NAME: "lx0017637.silabs.com:5000"
DOCKER_IMAGE: "bluetooth-aoa-example-build-env:1.0.0"
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2

- name: Run SonarQube analysis
- name: Pull a docker image file
run: docker pull ${{ env.INTERNAL_REPOSITORY_NAME }}/${{ env.DOCKER_IMAGE }}

run: |
docker run -u root --rm -v $(pwd):/home/jenkins/devs_identec_xg24_aoa_poc lx0017637.silabs.com:5000/devs_identec_xg24_aoa_poc:1.0.0 /bin/sh -c "
cd devs_identec_xg24_aoa_poc &&
make all &&
rm -rf sonar-bw &&
rm -rf .scannerwork &&
rm -rf locator_ncp/build &&
rm -rf locator_host/build
mkdir sonar-bw &&
/opt/build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir sonar-bw/locator_host/ make locator_host &&
/opt/build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir sonar-bw/locator_ncp/ make locator_ncp &&
sonar-scanner -Dsonar.token=$SONAR_TOKEN -Dsonar.host.url=$SONAR_HOST_URL"
- name: Run SonarQube analysis
run: |
docker run -u root --rm -v $(pwd):/home/jenkins/bluetooth-aoa-example ${{ env.INTERNAL_REPOSITORY_NAME }}/${{ env.DOCKER_IMAGE }} /bin/sh -c " \
cd bluetooth-aoa-example && \
make all && \
rm -rf sonar-bw && \
rm -rf .scannerwork && \
rm -rf locator_ncp/build && \
rm -rf locator_host/build && \
mkdir sonar-bw && \
/opt/build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir sonar-bw/locator_host/ make locator_host && \
/opt/build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir sonar-bw/locator_ncp/ make locator_ncp && \
sonar-scanner -Dsonar.token=$SONAR_TOKEN -Dsonar.host.url=$SONAR_HOST_URL"

- name: Cleanup leftover files
if: always()
run: |
docker run -u root --rm -v $(pwd):/home/jenkins/devs_identec_xg24_aoa_poc lx0017637.silabs.com:5000/devs_identec_xg24_aoa_poc:1.0.0 /bin/sh -c "
rm -rf sonar-bw && \
rm -rf .scannerwork && \
rm -rf locator_ncp/build && \
rm -rf locator_host/build "
- name: Cleanup leftover files
if: always()
run: |
docker run -u root --rm -v $(pwd):/home/jenkins/bluetooth-aoa-example ${{ env.INTERNAL_REPOSITORY_NAME }}/${{ env.DOCKER_IMAGE }} /bin/sh -c "
rm -rf sonar-bw && \
rm -rf .scannerwork && \
rm -rf locator_ncp/build && \
rm -rf locator_host/build "
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Angle of Arrival locator project
- [Angle of Arrival locator project](#angle-of-arrival-locator-project)
- [Overview](#overview)
- [NCP firmware](#ncp-firmware)
- [Host firmware](#host-firmware)
Expand Down Expand Up @@ -112,15 +113,15 @@ The *build-with-docker.sh* script handles all the building process.
You should start the script directly from the repo main folder. Otherwise the paths can be messed up.

You can use the following command line options:
- "-i" image_name Specify the image name. Default value: *devs_xg24_aoa_poc-build-env*
- "-i" image_name Specify the image name. Default value: *bluetooth-aoa-example-build-env*
- "-v" version Specify the version of docker image. Default value: *1.0.0*
- "-r" registry Specify the Docker registry to push the image to. Default value: *none*
- "-a" architecture Specify architecture of build machine. Accepted values are `x86_64` and `aarch64`. Defaults to `x86_64`
- "-c" clean Boolean option. if it is added then after the build process the docker image is removed to save storage space. Default value: *true*

Example:
```bash
~/devs_xg24_aoa_poc$ sh .github/build-with-docker.sh -i devs_xg24_aoa_poc-build-env -v 1.0.0 -c
~/devs_xg24_aoa_poc$ sh .github/build-with-docker.sh -i bluetooth-aoa-example-build-env -v 1.0.0 -c
```

## How to use the project
Expand Down
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

sonar.host.url= http://sonarqube.silabs.net/
# must be unique in a given SonarQube instance
sonar.projectKey=devs_identec_xg24_aoa_poc
sonar.projectKey=bluetooth-AoA-example
sonar.cfamily.variants.names=locator_host,locator_ncp
sonar.cfamily.variants.dir = sonar-bw

Expand Down
Loading