未验证 提交 f88e806b 编写于 作者: Y Yaron Schneider 提交者: GitHub

Merge pull request #37 from yaron2/version

add versioning to runtime, operator and assigner
......@@ -6,10 +6,14 @@ import (
"os/signal"
"strconv"
log "github.com/Sirupsen/logrus"
"github.com/actionscore/actions/pkg/action"
"github.com/actionscore/actions/pkg/version"
)
func main() {
log.Infof("Starting Actions Runtime -- version %s -- commit %s", version.Version(), version.Commit())
mode := flag.String("mode", "standalone", "")
actionHTTPPort := flag.String("action-http-port", "3500", "")
actionGRPCPort := flag.String("action-grpc-port", "50001", "")
......
......@@ -7,9 +7,12 @@ import (
log "github.com/Sirupsen/logrus"
"github.com/actionscore/actions/pkg/assigner"
"github.com/actionscore/actions/pkg/version"
)
func main() {
log.Infof("Starting Actions Assigner -- version %s -- commit %s", version.Version(), version.Commit())
port := flag.String("port", "50005", "")
flag.Parse()
......
......@@ -4,14 +4,14 @@ import (
"time"
log "github.com/Sirupsen/logrus"
"github.com/golang/glog"
"github.com/actionscore/actions/pkg/controller"
k8s "github.com/actionscore/actions/pkg/kubernetes"
"github.com/actionscore/actions/pkg/signals"
"github.com/actionscore/actions/pkg/version"
)
func main() {
log.Info("Starting Actions Controller")
log.Infof("Starting Actions Operator -- version %s -- commit %s", version.Version(), version.Commit())
ctx := signals.Context()
kubeClient, actionsClient, err := k8s.Clients()
......@@ -22,6 +22,6 @@ func main() {
controller.NewController(kubeClient, actionsClient).Run(ctx)
shutdownDuration := 5 * time.Second
glog.Infof("allowing %s for graceful shutdown to complete", shutdownDuration)
log.Infof("allowing %s for graceful shutdown to complete", shutdownDuration)
<-time.After(shutdownDuration)
}
package version
// Values for these are injected by the build
var (
version string
commit string
)
// Version returns the Actions version. This is either a semantic version
// number or else, in the case of unreleased code, the string "devel".
func Version() string {
return version
}
// Commit returns the git commit SHA for the code that Actions was built from.
func Commit() string {
return commit
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册