// Save all the extractor's properties into a local file.
// extractorConfPath - Path to a file to which all the extractor's properties will be written.
// buildInfoPath - Path to a file to which the build-info data will be written.
// buildName - Build name of the current build.
// buildNumber - Build number of the current build.
// project - JFrog Project key of the current build
// configProperties - Data of the actual extractor's properties.
// Returns the extractor Config file path.
Save all the extractor's properties into a local file.
extractorConfPath - Path to a file to which all the extractor's properties will be written.
buildInfoPath - Path to a file to which the build-info data will be written.
buildName - Build name of the current build.
buildNumber - Build number of the current build.
project - JFrog Project key of the current build
configProperties - Data of the actual extractor's properties.
Returns the extractor Config file path.
// Save all the extractor ' s properties into a local file . // extractorConfPath - Path to a file to which all the extractor ' s properties will be written . // buildInfoPath - Path to a file to which the build - info data will be written . // buildName - Build name of the current build . // buildNumber - Build number of the current build . // project - JFrog Project key of the current build // configProperties - Data of the actual extractor ' s properties . // Returns the extractor Config file path .
func CreateExtractorPropsFile(extractorConfPath, buildInfoPath, buildName, buildNumber, project string, configProperties map[string]string) (string, error) {
	if err := os.MkdirAll(extractorConfPath, 0777); err != nil {
		return "", err
	}
	propertiesFile, err := ioutil.TempFile(extractorConfPath, configPropertiesPathTempPrefix)
	if err != nil {
		return "", err
	}
	defer func() {
		deferErr := propertiesFile.Close()
		if err == nil {
			err = deferErr
		}
	}()
	var buildProperties = map[string]string{
		buildInfoPathKey: buildInfoPath,
		buildNameKey:     buildName,
		buildNumberKey:   buildNumber,
		projectKey:       project,
	}
	return propertiesFile.Name(), writeProps(propertiesFile, configProperties, buildProperties)
}
func CreateExtractorPropsFile ( extractorConfPath , buildInfoPath , buildName , buildNumber , project string , configProperties map [ string ] string ) ( string , error ) { if err := os . MkdirAll ( extractorConfPath , 0777 ) ; err != nil { return " " , err } propertiesFile , err := ioutil . TempFile ( extractorConfPath , configPropertiesPathTempPrefix ) if err != nil { return " " , err } defer func ( ) { deferErr := propertiesFile . Close ( ) if err == nil { err = deferErr } } ( ) var buildProperties = map [ string ] string { buildInfoPathKey : buildInfoPath , buildNameKey : buildName , buildNumberKey : buildNumber , projectKey : project , } return propertiesFile . Name ( ) , writeProps ( propertiesFile , configProperties , buildProperties ) }
Save all the extractor's properties into a local file.
Save all the extractor ' s properties into a local file .