diff --git a/backend/go-app/docker.go b/backend/go-app/docker.go index f9c27eef..80b4e30f 100644 --- a/backend/go-app/docker.go +++ b/backend/go-app/docker.go @@ -620,7 +620,7 @@ func hookTest() { } } -//https://stackoverflow.com/questions/23935141/how-to-copy-docker-images-from-one-host-to-another-without-using-a-repository +// https://stackoverflow.com/questions/23935141/how-to-copy-docker-images-from-one-host-to-another-without-using-a-repository func getDockerImage(resp http.ResponseWriter, request *http.Request) { cors := shuffle.HandleCors(resp, request) if cors { @@ -643,14 +643,9 @@ func getDockerImage(resp http.ResponseWriter, request *http.Request) { return } - type requestCheck struct { - Name string `datastore:"name" json:"name" yaml:"name"` - } - // This has to be done in a weird way because Datastore doesn't // support map[string]interface and similar (openapi3.Swagger) - var version requestCheck - + var version shuffle.DockerRequestCheck err = json.Unmarshal(body, &version) if err != nil { resp.WriteHeader(422) diff --git a/backend/go-app/main.go b/backend/go-app/main.go index aa71b271..b6b2821e 100644 --- a/backend/go-app/main.go +++ b/backend/go-app/main.go @@ -5977,6 +5977,7 @@ func initHandlers() { r.HandleFunc("/api/v1/workflows/{key}", deleteWorkflow).Methods("DELETE", "OPTIONS") r.HandleFunc("/api/v1/workflows/{key}", shuffle.SaveWorkflow).Methods("PUT", "OPTIONS") r.HandleFunc("/api/v1/workflows/{key}", shuffle.GetSpecificWorkflow).Methods("GET", "OPTIONS") + r.HandleFunc("/api/v1/workflows/recommend", shuffle.RecommendAction).Methods("POST", "OPTIONS") // Triggers r.HandleFunc("/api/v1/hooks/new", shuffle.HandleNewHook).Methods("POST", "OPTIONS") diff --git a/functions/onprem/orborus/build.sh b/functions/onprem/orborus/build.sh index d415fa20..fda2f4d0 100644 --- a/functions/onprem/orborus/build.sh +++ b/functions/onprem/orborus/build.sh @@ -1,9 +1,9 @@ NAME=shuffle-orborus -VERSION=1.1.4 +VERSION=1.1.5 echo "Running docker build with $NAME:$VERSION" #docker rmi frikky/shuffle:$NAME --force -docker build . -t frikky/shuffle:$NAME -t docker.pkg.github.com/frikky/shuffle/$NAME:$VERSION -t frikky/$NAME:$VERSION -t ghcr.io/frikky/$NAME:$VERSION -t ghcr.io/frikky/$NAME:nightly +docker build . -t frikky/shuffle:$NAME -t docker.pkg.github.com/frikky/shuffle/$NAME:$VERSION -t frikky/$NAME:$VERSION -t ghcr.io/frikky/$NAME:$VERSION -t ghcr.io/frikky/$NAME:nightly -t ghcr.io/shuffle/$NAME:$VERSION -t ghcr.io/shuffle/$NAME:nightly #docker push frikky/$NAME:$VERSION # docker push docker.pkg.github.com/frikky/shuffle/$NAME:$VERSION diff --git a/functions/onprem/orborus/go.mod b/functions/onprem/orborus/go.mod index 0f3264cb..6a392619 100644 --- a/functions/onprem/orborus/go.mod +++ b/functions/onprem/orborus/go.mod @@ -8,7 +8,7 @@ require ( github.com/docker/docker v23.0.0+incompatible github.com/mackerelio/go-osstat v0.2.3 github.com/satori/go.uuid v1.2.0 - github.com/shuffle/shuffle-shared v0.3.59 + github.com/shuffle/shuffle-shared v0.3.66 ) require ( diff --git a/functions/onprem/orborus/orborus.go b/functions/onprem/orborus/orborus.go index 161b9191..c2bbf2d4 100644 --- a/functions/onprem/orborus/orborus.go +++ b/functions/onprem/orborus/orborus.go @@ -1163,6 +1163,7 @@ func main() { } // Removes handled workflows (worker is made) + //log.Printf("\n\n[INFO] Removing %d executions from queue\n\n", len(toBeRemoved.Data)) if len(toBeRemoved.Data) > 0 { confirmUrl := fmt.Sprintf("%s/api/v1/workflows/queue/confirm", baseUrl)