# Template C++ Application # This template allows you to validate your C++ application. # The workflow allows running tests and code linting on the default branch. image: gcc:10.2 clone: depth: full pipelines: default: - step: name: Test script: - apt update && apt -y install cmake - mkdir build && cd build && cmake .. - make branches: '{develop}': # or the name of your main branch - step: name: Download and install the build wrapper, build the project script: - mkdir $HOME/.sonar - curl -k -sSLo $HOME/.sonar/build-wrapper-linux-x86.zip ${SONAR_HOST_URL}/static/cpp/build-wrapper-linux-x86.zip - unzip -o $HOME/.sonar/build-wrapper-linux-x86.zip -d $HOME/.sonar/ - ls -ltr - pwd - apt update && apt -y install cmake - cmake . - ls -ltr - $HOME/.sonar/build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir bw-output make - ls -ltr - pwd - pipe: docker://stengg/sonarqube-scan:latest variables: EXTRA_ARGS: -Dsonar.cfamily.build-wrapper-output=bw-output SONAR_HOST_URL: ${SONAR_HOST_URL} SONAR_TOKEN: ${SONAR_TOKEN} definitions: caches: sonar: ~/.sonar