mirror of
				https://github.com/kitabisa/sonarqube-action.git
				synced 2025-10-31 04:54:19 +08:00 
			
		
		
		
	add action & entrypoint
This commit is contained in:
		
							parent
							
								
									fcf0075f5e
								
							
						
					
					
						commit
						b74f7cb670
					
				
							
								
								
									
										23
									
								
								action.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								action.yaml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,23 @@ | ||||
| name: 'SonarQube Scan' | ||||
| description: 'Scan your code with SonarQube Scanner to detect bugs, vulnerabilities and code smells in more than 25 programming languages.' | ||||
| author: 'Dwi Siswanto' | ||||
| branding: | ||||
|   icon: 'check' | ||||
|   color: 'green' | ||||
| runs: | ||||
|   using: 'docker' | ||||
|   image: 'Dockerfile' | ||||
| inputs: | ||||
|   host: | ||||
|     description: 'SonarQube server URL' | ||||
|     required: true | ||||
|   projectBaseDir: | ||||
|     description: 'Set the sonar.projectBaseDir analysis property' | ||||
|     required: false | ||||
|     default: '.' | ||||
|   login: | ||||
|     description: 'Login or authentication token of a SonarQube user' | ||||
|     required: true | ||||
|   password: | ||||
|     description: 'Password that goes with the sonar.login username. This should be left blank if an authentication token is being used.' | ||||
|     required: false | ||||
							
								
								
									
										20
									
								
								entrypoint.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								entrypoint.sh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,20 @@ | ||||
| #!/bin/bash | ||||
| 
 | ||||
| set -e | ||||
| 
 | ||||
| if [[ -z "${INPUT_PASSWORD}" ]]; then | ||||
| 	SONAR_PASSWORD="&& true" | ||||
| else | ||||
| 	SONAR_PASSWORD="${INPUT_PASSWORD}" | ||||
| fi | ||||
| 
 | ||||
| sonar-scanner \ | ||||
| 	-Dsonar.host.url=${INPUT_HOST} \ | ||||
| 	-Dsonar.projectKey=${PWD##*/} \ | ||||
| 	-Dsonar.projectBaseDir=${INPUT_PROJECTBASEDIR} \ | ||||
| 	-Dsonar.login=${INPUT_LOGIN} \ | ||||
| 	-Dsonar.password=${INPUT_PASSWORD} \ | ||||
| 	-Dsonar.sources=. \ | ||||
| 	-Dsonar.sourceEncoding=UTF-8 \ | ||||
| 	${SONAR_PASSWORD} | ||||
| 
 | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 dw1
						dw1