Downloads:

18,511

Downloads of v 11.11.0:

283

Last Update:

5/21/2019

Package Maintainer(s):

Software Author(s):

  • Gitlab

Tags:

admin cli foss git cross-platform build docker shell gitlab

Gitlab Runner

This is not the latest version of Gitlab Runner available.

11.11.0 | Updated: 5/21/2019

Downloads:

18,511

Downloads of v 11.11.0:

283

Maintainer(s):

Software Author(s):

  • Gitlab

Gitlab Runner 11.11.0

This is not the latest version of Gitlab Runner available.

All Checks are Passing

2 Passing Test


Validation Testing Passed


Verification Testing Passed

Details

To install Gitlab Runner, run the following command from the command line or from PowerShell:

>

To upgrade Gitlab Runner, run the following command from the command line or from PowerShell:

>

To uninstall Gitlab Runner, run the following command from the command line or from PowerShell:

>

NOTE: This applies to both open source and commercial editions of Chocolatey.

1. Ensure you are set for organizational deployment

Please see the organizational deployment guide

  • Open Source or Commercial:
    • Proxy Repository - Create a proxy nuget repository on Nexus, Artifactory Pro, or a proxy Chocolatey repository on ProGet. Point your upstream to https://chocolatey.org/api/v2. Packages cache on first access automatically. Make sure your choco clients are using your proxy repository as a source and NOT the default community repository. See source command for more information.
    • You can also just download the package and push it to a repository Download

3. Enter your internal repository url

(this should look similar to https://chocolatey.org/api/v2)

4. Choose your deployment method:


choco upgrade gitlab-runner -y --source="'STEP 3 URL'" [other options]

See options you can pass to upgrade.

See best practices for scripting.

Add this to a PowerShell script or use a Batch script with tools and in places where you are calling directly to Chocolatey. If you are integrating, keep in mind enhanced exit codes.

If you do use a PowerShell script, use the following to ensure bad exit codes are shown as failures:


choco upgrade gitlab-runner -y --source="'STEP 3 URL'" 
$exitCode = $LASTEXITCODE

Write-Verbose "Exit code was $exitCode"
$validExitCodes = @(0, 1605, 1614, 1641, 3010)
if ($validExitCodes -contains $exitCode) {
  Exit 0
}

Exit $exitCode

- name: Ensure gitlab-runner installed
  win_chocolatey:
    name: gitlab-runner
    state: present
    version: 11.11.0
    source: STEP 3 URL

See docs at https://docs.ansible.com/ansible/latest/modules/win_chocolatey_module.html.

Coming early 2020! Central Managment Reporting available now! More information...


chocolatey_package 'gitlab-runner' do
  action    :install
  version  '11.11.0'
  source   'STEP 3 URL'
end

See docs at https://docs.chef.io/resource_chocolatey_package.html.


Chocolatey::Ensure-Package
(
    Name: gitlab-runner,
    Version: 11.11.0,
    Source: STEP 3 URL
);

Requires Otter Chocolatey Extension. See docs at https://inedo.com/den/otter/chocolatey.


cChocoPackageInstaller gitlab-runner
{
   Name     = 'gitlab-runner'
   Ensure   = 'Present'
   Version  = '11.11.0'
   Source   = 'STEP 3 URL'
}

Requires cChoco DSC Resource. See docs at https://github.com/chocolatey/cChoco.


package { 'gitlab-runner':
  provider => 'chocolatey',
  ensure   => '11.11.0',
  source   => 'STEP 3 URL',
}

Requires Puppet Chocolatey Provider module. See docs at https://forge.puppet.com/puppetlabs/chocolatey.


salt '*' chocolatey.install gitlab-runner version="11.11.0" source="STEP 3 URL"

See docs at https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.chocolatey.html.

5. If applicable - Chocolatey configuration/installation

See infrastructure management matrix for Chocolatey configuration elements and examples.

This package was approved as a trusted package on 5/21/2019.

Description

GitLab Runner is the open source project that is used to run your jobs and send the results back to GitLab. It is used in conjunction with GitLab CI, the open-source continuous integration service included with GitLab that coordinates the jobs.

Features

  • Allows to run:
    • multiple jobs concurrently
    • use multiple tokens with multiple server (even per-project)
    • limit number of concurrent jobs per-token
  • Jobs can be run:
    • locally
    • using Docker containers
    • using Docker containers and executing job over SSH
    • using Docker containers with autoscaling on different clouds and virtualization hypervisors
    • connecting to remote SSH server
  • Is written in Go and distributed as single binary without any other requirements
  • Supports Bash, Windows Batch and Windows PowerShell
  • Works on GNU/Linux, OS X and Windows (pretty much anywhere you can run Docker)
  • Allows to customize the job running environment
  • Automatic configuration reload without restart
  • Easy to use setup with support for Docker, Docker-SSH, Parallels or SSH running environments
  • Enables caching of Docker containers
  • Easy installation as a service for GNU/Linux, OSX and Windows
  • Embedded Prometheus metrics HTTP server

Package parameters

  • /InstallDir - Installation directory. If the Gitlab Runner is already installed, its current directory will be used. To install to a new directory, uninstall it first.
  • /Service - Install as a service. If value is not specified system account will be used. If value is specified it is in the form of Username:Password. The installer will create that user if it doesn't exist, add it to local administrators group, enable ServiceLogonRight and disable password expiration. Example: /Service:gitlab-runner:[email protected]. Can't be used with Autologon parameter
  • /Autologon - Use autologon feature of Windows. Can't be used with Service parameter. Username and password must be provided. Example: /Autologon:gitlab-runner:[email protected].

Notes

  • The script register_example.ps1 is provided along the executable which can be used to quickly register runner non-interactively. If you want to use it, rename it to register.ps1 and set desired environment variables.
  • Autologon vs Service: Services do not have access to all Windows features and some scripts, particularly those that depend on GUI, are not usable.

legal\LICENSE.txt
The MIT License (MIT)

Copyright (c) 2015-2017 GitLab B.V.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
legal\VERIFICATION.txt
VERIFICATION

Verification is intended to assist the Chocolatey moderators and community
in verifying that this package's contents are trustworthy.

Package can be verified like this:

1. Go to

   x32: https://gitlab-runner-downloads.s3.amazonaws.com/v11.11.0/binaries/gitlab-runner-windows-386.exe
   x64: https://gitlab-runner-downloads.s3.amazonaws.com/v11.11.0/binaries/gitlab-runner-windows-amd64.exe

   to download the installer.

2. You can use one of the following methods to obtain the SHA256 checksum:
   - Use powershell function 'Get-FileHash'
   - Use Chocolatey utility 'checksum.exe'

   checksum32: D77A06B250345089A0573089E922C82A2C74565E3A8064862FE91C9E3F79C096
   checksum64: E2B20591BE31059A62C549CB16990F34A1942A3B32A913FCD4440837F048071B


File 'license.txt' is obtained from:
   https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/raw/master/LICENSE
tools\autologon.xml
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
  <RegistrationInfo>
    <Author>DESKTOP-9Q3PK5G\majkinetor</Author>
    <URI>\autologon</URI>
  </RegistrationInfo>
  <Triggers>
    <LogonTrigger>
      <Enabled>true</Enabled>
      <UserId>DESKTOP-9Q3PK5G\gitlab-runner</UserId>
    </LogonTrigger>
  </Triggers>
  <Principals>
    <Principal id="Author">
      <UserId>DESKTOP-9Q3PK5G\gitlab-runner</UserId>
      <LogonType>InteractiveToken</LogonType>
      <RunLevel>HighestAvailable</RunLevel>
    </Principal>
  </Principals>
  <Settings>
    <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
    <DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
    <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
    <AllowHardTerminate>true</AllowHardTerminate>
    <StartWhenAvailable>false</StartWhenAvailable>
    <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
    <IdleSettings>
      <StopOnIdleEnd>true</StopOnIdleEnd>
      <RestartOnIdle>false</RestartOnIdle>
    </IdleSettings>
    <AllowStartOnDemand>true</AllowStartOnDemand>
    <Enabled>true</Enabled>
    <Hidden>false</Hidden>
    <RunOnlyIfIdle>false</RunOnlyIfIdle>
    <WakeToRun>false</WakeToRun>
    <ExecutionTimeLimit>PT0S</ExecutionTimeLimit>
    <Priority>7</Priority>
  </Settings>
  <Actions Context="Author">
    <Exec>
      <Command>C:\gitlab-runner\autologon.bat</Command>
    </Exec>
  </Actions>
</Task>
tools\chocolateyBeforeModify.ps1
Get-Service gitlab-runner -ea 0 | Stop-Service
ps gitlab-runner -ea 0 | kill
tools\chocolateyInstall.ps1
$ErrorActionPreference = 'Stop'

$toolsPath = Split-Path $MyInvocation.MyCommand.Definition
. $toolsPath\helpers.ps1

$pp = Get-PackageParameters

$current_dir = Get-RunnerInstallDir
if ($current_dir) {
    Write-Host 'Using previous gitlab-runner install path:' $current_dir
    $pp.InstallDir = $current_dir
} else {
    if (!$pp.InstallDir) { $pp.InstallDir = "c:\gitlab-runner" }
    Write-Host 'Using install directory:' $pp.InstallDir
}
$installDir = $pp.InstallDir

$is64 = (Get-ProcessorBits 64) -and $env:chocolateyForceX86 -ne 'true'
$runner_embedded = if ($is64) { Write-Host "Installing x64 bit version"; gi $toolsPath\*_x64.exe } else { Write-Host "Installing x32 bit version"; gi $toolsPath\*_x32.exe }

mkdir $installDir -ea 0 | Out-Null
mv $runner_embedded, $toolsPath\register_example.ps1 $installDir -force
ls $toolsPath\*.exe | % { rm $_ -ea 0; if (Test-Path $_) { touch "$_.ignore" }}
mv $installDir\gitlab*.exe $installDir\gitlab-runner.exe -Force

$runner_path = Join-Path $installDir 'gitlab-runner.exe'
Install-BinFile gitlab-runner $runner_path

if ($pp.Service) {
    if ($pp.Autologon) { throw 'Autologon and Service parameters are mutually exclusive' }

    if ($pp.Service -is [string]) { 
        $Username, $Password = $pp.Service -split ':'
        if (!$Password) { throw 'When specifying service user, password is required' } 
    }

    Write-Host "Installing gitlab-runner service"
    $cmd = "$runner_path install"
    if ($Username) {
        Add-User $Username $Password
        Add-ServiceLogonRight $Username
        $cmd += " --user $Env:COMPUTERNAME\$Username --password $Password" 
    }
    iex $cmd

    Write-Host "Starting service"
    iex "$runner_path start"
}

if ($pp.Autologon) { 
    if ($pp.Service) { throw 'Autologon and Service parameters are mutually exclusive' }
    
    $Username, $Password = $pp.Autologon -split ':'
    if (!$Password) { throw 'When specifying autologon user, password is required' } 
    
    Add-User $Username $Password

    Write-Host "Setting autologon for $Username"
    Set-AutoLogon $Username $Password 
    
    Write-Host "Creating logon script: $installDir\autologon.bat"
    "cd ""$installDir""`n" +
    """$installDir\gitlab-runner.exe"" run" | Out-File $installDir\autologon.bat -Encoding ascii

    Write-Host "Creating scheduled task: autologon"
    [xml] $xml = gc $toolsPath\autologon.xml -Encoding Ascii
    $xml.Task.RegistrationInfo.Author       = "$Env:COMPUTERNAME\$Env:USERNAME"
    $xml.task.Triggers.LogonTrigger.UserId  = "$Env:COMPUTERNAME\$Username"
    $xml.task.Principals.Principal.UserId   = "$Env:COMPUTERNAME\$Username"
    $xml.task.Actions.Exec.Command          = "$installDir\autologon.bat"
    $xml.Save( "$toolsPath\autologon.xml" )

    schtasks.exe /Create /XML "$toolsPath\autologon.xml" /Tn autologon /F
    if ($LASTEXITCODE) { throw "Scheduled task not created ($LastExitCode)" }
}
tools\chocolateyUninstall.ps1
$toolsPath = Split-Path $MyInvocation.MyCommand.Definition
. $toolsPath\helpers.ps1

if (gsv gitlab-runner -ea 0) {
    gitlab-runner.exe stop
    gitlab-runner.exe uninstall
}

$installDir = Get-RunnerInstallDir

Write-Warning 'If a gitlab-runner user is created during the installation, it is not removed as a safety measure'
Write-Warning '  to remove it execute: net user gitlab-runner /delete'
Write-Warning 'If Autologon parameter was used when installing, disable autolog manually'

# It might not be safe to just rm -Force -Recursive, let the user do it manually.
if ($installDir) {
    Write-Warning "Gitlab-runner remained installed in $installDir"
    Write-Warning "  to delete it execute: rm '$installDir' -Force -Recurse"
} else {
    Write-Warning "Can't find gitlab-runner installation directory, please remove it manually"
}
tools\gitlab-runner-windows-386_x32.exe
md5: 601EA4F467BD0583EEA287B6487D1975 | sha1: 11C03DF95D207E9ACECF1AE2AF920776DD90A428 | sha256: D77A06B250345089A0573089E922C82A2C74565E3A8064862FE91C9E3F79C096 | sha512: 57A2E07D30892EFB285D209F961E3B7986877ADF5DDCD9374A9AF9C7505E36D4B0E9D43BB547B9FDAC76BC856FB5EDC7EC80751A98D9B7382405764BD171F179
tools\gitlab-runner-windows-amd64_x64.exe
md5: A74FB1F4D7506578C16EC1935E26A4A8 | sha1: 1C43D209546D8C2673E1EA3160FA7A0E61EA2D12 | sha256: E2B20591BE31059A62C549CB16990F34A1942A3B32A913FCD4440837F048071B | sha512: 1048E468BD19992077F321D86EBB6EFEE92CB19478BDA69C1FEB55612D6222C9CFC9DB99E09F32E288BF05ACC09D3392739A89A48E51FD62AD8D2F1CC1960C42
tools\helpers.ps1
function Get-RunnerInstallDir() {
    $res = Get-WmiObject win32_service | ? {$_.Name -eq 'gitlab-runner'} | select -Expand PathName
    if (!$res) { 
        if (!(gcm gitlab-runner.exe -ea 0)) { return }
        $res = (gitlab-runner.exe --shimgen-help 2>&1) -match '^\s*Target:' -replace "Target:|'"
        $res = $res.Trim()
    }
    $res = $res -split '\\gitlab-runner.exe' | select -First 1
    if (Test-Path $res) { return $res }
}

function Add-ServiceLogonRight([string] $Username) {
    Write-Host "Enable ServiceLogonRight for $Username"
    
    $tmp = [System.IO.Path]::GetTempFileName()
    secedit /export /cfg "$tmp.inf" | Out-Null
    (gc -Encoding ascii "$tmp.inf") -replace '^SeServiceLogonRight .+', "`$0,$Username" | sc -Encoding ascii "$tmp.inf"
    secedit /import /cfg "$tmp.inf" /db "$tmp.sdb" | Out-Null
    secedit /configure /db "$tmp.sdb" /cfg "$tmp.inf" | Out-Null
    rm $tmp* -ea 0
}

function Add-User([string] $Username, [string] $Password ) {
    $user = Get-WmiObject win32_useraccount -Filter { LocalAccount = 'true' } | ? { $_.Name -eq $Username }
    if ($user) { Write-Host "User $Username already exists"; return } 

    Write-Host "Creating user $Username as local administrator"
    net user $Username $Password /add | Out-Null
    net localgroup Administrators $Username /add | Out-NUll
    $user = Get-WmiObject win32_useraccount -Filter { LocalAccount = 'true' } | ? { $_.Name -eq $Username }
    $user.PasswordExpires = $false
}


# Author: Miodrag Milic <[email protected]>
# Last Change: 23-Jun-2016.

<#
.SYNOPSIS
    Set Windows to automatically login as given user after restart and eventually execute a script

.DESCRIPTION
    Enable AutoLogon next time when the server reboots.
    It can trigger a specific Script to execute after the server is back online after Auto Logon.

.EXAMPLE
    Set-AutoLogon -Username "domain\user" -Password "my password"

.EXAMPLE
    Set-AutoLogon -Username "domain\user" -Password "my password" -LogonCount 3

.EXAMPLE
    Set-AutoLogon -Username "domain\user" -Password "my password" -Script "c:\test.bat"
.LINK
    https://github.com/majkinetor/posh/blob/master/MM_Admin/Set-AutoLogon.ps1
#>
function Set-AutoLogon {
    [CmdletBinding()]
    Param(
        #Provide the username that the system would use to login.
        [Parameter(Mandatory=$true)]
        [String]$Username,

        #Provide the Password for the User provided.
        [Parameter(Mandatory=$true)]
        [String]$Password,

        #Sets the number of times the system would reboot without asking for credentials, by default 100000.
        [String]$LogonCount=100000,

        #Script: Provide Full path of the script for execution after server reboot
        [String]$Script
    )

    $ErrorActionPreference = 'Stop'

    $RegPath   = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
    $RegROPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce"

    Set-ItemProperty $RegPath "AutoAdminLogon"  -Value 1
    Set-ItemProperty $RegPath "DefaultUsername" -Value $Username
    Set-ItemProperty $RegPath "DefaultPassword" -Value $Password
    #Set-ItemProperty $RegPath "DefaultDomain" -Value $Env:USERDOMAIN

    $v = if ($LogonCount)  { $LogonCount } else { '' }
    Set-ItemProperty $RegPath "AutoLogonCount" -Value $v -Type DWord

    $v = if ($Script)  { $Script } else { '' }
    Set-ItemProperty $RegROPath "Set-Autologon" -Value $v
}
tools\register_example.ps1
<# 
    Rename this file to register.ps1 or it will get overwritten by the future updates.
    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:REGISTRATION_TOKEN         = ''
$Env:CI_SERVER_URL              = ''
$Env:RUNNER_TAG_LIST            = ''        #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

In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).

Chocolatey Pro provides runtime protection from possible malware.

Version Downloads Last Updated Status
Gitlab Runner 12.2.0 725 Friday, August 23, 2019 Approved
Gitlab Runner 12.1.0 743 Saturday, July 20, 2019 Approved
Gitlab Runner 12.0.0 653 Saturday, June 22, 2019 Approved
Gitlab Runner 11.11.2 578 Tuesday, June 4, 2019 Approved
Gitlab Runner 11.11.0 283 Tuesday, May 21, 2019 Approved
Gitlab Runner 11.10.0 522 Saturday, April 20, 2019 Approved
Gitlab Runner 11.9.0 465 Saturday, March 23, 2019 Approved
Gitlab Runner 11.8.0 666 Saturday, February 23, 2019 Approved
Gitlab Runner 11.7.0 572 Tuesday, January 22, 2019 Approved
Discussion for the Gitlab Runner Package

Ground Rules:

  • This discussion is only about Gitlab Runner and the Gitlab Runner package. If you have feedback for Chocolatey, please contact the Google Group.
  • This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
  • The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
  • Tell us what you love about the package or Gitlab Runner, or tell us what needs improvement.
  • Share your experiences with the package, or extra configuration or gotchas that you've found.
  • If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.
comments powered by Disqus