The JFrog Platform Access Token integrationgives 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.
Creating a JFrog Platform Access Token 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.
When creating an Access Token, ensure that Token scope and User name are
Admin
.
Usage
With native steps: An Artifactory integration or JFrog Platform Access Token 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 |
---|---|
| The API Endpoint of the JFrog Platform |
| The token used to access the JFrog Platform |
Example
pipelines: - name: myPipeline 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"