The pipelines.yml
file is made up of resources, pipelines and steps, as shown below. For information about the Release to Edge Node example, see Pipeline Example: Release to Edge Node.
Resources
This example uses the following types of resources:
BuildInfo
BuildInfo
A BuildInfo
resource is the metadata associated with a build in Artifactory.
JFrog Pipelines automatically creates BuildInfo when any of the Build steps like MvnBuild, NpmBuild, GradleBuild, or DockerBuild are used to generate packages. BuildInfo is published to Artifactory through the PublishBuildInfo step, by setting a flag in Build steps or by providing that resource in steps like NpmPublish, GoPublishModule, GoPublishBinary, and DockerPush.
resources
# Build info of build to bundle - name: gosvc_promoted_build_info type: BuildInfo configuration: sourceArtifactory: {{ .Values.artifactoryIntegration }} buildName: dbp_build buildNumber: 1
Tag | Description | Required/Optional |
---|---|---|
name |
This name is used to refer to the resource in steps, and must be unique across all repositories in your JFrog Pipelines environment. | Required |
sourceArtifactory |
| Required |
buildName |
Note
| Optional |
buildNumber | The number of the build to associate with the BuildInfo. | Optional |
ReleaseBundle
A ReleaseBundle
resource specifies a set of artifacts in Artifactory that are distributed to Artifactory Edge nodes as a JFrog Distribution Release Bundle.
This resource can be used with CreateReleaseBundle or DistributeReleaseBundle. This resource can be used to represent both signed and unsigned Release Bundle.
resources
- name: release_bundle type: ReleaseBundle configuration: sourceDistribution: {{ .Values.distributionIntegration }} name: demo_rb version: v1.0.0 - name: signed_bundle type: ReleaseBundle configuration: sourceDistribution: {{ .Values.distributionIntegration }} name: demo_rb version: v1.0.0
Tag | Description | Required/Optional |
---|---|---|
|
| Required |
| myDist is the name of the Distribution Integration. | Required |
| Version number of the release bundle. | Required |
DistributionRule
A DistributionRule resource is the set of Destination rules that can be applied to distributing a release bundle using JFrog Distribution.
resources
- name: distribution_rules type: DistributionRule configuration: sourceDistribution: {{ .Values.distributionIntegration }} serviceName: "*" siteName: "*" cityName: "*" countryCodes: - "*"
Tag | Description | Required/Optional |
---|---|---|
|
| Required |
| myDist is the name of the Distribution Integration. | Required |
| The Artifactory Edge Node service name with a wildcard pattern. | Required |
| The Artifactory Edge Node site name with a wildcard pattern. | Required |
| The Artifactory Edge Node city name with a wildcard pattern. | Required |
| The Artifactory Edge Node country codes with a wildcard pattern. | Required |
Pipelines
cd_demo_release_mgmt
, the pipeline definition for signing a release bundle and releasing it to an Artifactory edge node.
Steps
The cd_demo_release_mgmt
pipeline is made up of the following native steps:
CreateReleaseBundle
SignReleaseBundle
DistributeReleaseBundle
CreateReleaseBundle
The CreateReleaseBundlenative step produces a Release Bundle for distribution to an Artifactory Edge Node . The step can be used to create a signed or unsigned release bundle.
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: false outputResources: - name: release_bundle releaseNotes: syntax: markdown content: | ## Heading * Bullet * Points
Tag | Description of usage | Required/Optional |
---|---|---|
|
| Required |
| Must specify eithera named BuildInforesource(s)oran Aql resource. If BuildInfo | Required |
| Must specify a ReleaseBundle resource. The | Required |
| An alphanumeric name for the release bundle. | Required |
| Version string for the release bundle | Required |
| When set to Default is true. | Optional |
| Specifies whether the release bundle version is signed. Default is false. | Optional |
| Controls whether to store release bundle version in the source Artifactorywhile signing. | Optional |
| Description of the release bundle. | Optional |
| Describes the release notes for the release bundle version.
| Optional |
SignReleaseBundle
The SignReleaseBundle native step signs a Release Bundle in preparation for distributing it to Edge nodes.
steps
- name: sign type: SignReleaseBundle configuration: inputResources: - name: release_bundle outputResources: - name: signed_bundle
Tag | Description of usage | Required/Optional |
---|---|---|
|
| Required |
| Must specify a ReleaseBundleresource whose This step accepts | Required |
| Must specify a ReleaseBundle resource. This ReleaseBundle is updated with the This step specifies | Required |
DistributeReleaseBundle
The DistributeReleaseBundle native step triggers the distribution of a Release Bundles to an Artifactory Edge Node. This step requires a signed release bundle and one or more distribution rules to successfullyexecute.
steps
- name: distribute type: DistributeReleaseBundle configuration: dryRun: false inputResources: - name: signed_bundle - name: distribution_rules
Tag | Description of usage | Required/Optional |
---|---|---|
| distribute is the name that identifies the | Required |
| Must specify a ReleaseBundle resource (signed_bundle) and one DistributionRule resource (distribution_rules) . | Required |
| Controls whether this should be a dry run to test if the release bundle can distribute to the Edge nodes matching the distribution rule. The default is true. | Optional |