Commit 114b099c authored by Nico Baruna Putra's avatar Nico Baruna Putra

add gitlabrunner for linux

parent 9c74f68e
Pipeline #19297 failed with stages
echo "================ ITM GITLAB RUNNER SET SCRIPT =============="
echo "Installing npm and git"
sudo yum install nodejs -y && sudo yum install npm -y && sudo npm install pm2@l$
echo "installing gitlab runner"
curl -L "https://packages.gitlab.com/install/repositories/runner/gitlab-runner/$
sudo yum install gitlab-runner -y
echo "==== configure gitlab runner==="
sudo gitlab-runner register
......@@ -22,7 +22,9 @@ Write-Host -NoNewLine 'Press any key to continue...';
$null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown');
Write-Output "\n"
$toolsDirectory = "c:/tools/nuget.exe"
$toolsPath = "c:/tools"
$gitlalRunnerDirectory = "c:/tools/gitlab_runner/gitlabrunner.exe"
$gitlalRunnerPath = "c:/tools/gitlab_runner"
$msbuildToolsurl = "https://download.visualstudio.microsoft.com/download/pr/9fcc1f0c-c63f-4424-bc46-7351a59fba06/1ed7863dc633c57c42a88c5cef907048/vs_community.exe"
$msbuildToolsDirectory = "c:/tools/msbuild.exe"
$nugetUrl = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe"
......@@ -33,6 +35,9 @@ Write-Output "download nuget"
if(Test-Path $toolsDirectory -PathType Any) {
Write-Output "tools folder exist"
}else {
if(!Test-Path $toolsPath -PathType Any){
New-Item -ItemType Directory -Force -Path $toolsPath
}
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest -Uri $nugetUrl -OutFile $toolsDirectory
}
......@@ -52,6 +57,9 @@ Write-Output "download gitlab runner"
if(Test-Path $gitlalRunnerDirectory -PathType Any) {
Write-Output "gitlab runner folder exist"
}else {
if(!(Test-Path $gitlalRunnerPath -PathType Any)){
New-Item -ItemType Directory -Force -Path $gitlalRunnerPath
}
Invoke-WebRequest -Uri $gitlabRunnerUrl -OutFile $gitlalRunnerDirectory
}
#setting gitlab runner
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment