Upload artifacts to and download them from external storage using CloudBees actions for Amazon S3 and JFrog Artifactory. These actions wrap standard storage operations with optional artifact registration so stored files become trackable in CloudBees Unify. Refer to Understanding artifact management for an overview of how storage fits into the artifact lifecycle.
| S3 actions require AWS credentials to be configured before use. Refer to Configure AWS credentials. |
Store an object on Amazon S3
Use the cloudbees-io/s3-upload-object action to upload a file to Amazon S3.
Set send-artifact-info: true to register the uploaded file as a trackable artifact in CloudBees Unify.
| All CloudBees action repositories are listed at CloudBees, Inc. on GitHub. |
Automatic artifact data reporting
This action reports artifact-related data to the workflow run for artifact traceability purposes.
Do not include the Register and track artifacts action for the same artifact version, as the resulting run would register duplicate artifact entries to CloudBees Unify.
Inputs
| Input name | Data type | Required? | Description |
|---|---|---|---|
|
String |
Yes |
The Amazon S3 bucket name. |
|
String |
Yes |
The local file path of the directory to be uploaded. |
|
String |
Yes |
The Amazon S3 destination path for the upload. |
|
String |
No |
The name of the artifact to send to CloudBees Unify. Defaults to the filename if not provided. |
|
String |
No |
The version of the artifact to send to CloudBees Unify.
Defaults to |
|
Boolean |
No |
If |
|
String |
No |
The commit ID from the source repository, used when registering the build artifact in CloudBees Unify.
Default is |
|
String |
No |
The ref or branch of the source repository, used when registering the build artifact in CloudBees Unify.
Default is |
|
String |
No |
The clone URL of the source repository, used when registering the build artifact in CloudBees Unify.
Default is |
|
String |
No |
The ID of the component associated with the artifact.
Defaults to the component of the current workflow run ( |
Output: artifact-id (String): the unique identifier of the artifact reported to CloudBees Unify. Only populated when send-artifact-info: true.
Usage examples
Basic example
- name: Upload to Amazon S3 uses: cloudbees-io/s3-upload-object@v1 with: bucket-name: amazon-s3-bucket-name file-path: my-local/my-image.tar s3-path: my-amazon-s3/s3-image.tar
With artifact registration
- name: Upload to Amazon S3 uses: cloudbees-io/s3-upload-object@v1 with: bucket-name: my-image.tar file-path: /local-path s3-path: my-path/to-destination artifact-name: my-artifact artifact-version: 1.0.0 send-artifact-info: true
Full workflow example
name: s3-upload-file kind: workflow apiVersion: automation.cloudbees.io/v1alpha1 on: push: branches: - main jobs: upload-file-job: steps: - name: checkout-source-code uses: cloudbees-io/checkout@v1 - name: S3 upload file id: s3-upload uses: cloudbees-io/s3-upload-object@v1 with: bucket-name: my-repo/my-bucket/test.zip file-path: ${{ cloudbees.workspace }}/my-files/for-upload.zip s3-path: ${{ vars.S3_URL }} artifact-name: my-artifact artifact-version: 1.0.0 send-artifact-info: true - name: Print output parameter artifact ID from S3 upload action uses: docker://alpine:latest shell: sh run: | echo "artifact ID for my-artifact:1.0.0 at my-repo/my-bucket/test.zip is: ${{ steps.s3-upload.outputs.artifact-id }}"
Retrieve an object from Amazon S3
Use the cloudbees-io/s3-download-object action to download a file from Amazon S3.
| All CloudBees action repositories are listed at CloudBees, Inc. on GitHub. |
Upload a file to JFrog Artifactory
Use the cloudbees-io/jfrog-artifactory-upload-file action to upload a file to the JFrog Artifactory repository manager.
Authenticate with either a token or a username and password.
Set send-artifact-info: true to register the uploaded file as a trackable artifact in CloudBees Unify.
| All CloudBees action repositories are listed at CloudBees, Inc. on GitHub. |
Automatic artifact data reporting
This action reports artifact-related data to the workflow run for artifact traceability purposes.
Do not include the Register and track artifacts action for the same artifact version, as the resulting run would register duplicate artifact entries to CloudBees Unify.
Inputs
| Input name | Data type | Required? | Description |
|---|---|---|---|
|
String |
Yes |
The JFrog Artifactory destination path for the upload. |
|
String |
Yes |
The path of the file to be uploaded. |
|
String |
Yes |
The JFrog Artifactory server URL. |
|
String |
Required only if |
The JFrog Artifactory token. |
|
String |
Required only if |
The JFrog Artifactory username. |
|
String |
Required only if |
The JFrog Artifactory password. |
|
String |
No |
The name of the artifact to send to CloudBees Unify. Defaults to the filename if not provided. |
|
String |
No |
The version of the artifact to send to CloudBees Unify.
Defaults to |
|
Boolean |
No |
If |
|
String |
No |
The commit ID from the source repository, used when registering the build artifact in CloudBees Unify.
Default is |
|
String |
No |
The ref or branch of the source repository, used when registering the build artifact in CloudBees Unify.
Default is |
|
String |
No |
The clone URL of the source repository, used when registering the build artifact in CloudBees Unify.
Default is |
Output: artifact-id (String): the unique identifier of the artifact reported to CloudBees Unify. Only populated when send-artifact-info: true.
Usage examples
With token authentication
- name: Upload file to JFrog Artifactory uses: cloudbees-io/jfrog-artifactory-upload-file@v1 with: artifactory-path: my-image.tar file-path: /local-path url: ${{ JFROG_URL }} token: ${{ secrets.JFROG_TOKEN }}
With username and password authentication, and artifact registration
- name: Upload file to JFrog Artifactory uses: cloudbees-io/jfrog-artifactory-upload-file@v1 with: artifactory-path: test-image.tar file-path: /local-path url: ${{ JFROG_URL }} username: ${{ secrets.JFROG_USERNAME }} password: ${{ secrets.JFROG_PASSWORD }} artifact-name: my-artifact artifact-version: 1.0.0 send-artifact-info: true
Full workflow example
name: jfrog-artifactory-upload-file kind: workflow apiVersion: automation.cloudbees.io/v1alpha1 on: push: branches: - main jobs: upload-file-job: steps: - name: checkout-source-code uses: cloudbees-io/checkout@v1 - name: JFrog Artifactory upload file id: jfrog-upload uses: cloudbees-io/jfrog-artifactory-upload-file@v1 with: artifactory-path: my-repo/my-jfrog/test.zip file-path: ${{ cloudbees.workspace }}/my-files/for-upload.zip url: ${{ vars.JFROG_URL }} username: ${{ vars.JFROG_USERNAME }} password: ${{ secrets.JFROG_PASSWORD }} artifact-name: my-artifact artifact-version: 1.0.0 send-artifact-info: true - name: Print output parameter artifact ID from JFrog upload action uses: docker://alpine:latest shell: sh run: | echo "artifact ID for my-artifact:1.0.0 at my-repo/my-jfrog/test.zip is: ${{ steps.jfrog-upload.outputs.artifact-id }}"
Download a file from JFrog Artifactory
Use the cloudbees-io/jfrog-artifactory-download-file action to download a file from the JFrog Artifactory repository manager.
Authenticate with either a token or a username and password.
| All CloudBees action repositories are listed at CloudBees, Inc. on GitHub. |
Inputs
| Input name | Data type | Required? | Description |
|---|---|---|---|
|
String |
Yes |
The JFrog Artifactory server URL. |
|
String |
Required only if |
The JFrog Artifactory token. |
|
String |
Required only if |
The JFrog Artifactory username. |
|
String |
Required only if |
The JFrog Artifactory password. |
|
String |
Yes |
The destination path for the download. |
|
String |
Yes |
The JFrog Artifactory file path of the object to be downloaded. |