GitLab: Runner (Windows)

Aus Wiki-WebPerfect
Wechseln zu: Navigation, Suche

Install GitLab-Runner on Windows as a Windows service

  • Create a folder somewhere in your system, ex.: C:\GitLab-Runner.
  • Download the binary and put it into the folder you created. Rename the binary to gitlab-runner.exe.
  • Run an elevated command prompt.
  • Install the Runner as a service and start it. You can either run the service using the Built-in System Account (recommended) or using a user account.
    • Run service using Built-in System Account:
.\gitlab-runner.exe install
.\gitlab-runner.exe start
  • Run service using user account:
.\gitlab-runner.exe install --user <ENTER-YOUR-USERNAME> --password <ENTER-YOUR-PASSWORD>
.\gitlab-runner.exe start
  • (Optional) Update Runners concurrent value in C:\GitLab-Runner\config.toml to allow multiple concurrent jobs as detailed in advanced configuration details. Additionally you can use the advanced configuration details to update your shell executor to use Bash or PowerShell rather than Batch.

Voila! Runner is installed, running, and will start again after each system reboot. Logs are stored in Windows Event Log More informations: https://docs.gitlab.com/runner/install/windows.html



GitLab Runner behind a proxy

  • Add your proxy server in the GitLab Runner configuration "config.toml" (for example):

Ungültige Sprache.

Die gewünschte Sprache muss wie folgt definiert werden: <source lang="html4strict">...</source>

Unterstützte Sprachen für die Syntaxhervorhebung:

4cs, 6502acme, 6502kickass, 6502tasm, 68000devpac, abap, actionscript, actionscript3, ada, algol68, apache, applescript, apt_sources, arm, asm, asp, asymptote, autoconf, autohotkey, autoit, avisynth, awk, bascomavr, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, c_loadrunner, c_mac, caddcl, cadlisp, cfdg, cfm, chaiscript, cil, clojure, cmake, cobol, coffeescript, cpp, cpp-qt, csharp, css, cuesheet, d, dcl, dcpu16, dcs, delphi, diff, div, dos, dot, e, ecmascript, eiffel, email, epc, erlang, euphoria, f1, falcon, fo, fortran, freebasic, freeswitch, fsharp, gambas, gdb, genero, genie, gettext, glsl, gml, gnuplot, go, groovy, gwbasic, haskell, haxe, hicest, hq9plus, html4strict, html5, icon, idl, ini, inno, intercal, io, j, java, java5, javascript, jquery, kixtart, klonec, klonecpp, latex, lb, ldif, lisp, llvm, locobasic, logtalk, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, magiksf, make, mapbasic, matlab, mirc, mmix, modula2, modula3, mpasm, mxml, mysql, nagios, netrexx, newlisp, nsis, oberon2, objc, objeck, ocaml, ocaml-brief, octave, oobas, oorexx, oracle11, oracle8, oxygene, oz, parasail, parigp, pascal, pcre, per, perl, perl6, pf, php, php-brief, pic16, pike, pixelbender, pli, plsql, postgresql, povray, powerbuilder, powershell, proftpd, progress, prolog, properties, providex, purebasic, pycon, pys60, python, q, qbasic, rails, rebol, reg, rexx, robots, rpmspec, rsplus, ruby, sas, scala, scheme, scilab, sdlbasic, smalltalk, smarty, spark, sparql, sql, stonescript, systemverilog, tcl, teraterm, text, thinbasic, tsql, typoscript, unicon, upc, urbi, uscript, vala, vb, vbnet, vedit, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, whois, winbatch, xbasic, xml, xorg_conf, xpp, yaml, z80, zxbasic


 concurrent = 8
 check_interval = 0
 log_level = "warning"
 
 [session_server]
 	session_timeout = 1800
 
 [[runners]]
 	name = "<FQDN>"
 	executor = "shell"
 	shell = "powershell"
 	environment = ["HTTP_PROXY=<your_Proxy_if_needed>","HTTPS_PROXY=<your_Proxy_if_needed>"]
 	url = "https://<your_GitLab>/"
 	token = "<your_token_from_registering_the_runner>"
 	tls_verify = false
  • Add the following Registry-Key to force the GitLab-Runner service to use the proxy:
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\gitlab-runner\" -Name "Environment" -Value "HTTPS_PROXY=server-proxy.xaas.swissic.ch:8080" -PropertyType MultiString