Upload Artifacts to JFrog
You can use the upload Artifacts to JFrog Artifactory step in your CI pipelines to upload artifacts to JFrog Artifactory. Harness CI also provides steps to upload artifacts to S3 and upload artifacts to GCS.
Prepare a pipeline
You need a CI pipeline with a Build stage.
If you haven't created a pipeline before, try one of the CI tutorials.
Prepare artifacts to upload
Add steps to your pipeline that generate artifacts to upload, such as Run steps. The steps you use depend on what artifacts you ultimately want to upload.
Upload artifacts to JFrog Artifactory
Add an Upload Artifacts to JFrog Artifactory step. This step's settings are described below.
Depending on the stage's build infrastructure, some settings may be unavailable or located under Optional Configuration in the visual pipeline editor. Settings specific to containers, such as Set Container Resources, are not applicable when using the step in a stage with VM or Harness Cloud build infrastructure.
Name
Enter a name summarizing the step's purpose. Harness automatically assigns an Id (Entity Identifier Reference) based on the Name. You can change the Id.
Description
Text string describing the step's purpose.
Artifactory Connector
Select the Harness Artifactory connector to use for this upload. The JFrog Account associated with the connector must have read/write permission. For more information, go to the Artifactory connector settings reference.
This step supports Artifactory connectors that use either anonymous or username and password authentication.
Target and Source Path
The Target is the target path in the JFrog Artifactory registry. This is a target repository name relative to the server URL in the connector. If pom.xml
is not present, then the Target must be a full path to an artifacts folder, such as groupId/artifactId/version
.
Source Path is a path to the artifact file/folder on the local/build machine you want to upload. Harness creates the compressed file automatically.
Run as User
Specify the user ID to use to run all processes in the pod if running in containers. For more information, go to Set the security context for a pod.
Set container resources
Set maximum resource limits for the resources used by the container at runtime:
- Limit Memory: The maximum memory that the container can use. You can express memory as a plain integer or as a fixed-point number using the suffixes
G
orM
. You can also use the power-of-two equivalentsGi
andMi
. The default is500Mi
. - Limit CPU: The maximum number of cores that the container can use. CPU limits are measured in CPU units. Fractional requests are allowed; for example, you can specify one hundred millicpu as
0.1
or100m
. The default is400m
. For more information, go to Resource units in Kubernetes.
Timeout
Set the timeout limit for the step. Once the timeout limit is reached, the step fails and pipeline execution continues. To set skip conditions or failure handling for steps, go to:
Confirm the upload
After adding the steps and saving the pipeline, select Run to run the pipeline.
On the build details page, you can see the logs for each step as they run.
In your Harness project's Builds, you can see the build listed.
On JFrog, you can see the uploaded artifacts.