Hi I am using the bitbucket pipelines for deploying my code to sonarcloud and I am currently facing difficulties in configuring the bitbucket pipeline template which was generated from sonarcloud even after adding the line
plugins {
id “org.sonarqube” version “3.0”
}
the gradelw is present in /android/android
in both the project level and app level build.gradle file the build is failing with this error
Task 'sonarqube' not found in root project 'build'.
this is my pipeline code :
image: openjdk:8
options:
docker: true
size: 2x
clone:
depth: full
definitions:
services:
docker:
memory: 4096
caches:
sonar: ~/.sonar/cache # Caching SonarCloud artifacts will speed up your build
steps:
- step: &build-test-sonarcloud
name: Build, test and analyze on SonarCloud
caches:
- gradle
- sonar
script:
- chmod 755 ./android/gradlew
- ./android/gradlew build sonarqube
artifacts:
- build/libs/**
pipelines:
branches:
feature/*: #runs on any feature branch created
- step: *build-test-sonarcloud
pull-requests:
“**”: #runs on all pull requests done
- step: *build-test-sonarcloud
I am unable to understand how to rectify this and what should I do to fix this . Any help is appreciated I may be missing the obvious here I dont know the android projects by atom I am just configuring a pipeline for the repository to analyse the code in sonar cloud