mirror of
https://github.com/drone/drone-kaniko.git
synced 2026-06-04 18:23:50 +08:00
e6ab8aa3c0
* feat:[CI-15236]: Added PLUGIN_TAR_PATH as output variable for the plugin. * feat:[CI-15236]: Added PLUGIN_TAR_PATH as output variable for the plugin. * feat:[CI-15236]: Added PLUGIN_TAR_PATH as output variable for the plugin. * feat:[CI-15236]: Added PLUGIN_TAR_PATH as output variable for the plugin. * feat:[CI-15236]: Test commit. * feat:[CI-15236]: Test commit. * feat:[CI-15236]: Added PLUGIN_TAR_PATH as output variable for the plugin. * feat:[CI-15236]: Directory check and UTs. * Update pkg/output/output.go * feat:[CI-15236]: fixes * feat:[CI-15236]: Test fixes - removed root * feat:[CI-15236]: Test fixes - removed root * feat:[CI-15236]: Test fixes - removed root * feat:[CI-15236]: If tarPath directory no present it will create it. * feat:[CI-15236]: If tarPath directory no present it will create it. * feat:[CI-15236]: fixes * Update kaniko.go removed as getTarPath is only called when tarPath isn't empty --------- Co-authored-by: OP (oppenheimer) <21008429+Ompragash@users.noreply.github.com>
19 lines
352 B
Go
19 lines
352 B
Go
package output
|
|
|
|
import (
|
|
"github.com/joho/godotenv"
|
|
)
|
|
|
|
func WritePluginOutputFile(outputFilePath, digest string, pluginTarPath string) error {
|
|
output := make(map[string]string)
|
|
if digest != "" {
|
|
output["digest"] = digest
|
|
}
|
|
|
|
if pluginTarPath != "" {
|
|
output["IMAGE_TAR_PATH"] = pluginTarPath
|
|
}
|
|
|
|
return godotenv.Write(output, outputFilePath)
|
|
}
|