Created
March 4, 2024 12:06
-
-
Save kkamegawa/2e4427c45bb3959794bf8b4caf2da8ed to your computer and use it in GitHub Desktop.
Install codeql binary for Azure Pipelines selfhost agent
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- task: CmdLine@2 | |
condition: eq(variables['Agent.OS'], 'Linux') | |
displayName: 'prepare CodeQL binary Linux' | |
inputs: | |
script: | | |
curl https://raw.githubusercontent.com/microsoft/GHAzDO-Resources/main/src/agent-setup/codeql-install-ubuntu.sh -o $AGENT_TEMPDIRECTORY/codeql-install.sh | |
chmod 755 $AGENT_TEMPDIRECTORY/codeql-install.sh | |
sudo apt install jq -y | |
$AGENT_TEMPDIRECTORY/codeql-install.sh | |
- task: CmdLine@2 | |
condition: eq(variables['Agent.OS'], 'Darwin') | |
displayName: 'prepare CodeQL binary macOS' | |
inputs: | |
script: | | |
curl https://raw.githubusercontent.com/microsoft/GHAzDO-Resources/main/src/agent-setup/codeql-install-macos.sh -o $AGENT_TEMPDIRECTORY/codeql-install.sh | |
chmod 755 $AGENT_TEMPDIRECTORY/codeql-install.sh | |
brew install jq | |
$AGENT_TEMPDIRECTORY/codeql-install.sh | |
- task: PowerShell@2 | |
condition: eq(variables['Agent.OS'], 'Windows_NT') | |
displayName: 'prepare CodeQL binary Windows' | |
inputs: | |
targetType: 'inline' | |
script: | | |
Invoke-WebRequest https://raw.githubusercontent.com/microsoft/GHAzDO-Resources/main/src/agent-setup/codeql-install-windows.ps1 -OutFile $AGENT_TEMPDIRECTORY/codeql-install.ps1 | |
$AGENT_TEMPDIRECTORY/codeql-install.sh | |
pwsh: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment