0 Preface/Foreword
0.1 参考文档
Starting Windows PowerShell - PowerShell | Microsoft Learn
1 Powershell 介绍
2 命令介绍
2.1 新建文件夹
New-Item -Path 'C:\GitLab-Runner' -ItemType Directory
2.2 切换路径
cd 'C:\GitLab-Runner'
2.3 下载文件
Invoke-WebRequest -Uri "https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-windows-amd64.exe" -OutFile "gitlab-runner.exe"
2.4 安装文件
.\gitlab-runner.exe install
2.5 运行文件
.\gitlab-runner.exe start
针对gitlab-runner,注册 runner。
./gitlab-runner.exe register --url https://git.$COMPANY_WEBSITE --registration-token $REGISTRATION_TOKEN