Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add runner registration options for enhanced CLI configuration #3272

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
Copilot wants to merge 4 commits into develop
base: develop
Choose a base branch
Loading
from copilot/fix-3220

Conversation

Copy link
Contributor

@Copilot Copilot AI commented Sep 2, 2025
edited
Loading

This PR implements comprehensive runner registration options to streamline runner setup and reduce manual configuration overhead for enterprise usage.

New CLI Options

The semaphore runner register command now supports the following flags:

semaphore runner register \
 --hostname "my-runner-01" \
 --enabled \
 --project-name "my-project" \
 --webhook "https://example.com/hook" \
 --tags "linux,aws,build"
# Or with stdin token:
echo "REGISTRATION_TOKEN" | semaphore runner register \
 --stdin-registration-token \
 --hostname "my-runner-01" \
 --disabled \
 --tags "windows,test"

Key Features

  • --hostname: Sets runner name/hostname for unique identification
  • --enabled/--disabled: Controls runner active state with proper precedence (disabled takes priority)
  • --project-name: Associates runner with specified project (foundation for future project lookup enhancement)
  • --webhook: Sets webhook URL for runner integration
  • --tags: Accepts comma-separated list of tags for runner categorization and filtering

Implementation Details

  • CLI flags override config file values as designed
  • Defaults to enabled=true when neither flag is specified
  • Added robust nil pointer checks and config initialization
  • Extended RunnerRegistration struct and API endpoint to handle new fields
  • Full backward compatibility maintained

Testing

  • Added comprehensive unit tests for CLI flag processing
  • API structure validation tests
  • Manual testing with live server confirms all scenarios work correctly
  • All existing tests continue to pass

This enhancement makes runner registration more declarative, supports both automated and manual workflows, and significantly reduces post-setup configuration requirements.

Fixes #3220.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • ohn
    • Triggering command: ./bin/semaphore setup (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💬 Share your feedback on Copilot coding agent for the chance to win a 200ドル gift card! Click here to start the survey.

Copilot AI and others added 3 commits September 2, 2025 20:31
Co-authored-by: fiftin <914224+fiftin@users.noreply.github.com>
Co-authored-by: fiftin <914224+fiftin@users.noreply.github.com>
Co-authored-by: fiftin <914224+fiftin@users.noreply.github.com>
@Copilot Copilot AI changed the title (削除) [WIP] Feature: Runner registration options (削除ここまで) (追記) Add runner registration options for enhanced CLI configuration (追記ここまで) Sep 2, 2025
@Copilot Copilot AI requested a review from fiftin September 2, 2025 20:45
Copilot finished work on behalf of fiftin September 2, 2025 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@fiftin fiftin Awaiting requested review from fiftin

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Feature: Runner registration options

2 participants

AltStyle によって変換されたページ (->オリジナル) /