print( " Arg2: ProjectKey en SonarQube correspondiente al elemento a analizar" ) sys.exit(0) #myPropertiesFile = "D://Alfonso//AAProyectos//qamera_python//application.properties" myPropertiesFile = sys.argv[1] myProjectKey = sys.argv[2] print("Parametros de ejecucion:") print("Fichero de propiedades:", myPropertiesFile) print("Parametros de ejecucion:", myProjectKey) print("...") ### Read Program Properties from configuration file myprops = {} myprops = Utils.loadPropertiesFile(myPropertiesFile) ### Read Quality Model from configuration file myQualityModel = QualityModel(myPropertiesFile) print("Quality Model:", myQualityModel.max_violations_rate) ### Connecto to SonarQube mySonarqubeConector = SonarqubeConector(myprops["sonarURL"], myprops["sonarUser"], myprops["sonarCredentials"]) ### Get ProjectId From SonarQube myProjectId = mySonarqubeConector.loadProjectIdFromSonar(myProjectKey) ### Get Metrics from SonarQube metricList = myprops["metrics"] qualityCodeResults = mySonarqubeConector.loadProjectMetricsFromSonar( myProjectKey, metricList)