Add image tag into info output, add ability to print info output on demand and prevent multiple instances of runmqserver being run

This commit is contained in:
Robert Parker
2018-12-12 13:11:47 +00:00
parent 4145f077b6
commit 9c8b3825be
6 changed files with 96 additions and 3 deletions

View File

@@ -29,6 +29,8 @@ var (
ImageRevision = "Not specified"
// ImageSource is the URL to get source code for building the image
ImageSource = "Not specified"
// ImageTag is the tag of the image
ImageTag = "Not specified"
)
func logDateStamp() {
@@ -43,6 +45,10 @@ func logGitCommit() {
log.Printf("Image source: %v", ImageSource)
}
func logImageTag() {
log.Printf("Image tag: %v", ImageTag)
}
func logMQVersion() {
mqVersion, _, err := command.Run("dspmqver", "-b", "-f", "2")
if err != nil {
@@ -67,5 +73,6 @@ func logVersionInfo() {
logDateStamp()
logGitRepo()
logGitCommit()
logImageTag()
logMQVersion()
}