-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
a powershell script scheduled at boot to register the runner
- Loading branch information
1 parent
33d8831
commit 4c585b8
Showing
2 changed files
with
54 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<# | ||
For the list of all environment vars run `gitlab-runner register --help`. | ||
After registration, config.toml is generated and subsequent configuration changes should | ||
be set in that file. Gitlab-Runner automatically picks up config.toml changes while executing. | ||
#> | ||
|
||
$Env:RUNNER_NAME = $env:COMPUTERNAME | ||
$Env:REGISTRATION_TOKEN = '{{ gitlab_runner_token }}' | ||
$Env:CI_SERVER_URL = '{{ gitlab_external_url }}' | ||
$Env:RUNNER_TAG_LIST = 'windows,win32,win64' #comma separated list of tags | ||
|
||
$Env:CONFIG_FILE = "$PSScriptRoot\config.toml" | ||
$Env:REGISTER_RUN_UNTAGGED = 'false' | ||
$Env:REGISTER_LOCKED = $false #lock runner to current project | ||
$Env:RUNNER_EXECUTOR = 'shell' | ||
$Env:RUNNER_SHELL = 'powershell' | ||
|
||
$Env:RUNNER_REQUEST_CONCURRENCY = 1 | ||
$Env:RUNNER_BUILDS_DIR = '' | ||
$Env:RUNNER_CACHE_DIR = '' | ||
|
||
|
||
gitlab-runner register --non-interactive |