Skip to content

Commit

Permalink
feat(runners): add token to runner config
Browse files Browse the repository at this point in the history
  • Loading branch information
fiftin committed Sep 28, 2024
1 parent 8a1af90 commit 0a92e7c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ web/public/fonts/*.*
web/.nyc_output
api/public/**/*
/config.json
/config-runner.json
/.dredd/config.json
/database.boltdb
/database.boltdb.lock
Expand Down
8 changes: 0 additions & 8 deletions config-runner.json

This file was deleted.

8 changes: 7 additions & 1 deletion util/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ const (
//
// */

// Deprecated
type RunnerConfig struct {
RunnerID int `json:"runner_id" env:"SEMAPHORE_RUNNER_ID"`
Token string `json:"token" env:"SEMAPHORE_RUNNER_TOKEN"`
Expand All @@ -99,7 +100,12 @@ type RunnerConfig struct {
type RunnerSettings struct {
ApiURL string `json:"api_url" env:"SEMAPHORE_RUNNER_API_URL"`
RegistrationToken string `json:"registration_token" env:"SEMAPHORE_RUNNER_REGISTRATION_TOKEN"`
ConfigFile string `json:"config_file" env:"SEMAPHORE_RUNNER_CONFIG_FILE"`

// Deprecated
ConfigFile string `json:"config_file" env:"SEMAPHORE_RUNNER_CONFIG_FILE"`

Token string `json:"token" env:"SEMAPHORE_RUNNER_TOKEN"`
TokenFile string `json:"token_file" env:"SEMAPHORE_RUNNER_TOKEN_FILE"`

// OneOff indicates than runner runs only one job and exit. It is very useful for dynamic runners.
// How it works?
Expand Down

0 comments on commit 0a92e7c

Please sign in to comment.