Revert "osbuild-worker-executor: job-id in control.json as hostname"
This reverts commit fc1d1c3b8f.
This commit is contained in:
parent
ae4467ab0d
commit
4853bf3ec0
4 changed files with 0 additions and 56 deletions
|
|
@ -13,7 +13,6 @@ import (
|
|||
"strings"
|
||||
|
||||
"golang.org/x/exp/slices"
|
||||
"golang.org/x/sys/unix"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
|
@ -109,7 +108,6 @@ func runOsbuild(logger *logrus.Logger, buildDir string, control *controlJSON, ou
|
|||
type controlJSON struct {
|
||||
Environments []string `json:"environments"`
|
||||
Exports []string `json:"exports"`
|
||||
JobID string `json:"job-id"`
|
||||
}
|
||||
|
||||
func mustRead(atar *tar.Reader, name string) error {
|
||||
|
|
@ -237,15 +235,6 @@ func handleIncludedSources(atar *tar.Reader, buildDir string) error {
|
|||
}
|
||||
}
|
||||
|
||||
var unixSethostname = unix.Sethostname
|
||||
|
||||
func setHostname(name string) error {
|
||||
if name == "" {
|
||||
return nil
|
||||
}
|
||||
return unixSethostname([]byte(name))
|
||||
}
|
||||
|
||||
// test for real via:
|
||||
// curl -o - --data-binary "@./test.tar" -H "Content-Type: application/x-tar" -X POST http://localhost:8001/api/v1/build
|
||||
func handleBuild(logger *logrus.Logger, config *Config) http.Handler {
|
||||
|
|
@ -273,11 +262,6 @@ func handleBuild(logger *logrus.Logger, config *Config) http.Handler {
|
|||
http.Error(w, "cannot decode control.json", http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
if err := setHostname(control.JobID); err != nil {
|
||||
logger.Error(err)
|
||||
http.Error(w, "cannot set hostname", http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
|
||||
buildDir, err := createBuildDir(config)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue