Skip to content

jenkinsci/codeql-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

CodeQL Plugin

Build Status Contributors Jenkins Plugin GitHub release Jenkins Plugin Installs

Introduction

The CodeQL Plugin automatically installs and sets up the CodeQL CLI on a Jenkins agent during a build.

Functionality

During a build this plugin will:

  • Install a specific version of the CodeQL CLI
  • Add the following environment variables:
    • PATH: The CodeQL CLI home will be added to the PATH variable so that the tool will be available during build
    • CODEQL_CLI_HOME: A new environment variable will be added containing the home of the CODEQL_CLI

Getting started

  • In the Jenkins global tool configuration settings (Manage Jenkins → Global Tool Configuration), find the "CodeQL" section, click "CodeQL Installations…" and "Add CodeQL".
  • Enter a name, e.g. "CodeQL 2.5.5": This will be the name entered in the Pipeline
  • Select "Install automatically" and select the desired CodeQL version from the drop-down list

For pipelines, you can use the tool step or the withCodeQL step as seen below:

node {
    stage('Build') {
         withCodeQL(codeql: 'CodeQL 2.5.5') {
            sh 'codeql --version'
        }
    }
}

Contributing

Refer to our contribution guidelines

LICENSE

Licensed under MIT, see LICENSE