grafana/scripts/build/ci-build-windows/Magefile.go
Arve Knudsen b10e39a7e1
Chore: Add Dockerfile for Windows CI build environment (#28241)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-10-14 11:22:12 +02:00

28 lines
462 B
Go

//+build mage
package main
import (
"github.com/magefile/mage/mg"
"github.com/magefile/mage/sh"
)
const imageName = "grafana/ci-build-windows:0.1.5"
// Build builds the Docker image.
func Build() error {
if err := sh.RunV("docker", "build", "-t", imageName, "."); err != nil {
return err
}
return nil
}
// Publish publishes the Docker image.
func Publish() error {
mg.Deps(Build)
return sh.RunV("docker", "push", imageName)
}
var Default = Build