Skip to content

Commit dd40ff4

Browse files
committed
updating to latest 1.0.5 GitHub Action
removing old sonar yml, and other unnecessary files updating sonar properties
1 parent 985f568 commit dd40ff4

File tree

4 files changed

+148
-15
lines changed

4 files changed

+148
-15
lines changed
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# stub to call common GitHub Action (GA) as part of Continuous Integration (CI) Pull Request process checks for main branch
2+
# inputs are described in the chef/common-github-actions/<GA.yml> with same name as this stub
3+
#
4+
# secrets are inherited from the calling workflow, typically SONAR_TOKEN, SONAR_HOST_URL, GH_TOKEN, AKEYLESS_JWT_ID, POLARIS_SERVER_URL and POLARIS_ACCESS_TOKEN
5+
6+
name: CI Pull Request on Main Branch
7+
8+
on:
9+
pull_request:
10+
branches: [ main, develop, release/** ]
11+
push:
12+
branches: [ main, develop, release/** ]
13+
14+
workflow_dispatch:
15+
16+
permissions:
17+
contents: read
18+
19+
env:
20+
STUB_VERSION: "1.0.5"
21+
22+
jobs:
23+
echo_version:
24+
name: 'Echo stub version'
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: echo version of stub and inputs
28+
run: |
29+
echo "CI main pull request stub version $STUB_VERSION"
30+
31+
call-ci-main-pr-check-pipeline:
32+
uses: chef/common-github-actions/.github/workflows/ci-main-pull-request.yml@main
33+
secrets: inherit
34+
permissions:
35+
id-token: write
36+
contents: read
37+
38+
with:
39+
visibility: ${{ github.event.repository.visibility }} # private, public, or internal
40+
# go-private-modules: GOPRIVATE for Go private modules, default is 'github.com/progress-platform-services/*
41+
42+
# if version specified, it takes precedence; can be a semver like 1.0.2-xyz or a tag like "latest"
43+
version: '15.10.63' # ${{ github.event.repository.version }}
44+
detect-version-source-type: 'none' # options include "none" (do not detect), "file", "github-tag" or "github-release"
45+
detect-version-source-parameter: '' # use for file name
46+
language: 'ruby' # Go, Ruby, Rust, JavaScript, TypeScript, Python, Java, C#, PHP, other - used for build and SonarQube language setting
47+
48+
# complexity-checks
49+
perform-complexity-checks: true
50+
# scc-output-filename: 'scc-output.txt'
51+
perform-language-linting: false # Perform language-specific linting and pre-compilation checks
52+
53+
# trufflehog secret scanning
54+
perform-trufflehog-scan: true
55+
56+
# trivy dependency and container scanning
57+
perform-trivy-scan: true
58+
59+
# BlackDuck SAST (Polaris) and SCA scans (requires a build or download to do SAST)
60+
# requires these secrets: POLARIS_SERVER_URL, POLARIS_ACCESS_TOKEN
61+
perform-blackduck-polaris: true
62+
polaris-application-name: "Chef-Infrastructure-Server" # one of these: Chef-Agents, Chef-Automate, Chef-Chef360, Chef-Habitat, Chef-Infrastructure-Server, Chef-Shared-Services, Chef-Other, Chef-Non-Product
63+
polaris-project-name: ${{ github.event.repository.name }}
64+
polaris-blackduck-executable: 'path/to/blackduck/binary'
65+
polaris-executable-detect-path: 'path/to/detect'
66+
67+
# perform application build and unit testing, will use custom repository properties when implemented for chef-primary-application, chef-build-profile, and chef-build-language
68+
build: false
69+
# ga-build-profile: $chef-ga-build-profile
70+
# language: $chef-ga-build-language # this will be removed from stub as autodetected in central GA
71+
unit-tests: false
72+
73+
# perform SonarQube scan, with or wihout unit test coverage data
74+
# requires secrets SONAR_TOKEN and SONAR_HOST_URL (progress.sonar.com)
75+
perform-sonarqube-scan: true
76+
# perform-sonar-build: true
77+
# build-profile: 'default'
78+
# report-unit-test-coverage: true
79+
80+
perform-docker-scan: false # scan Dockerfile and built images with Docker Scout or Trivy; see repo custom properties matching "container"
81+
82+
# report to central developer dashboard
83+
report-to-atlassian-dashboard: false
84+
quality-product-name: 'Chef-360' # product name for quality reporting, like Chef360, Courier, Inspec
85+
# quality-product-name: ${{ github.event.repository.name }} # like 'Chef-360' - the product name for quality reporting, like Chef360, Courier, Inspec
86+
# quality-sonar-app-name: 'YourSonarAppName'
87+
# quality-testing-type: 'Integration' like Unit, Integration, e2e, api, Performance, Security
88+
# quality-service-name: 'YourServiceOrRepoName'
89+
# quality-junit-report: 'path/to/junit/report''
90+
91+
# perform native and Habitat packaging, publish to package repositories
92+
package-binaries: false # Package binaries (e.g., RPM, DEB, MSI, dpkg + signing + SHA)
93+
habitat-build: false # Create Habitat packages
94+
publish-packages: false # Publish packages (e.g., container from Dockerfile to ECR, go-releaser binary to releases page, omnibus to artifactory, gems, choco, homebrew, other app stores)
95+
96+
# generate and export Software Bill of Materials (SBOM) in various formats
97+
generate-sbom: true
98+
export-github-sbom: true # SPDX JSON artifact on job instance
99+
perform-blackduck-sca-scan: true # combined with generate sbom & generate github-sbom, also needs version above
100+
blackduck-project-group-name: 'Chef-Infrastructure-Server' # typically one of (Chef), Chef-Agents, Chef-Automate, Chef-Chef360, Chef-Habitat, Chef-Infrastructure-Server, Chef-Shared-Services, Chef-Non-Product'
101+
blackduck-project-name: ${{ github.event.repository.name }} # BlackDuck project name, typically the repository name
102+
generate-blackduck-sbom: false # obsolete, use perform-blackduck-sca-scan instead
103+
104+
generate-msft-sbom: false
105+
license_scout: false # Run license scout for license compliance (uses .license_scout.yml)
106+
107+
# udf1: 'default' # user defined flag 1
108+
# udf2: 'default' # user defined flag 2
109+
# udf3: 'default' # user defined flag 3

sonar-project.properties

Lines changed: 39 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,47 @@
1-
# must be unique in a given SonarQube instance
1+
# SonarQube configuration file
2+
#
3+
# Sample Ruby Sonar file - https://docs.sonarsource.com/sonarqube-server/10.6/analyzing-source-code/languages/ruby/
4+
# properties defined in https://docs.sonarsource.com/sonarqube-server/latest/analyzing-source-code/analysis-parameters/
5+
#
6+
# view this repo in sonar: https://sonar.progress.com/dashboard?id=chef_chef-server_AYb-tSwfJ4YHsO5MtIeK&codeScope=overall
7+
8+
# Required metadata
29
sonar.projectKey=chef_chef-server_AYb-tSwfJ4YHsO5MtIeK
10+
# project name is 3 parts: "Chef" + "<area/product>" + "<repo>" with underscores between
11+
# <area/product> choices: Chef-Agents | Chef-Automate | Chef360 | Chef-Habitat | Chef-Infra-Server | Chef-Shared-Services
12+
# example project name: chef/chef-vault repo would be Chef_Chef-Infra-Client_chef-vault
13+
sonar.projectName=Chef_Chef-Infra-Server_chef-server
14+
15+
# sonar.projectVersion=1.0
16+
# sonar.projectDescription=
17+
18+
# Language - https://docs.sonarsource.com/sonarqube-server/latest/analyzing-source-code/languages/overview/ go, ruby, rust
19+
sonar.language=ruby
20+
sonar.sources=src
21+
# sonar.sources=lib <-- for Ruby, match this with the /spec directory for tests & SARIF output directory for test results/rcov
22+
# sonar.exclusions=**/*_test.go, **/*.js, **/*.sql, **/*.yml, **/*.yaml; may exclude **/vendor/** for Ruby
23+
24+
# Unit tests
25+
sonar.tests=**/spec
26+
# NOT . or **/test (erlang tests) or oc-chef-pedant
27+
# was: sonar.tests=.
28+
# was: sonar.test.inclusions=**/*_test.go
329

4-
# --- optional properties ---
30+
# Coverage report
31+
sonar.ruby.coverage.framework=RSpec
32+
sonar.ruby.coverage.reportPaths=coverage/coverage.json
33+
# ^^^ comma-delimited paths to Rubocop reports, SimpleCov, or RSpec plugin reports (coverage/coverage.json <-- default output for simpleCov)
534

6-
# defaults to project key
7-
sonar.projectName=chef-server
8-
# defaults to 'not provided'
9-
#sonar.projectVersion=1.0
10-
11-
sonar.sources=.
12-
sonar.exclusions=**/*_test.go
35+
# sonar.ruby.rubocop.reportPaths=./rubocop-report.json -- import Ruby Rubocop
36+
# sonar.dependencyCheck.htmlReportPath=./dependency-check-report.html -- import OWASP dependency check report
37+
# sonar.externalIssuesReportPaths Comma-delimited list of paths to generic issue reports.
38+
# sonar.sarifReportPaths Comma-delimited list of paths to SARIF issue reports.
1339

14-
sonar.tests=.
15-
sonar.test.inclusions=**/*_test.go
16-
17-
# Encoding of the source code. Default is default system encoding
18-
#sonar.sourceEncoding=UTF-8
40+
# Additional settings
41+
# sonar.qualitygate.wait=false
42+
# sonar.qualitygate.timeout=300
1943

2044
# skip C-language processor
2145
sonar.c.file.suffixes=-
2246
sonar.cpp.file.suffixes=-
23-
sonar.objc.file.suffixes=-
47+
sonar.objc.file.suffixes=-

0 commit comments

Comments
 (0)