The Distribution Integration connects your JFrog Pipeline Automation platform to a Distribution instance.
Creating a Distribution 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
Distribution URL -- The Distribution URL is automatically added for the user adding the integration. If required, you can manually enter the HTTP Endpoint (URL) for your JFrog Distribution.
User -- The Distribution username is automatically added for the user adding the integration. If required, you can manually enter the username for your JFrog Distribution.
API Key -- Your Distribution API key.
Click Get API Key to automatically fetch API key for the user adding the integration. If the API key does not exist, a new one is generated. If required, you can manually enter the API key for your JFrog Distribution.
Signing Key Passphrase -- Your optional GPG signing key passphase.
Usage
A Distribution integration is used in the following resources:
Default Environment Variables
When you create a DistributionRule or ReleaseBundle resource with this integration, a set of environment variables is automatically made available that you can use in your scripts.
Environment variable | Description |
|---|---|
| Distribution URL |
| Username supplied in the integration |
| API Key supplied in the integration |
| GPG signing key passphrase supplied in the integration |
When you add this integration directly to a step, a set of environment variables is automatically made available that you can use in your scripts.
Environment variable | Description |
|---|---|
int_<integration_name>_url | Distribution URL |
int_<integration_name>_user | Username supplied in the integration |
| API Key supplied in the integration |
| GPG signing key passphrase supplied in the integration |
Examples
This example uses a BuildInfo resource to create, sign and distribute a release bundle. It assumes that a Distribution integration named myDist has been created.
In addition to the Distribution integration, this example requires an Artifactory integration or JFrog Platform Access Token Integration.
CreateReleaseBundle
template: true # required for local templates
valuesFilePath: ./values.yml
resources:
# Build info of first build to bundle
- name: gosvc_promoted_build_info
type: BuildInfo
configuration:
sourceArtifactory: {{ .Values.myArtifactoryIntegration }}
buildName: svc_build
buildNumber: 1
# Build info of second build to bundle
- name: appl_promoted_build_info
type: BuildInfo
configuration:
sourceArtifactory: {{ .Values.demoArtifactoryIntegration }}
buildName: backend_build
buildNumber: 1
# Release bundle
- name: release_bundle
type: ReleaseBundle
configuration:
sourceDistribution: {{ .Values.distributionIntegration }}
name: demo_rb
version: v1.0.0
# Signed version of the same release bundle
- name: signed_bundle
type: ReleaseBundle
configuration:
sourceDistribution: {{ .Values.distributionIntegration }}
name: demo_rb
version: v1.0.0
# Distribution rules
- name: distribution_rules
type: DistributionRule
configuration:
sourceDistribution: {{ .Values.distributionIntegration }}
serviceName: "*"
siteName: "*"
cityName: "*"
countryCodes:
- "CN"
- "GB"
pipelines:
- name: demo_release_mgmt
steps:
- name: bundle
type: CreateReleaseBundle
configuration:
releaseBundleName: demo_rb
releaseBundleVersion: v1.0.${run_number}
dryRun: false
sign: false
description: "some random test description"
inputResources:
- name: gosvc_promoted_build_info
trigger: true
- name: appl_promoted_build_info
trigger: true
outputResources:
- name: release_bundle
releaseNotes:
syntax: markdown
content: |
## Heading
* Bullet
* Points
- name: sign
type: SignReleaseBundle
configuration:
inputResources:
- name: release_bundle
outputResources:
- name: signed_bundle
- name: distribute
type: DistributeReleaseBundle
configuration:
dryRun: false
inputResources:
- name: signed_bundle
- name: distribution_rules