Skip to content

Instantly share code, notes, and snippets.

@kkamegawa
Created March 4, 2024 12:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kkamegawa/2e4427c45bb3959794bf8b4caf2da8ed to your computer and use it in GitHub Desktop.
Save kkamegawa/2e4427c45bb3959794bf8b4caf2da8ed to your computer and use it in GitHub Desktop.
Install codeql binary for Azure Pipelines selfhost agent
- 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