func (p MarathonBuild) Run(data manifest.Manifest) error { if err := utils.RunCmd("tar -zcf marathon.tar.gz -C %s/ .", data.GetString("source")); err != nil { return err } return utils.RunCmd("curl -vsSf -XPUT -T marathon.tar.gz %s", data.GetString("registry-url")) }
func (p UploadMarathon) Run(data manifest.Manifest) error { if err := utils.RunCmd("curl -vsSf -o marathon.tar.gz %s", data.GetString("unstable-url")); err != nil { return err } return utils.RunCmd("curl -vsSf -XPUT -T marathon.tar.gz %s", data.GetString("stable-url")) }
func (p TestAutotest) Run(data manifest.Manifest) error { if err := utils.RunCmd("rm -rf tests && git clone --depth 1 --single-branch --recursive %s tests", data.GetString("repo")); err != nil { return fmt.Errorf("Error on clone test git repo: %v", err) } return utils.RunCmd( "cd tests/ && ./test.sh --project=%s --version=%s --suite=%s", data.GetString("project"), data.GetString("version"), data.GetString("suite"), ) }
func (p SbtBuild) Run(data manifest.Manifest) error { return utils.RunCmd( `sbt ';set every version := "%s"' clean "%s" %s`, data.GetString("version"), data.GetString("test"), data.GetStringOr("sbt", ""), ) }
func (p TarballBuild) Run(data manifest.Manifest) error { utils.RunCmd("rm -rf ./tarball.tmp && mkdir ./tarball.tmp") for _, f := range data.GetArray("files") { if file, ok := f.Unwrap().(string); ok { utils.RunCmd("cp -a %s ./tarball.tmp/", file) } else if files, ok := f.Unwrap().(map[string]interface{}); ok { for from, to := range files { utils.RunCmd("cp -a %s ./tarball.tmp/%s", from, to) } } } if err := utils.RunCmd("tar -zcf tarball.tar.gz -C ./tarball.tmp/ ."); err != nil { return err } return utils.RunCmd("curl -vsSf -XPUT -T tarball.tar.gz %s", data.GetString("registry-url")) }
func (p UploadDebian) Run(data manifest.Manifest) error { return utils.RunCmd( `ssh %s "%s %s %s %s"`, data.GetString("ssh-connection"), data.GetString("script"), data.GetString("changes-file"), data.GetString("src-repo"), data.GetString("dst-repo"), ) }
func (p ShBuild) Run(data manifest.Manifest) error { return utils.RunCmd(data.GetString("sh")) }