Cloud customer?
Start for Free >
Upgrade in MyJFrog >
What's New in Cloud >





Overview

The JFrog Platform Access Token integration gives steps the ability to utilize an access token to interact with different pieces of the JFrog platform.  These tokens can be used for many of JFrog's REST APIs, including the Pipelines API.  This integration is also required when using the TriggerPipeline native step.

Page Contents


Creating an Integration

Add this integration by following steps on the Managing Pipelines Integrations page.

Here is the information you need to create this integration:

  • Name -- Choose a friendly name for the integration
  • Platform URL -- The Platform URL is automatically added for the user adding the integration. If required, you can manually enter the HTTP Endpoint (URL) for your JFrog Platform.
  • Access Token -- Your Artifactory API Key. You can automatically generate a token that represents the logged in user from the User Profile page, or you can follow the Access Tokens documentation to create a more nuanced token with particular scopes.

Usage

With native steps: An Artifactory integration is mandatory in the integrations section of the TriggerPipeline native step:

Default Environment Variables

When you add this integration directly to a step, a set of environment variables is automatically made available.

Environment variable

Description

int_<integration_name>_urlThe API Endpoint of the JFrog Platform
int_<integration_name>_accessTokenThe token used to access the JFrog Platform

Examples

pipelines:
  steps:
  	- name: scan_controller
      type: TriggerPipeline
      configuration:
        pipelineName: steptarget
        stepName: scanIt
        integrations:
          - name: myPlatformToken
        environmentVariables:
          scan_target:
            default: "hello-world"
            allowCustom: true
            values:
              - "vault"
              - "redis"
              - "postgresql"
      execution:
        onStart:
          - set_trigger_payload pipelineVariables "scan_target=${scan_target}"
          - set_trigger_payload stepVariables "notify=email" "uploadReport=true"
        onComplete:
          - echo "Final status is $nested_run_status"
  • No labels
Copyright © 2022 JFrog Ltd.