mirror of
https://github.com/semaphoreui/semaphore.git
synced 2024-11-25 06:15:56 +01:00
d1b7ad021e
* feat(runners): add register endpoint * feat(runners): add remote runner * refactor(runners): move functionality TaskRunner -> AnsibleJobRunner * fix(runners): init job * chore(runners): remote unused field * feat(runners): use external logger from AnsibleJobRunner * refactor(runners): remove status field * refactor(runners): remove mutation from job * feat(runners): pass username and verison to task * test(runners): fix tests * fix(runners): params for Run * feat(runners): implement runner selection * feat(runners): fill required fields * fix(runners): session block * feat(runners): kill process * refactor(runners): rename fields to public * feat(runners): remote runner functionallity * refactor(runners): remove unused class * fix(runners): send json * feat(runners): runner registration * feat(runners): logging * feat(runners): server <-> running communication works * feat(runners): pass creds to runenr
28 lines
453 B
Go
28 lines
453 B
Go
package cmd
|
|
|
|
import (
|
|
"github.com/ansible-semaphore/semaphore/services/runners"
|
|
"github.com/ansible-semaphore/semaphore/util"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func init() {
|
|
rootCmd.AddCommand(runnerCmd)
|
|
}
|
|
|
|
func runRunner() {
|
|
util.ConfigInit(configPath)
|
|
|
|
taskPool := runners.JobPool{}
|
|
|
|
taskPool.Run()
|
|
}
|
|
|
|
var runnerCmd = &cobra.Command{
|
|
Use: "runner",
|
|
Short: "Run in runner mode",
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
runRunner()
|
|
},
|
|
}
|