Woodpecker Windows Agent - Backend Local
Tested on Windows Server 2022 Core installation
Copy directory agent\backend-local to C:\ProgramData\woodpecker-local
Edit global vars setup.cmd
WOODPECKER_AGENT_VERSION=" v2.8.0"
WOODPECKER_SERVER=" woodpecker.lan.xxxxx:39443"
WOODPECKER_HOSTNAME=" woodpecker-agentxxx"
WOODPECKER_AGENT_SECRET=" xxxxx"
WOODPECKER_MAX_WORKFLOWS=" 2"
WOODPECKER_FILTER_LABELS=" "
PLUGIN_GIT_VERSION=" 2.6.0"
C:\P rogramData\w oodpecker-local> .\s etup.cmd
Add Woodpecker plugins executable to path
C:\P rogramData\w oodpecker-local> set SETUP_PATH=" C:\ProgramData\woodpecker-local"
C:\P rogramData\w oodpecker-local> setx /M PATH " %SETUP_PATH%\bin;%PATH%"
Install Software Manager - Chocolatey
# install
PS C:\> Set-ExecutionPolicy Bypass - Scope Process - Force;
PS C:\> [System.Net.PS ServicePointManager ]::SecurityProtocol = [System.Net.ServicePointManager ]::SecurityProtocol -bor 3072 ;
PS C:\> iex ((New-Object System.Net.WebClient).DownloadString(' https://chocolatey.org/install.ps1' ))
# remember parameters on upgrade
choco feature enable - n= useRememberedArgumentsForUpgrades
C:\> choco install git -y --params " '/Symlinks /NoGuiHereIntegration'"
Git System User Authentification
C:\> mkdir c:\t mp
C:\> cd C:\t mp
C:\t mp> curl -fSSL -o pstools.zip https://download.sysinternals.com/files/PSTools.zip
C:\t mp> unzip pstools.zip -d pstools
C:\t mp> rm -f pstools.zip
C:\t mp> .\p stools\p sexec -i -s cmd.exe
# open new cmd.exe in system user
C:\W indows\s ystem32> whoami
nt authority\s ystem
C:\W indows\s ystem32> git clone < REPO_TEST_URL>
---
labels :
platform : windows/amd64
backend : local
steps :
# example use minio command: mc.exe to upload file # mc.exe must be in $PATH
- name : s3-upload-mc
image : bash.exe
secrets : [ bucket_name, access_key, secret_key ]
environment :
- S3_ENDPOINT=http://xxxx:9000
commands :
# connect alias
- mc.exe alias set myminio $$env:S3_ENDPOINT $$env:ACCESS_KEY $$env:SECRET_KEY
# status
- mc.exe admin info myminio
# upload file
- mc.exe cp README.md myminio/$$env:BUCKET_NAME/$$env:CI_REPO/mc/README
...