LogoLogo
Login to CortexBook a DemoCortex Academycortex.io
  • Cortex Docs
  • Cortex Quick Start
  • Ingesting data into Cortex
    • Managing Entities
      • Adding entities
        • Add services
        • Add domains
        • Add teams
        • Add custom entity types
        • Defining dependencies
      • Entity details page
      • Defining ownership
      • Defining relationship types
      • Grouping entities
      • Adding external documentation
      • Adding Deploy data
      • Adding custom data
      • Viewing discovered entities
      • Archiving entities
      • Relationship graph
      • Using On-call Assistant for incidents
      • Managing Terraform infra in Cortex
    • Managing Catalogs
    • Integrations
      • Internally hosted integrations
      • ArgoCD
      • AWS
      • Azure DevOps
      • Azure Resources
      • BambooHR
      • Bitbucket
      • BugSnag
      • Buildkite
      • Checkmarx
      • CircleCI
      • ClickUp
      • Codecov
      • Coralogix
      • Datadog
      • Dynatrace
      • Entra ID (Azure AD)
      • FireHydrant
      • GitHub
      • GitLab
      • Google
      • Grafana
      • incident.io
      • Instana
      • Jenkins
      • Jira
      • Kubernetes
      • LaunchDarkly
      • Lightstep
      • Mend
      • Microsoft Teams
      • New Relic
      • Okta
      • Opsgenie
      • PagerDuty
      • Prometheus
      • Rollbar
      • Rootly
      • Sentry
      • ServiceNow
      • Slack
      • Snyk
      • SonarQube
      • Splunk Observability Cloud (SignalFx)
      • Splunk On-Call (VictorOps)
      • Sumo Logic
      • Veracode
      • Wiz
      • Workday
      • xMatters
  • Scorecards
    • Initiatives and Action items
      • Creating issues based on Initiatives
    • Scorecard rule exemptions
    • Scorecard rule filters
    • Scorecard examples
    • Scorecards as code
  • Reports
    • Executive report
    • All Scorecards report
    • Bird's eye report
    • Progress report
    • Report card
  • Eng Intelligence
    • Custom Metrics
    • Jira Metrics
    • Metrics Explorer (Beta)
  • Cortex Query Language (CQL)
    • Using CQL reports
    • Using JQ in Cortex
  • Workflows
    • Creating a Workflow
      • Workflows as code
    • Blocks
    • Running a Workflow
    • Registering a Scaffolder template
      • Scaffolder advanced usage
    • Using a Workflow to sync in ArgoCD
    • Kicking off a Jenkins pipeline in a Workflow
  • Plugins
    • Creating a plugin
      • Creating a plugin proxy
    • Migrating Backstage plugins to Cortex
  • Engineering homepage
  • Workspace Settings
    • Using GitOps for Cortex
      • GitOps logs
    • Managing users
      • Roles and permissions
        • Custom roles
        • Team ownership entity editing
      • Configuring SSO
        • Microsoft Entra ID
        • Google
        • Other OIDC providers
        • Okta
          • Okta SCIM
      • Configuring identity mappings
      • Onboarding management
    • API keys, secrets, and tokens
      • Secrets
      • Personal tokens
    • Audit logs
    • Entity settings
      • Data verification
      • Auto archiving entities
    • IP allowlist
    • Notifications
      • Notification logs
    • Customizing your workspace
    • Using search in Cortex
  • Cortex API
    • REST API operations
      • API Keys
      • Audit Logs
      • Catalog Entities
      • Custom Data
        • Custom Data (Advanced)
      • Custom Events
      • Custom Metrics
      • Dependencies
      • Deploys
      • Discovery Audit
      • Docs
      • Eng Intel: User Labels
      • Entity Relationship Types (Beta)
      • Entity Relationships (Beta)
      • Entity Types
      • GitOps Logs
      • Groups
      • Initiatives
      • Integrations APIs
        • Azure Active Directory (Entra ID) API
        • Azure Resources API
        • AWS API
        • Azure DevOps API
        • CircleCI API
        • Coralogix API
        • Datadog API
        • GitHub API
        • GitLab API
        • incident.io API
        • LaunchDarkly API
        • New Relic API
        • PagerDuty API
        • Prometheus API
        • SonarQube API
      • IP Allowlist
      • Notification Logs
      • On call
      • Packages
      • Plugins
      • Queries
      • SCIM
      • Scorecards
      • Secrets
      • Team Hierarchies
      • Teams
      • Workflows
Powered by GitBook
On this page
  • How to kick off a Jenkins pipeline in a Workflow
  • Prerequisites
  • Step 1: Create a secret in Cortex
  • Step 2: Create a workflow
  • Step 3: Add blocks to the workflow

Was this helpful?

Export as PDF
  1. Workflows

Kicking off a Jenkins pipeline in a Workflow

Last updated 1 day ago

Was this helpful?

After integrating Cortex with , you can use a Cortex to kick off your pipeline directly through Cortex, rather than switching to Jenkins to launch a build.

For full instructions on creating and configuring Workflows, see the .

How to kick off a Jenkins pipeline in a Workflow

Prerequisites

Before getting started:

  • Generate an API token in Jenkins

    • In Jenkins, navigate to user settings > Configure > API Token.

  • Generate a base64-encoded authentication header. After generating the header, copy it and store it in a secure location, as you will need it in the next step.

    • You can generate the header with a command line tool or a basic authentication tool such as .

      • If using Mixed Analytics, enter the token into their encoding tool using the format username:token, replacing username with the username used to create the Jenkins token and replacing token with the value of your Jenkins API token.

      • When using an authentication tool such as Mixed Analytics to generate the authentication header, do not include the equal signs that are appended to the header. For example, if the tool returns xxxxxxxxxx6789== as the encoded header, you only need to save the value xxxxxxxxxx6789 for the next step.

Step 1: Create a secret in Cortex

  1. Navigate to the page and click Add secret.

  2. In the modal, configure the secret:

    • Name: Enter a descriptive name, such as Jenkins.

    • Identifier: Enter a unique identifier for the secret.

    • Secret value: Enter the base64-encoded authentication header you generated in the previous step.

  3. Click Add secret.

Step 2: Create a workflow

  1. In the main nav of Cortex, click Workflows.

    • Give the Workflow a descriptive name such as "Kick off Jenkins pipeline."

Step 3: Add blocks to the workflow

  1. Click + to view the block library.

  2. Click Jenkins.

    • To choose a a build without parameters, select Run a build.

    • To choose a build with parameters, select Run a build with parameters.

  3. Click Insert at the bottom of the library.

  4. In the side panel, configure the block.

    • Block name: Enter a name for the block (e.g., Run a build in Jenkins).

    • Slug: Enter a unique slug for the block.

    • Jenkins URL: Enter the base URL of your Jenkins server (e.g., https://jenkins.example.com).

    • Job name: Enter the name of the Jenkins job to run.

    • Authentication token: Enter the secret you created in Cortex in the previous steps.

    • Parameters: For a build with parameters, you also need to configure valid JSON for the run job parameters.

  5. At the bottom of the side panel, click Save.

Follow the steps of the to start creating a Workflow from scratch and configure its settings.

In the Response template field you can pass a blank response body or use to create messages depending on what the user enters in each field.

You can add a block to run a build with parameters, or you can add a block to run a build without parameters. See the Jenkins documentation for .

Workflows documentation
Mustache templating
more information on submitting parameterized jobs
Jenkins
Workflow
Workflows documentation
Mixed Analytics
Secrets
Select the Jenkins "Run a build" block.