Documentation ¶
Index ¶
- Constants
- func CalculateDigest(data []byte) string
- func CalculateDigestFromArchive(path string) (string, error)
- func CalculateDigestFromFile(path string) (string, error)
- func CompressLayerTarGz(src string, folder string, destination string) (string, error)
- func Copy(srcFile, dstFile string) error
- func CopyDirectory(scrDir, dest string) error
- func Exists(filePath string) bool
- func ExtractAndRenameDeliverable(dockerBuildFolder string, deliverablePath string) error
- func ExtractBinaryFromFile(file string) (string, error)
- func ExtractBinaryFromStdIn() (string, error)
- func ExtractDeliverable(archivePath string, extractedDirPath string) error
- func ExtractGz(gzipStream io.Reader) *gzip.Reader
- func FindOutputTagOrHash(dockerName string) (string, error)
- func GetVersionMetadata(versionString string) string
- func GetVersionWithoutMetadata(versionString string) string
- func IsFullSemanticVersion(versionString string) bool
- func IsSemanticVersion(versionString string) bool
- func IsSemanticVersionWithMeta(versionString string) bool
- func MkdirAllWithPermissions(path string, perm fs.FileMode) error
- func RenameSingleFolderInDirectory(base string, newName string) error
- type FileWriter
- type WriterFunc
Constants ¶
const ( // DockerBasedir The base directory where all code is copied in the Docker image DockerBasedir = "/u01" // DockerfileApplicationFolder Where in the build folder the application is put DockerfileApplicationFolder = "app" // ApplicationFolder name ApplicationFolder = "application" // LayerFolder name LayerFolder = "layer" // ApplicationBuildFolder The directory where the application is prepared ApplicationBuildFolder = DockerfileApplicationFolder + "/" + ApplicationFolder )
Variables ¶
This section is empty.
Functions ¶
func CalculateDigest ¶
CalculateDigest calculates the 256 sha of the provided byte slice
func CalculateDigestFromArchive ¶
CalculateDigestFromArchive calculates a sha256 hash
func CalculateDigestFromFile ¶
CalculateDigestFromFile of tar content
func CompressLayerTarGz ¶
CompressLayerTarGz compress folder
func CopyDirectory ¶
CopyDirectory copy content from srcDir to dest
func ExtractAndRenameDeliverable ¶
ExtractAndRenameDeliverable extract and rename
func ExtractBinaryFromFile ¶
ExtractBinaryFromFile copy binary from file
func ExtractBinaryFromStdIn ¶
ExtractBinaryFromStdIn copy binary from stdin stream
func ExtractDeliverable ¶
ExtractDeliverable extract archive to dest
func FindOutputTagOrHash ¶
FindOutputTagOrHash get tag or hash from docker name
func GetVersionMetadata ¶
GetVersionMetadata get version metadata
func GetVersionWithoutMetadata ¶
GetVersionWithoutMetadata get version
func IsFullSemanticVersion ¶
IsFullSemanticVersion check version
func IsSemanticVersion ¶
IsSemanticVersion check version
func IsSemanticVersionWithMeta ¶
IsSemanticVersionWithMeta check version
func MkdirAllWithPermissions ¶ added in v2.7.2
MkdirAllWithPermissions works like os.MkdirAll, but will set permissions even if the folder already exists.
func RenameSingleFolderInDirectory ¶
RenameSingleFolderInDirectory When we unzip the delivery, it will have an additional level. eg. app/myapplication-LEVERANSEPAKKE-SNAPSHOT -> app/application This function is used to rename the folder to align it better with the container image file system.
Types ¶
type WriterFunc ¶
WriterFunc function
func NewTemplateWriter ¶
func NewTemplateWriter(input interface{}, templatename string, templateString string) WriterFunc
NewTemplateWriter wrapper