Artifactory Helpers - ambitus/artifactory-vault GitHub Wiki
The Artifactory Helpers Scripts provided in this repository are adapted from the IBM DBB Artifactory Helpers Scripts to completely decouple these scripts from IBM DBB. These scripts help reduce the extra noise and complexity of using Artifactory's REST API directly (e.g. Checksum Verification). These scripts might serve as a good alternative to using Artifactory's REST API directly with curl.
Dependencies
- The Artifactory Helpers have a number of version-specific dependencies in the form of jar files
- You can find these in the dependencies folder
build.sh
- This script automates the entire process of uploading and downloading artifacts, including:
- Copying files to and from MVS
- Compressing files into a tar before upload
- Extracting files from a tar after download
- Calling
UploadArtifact.groovy
andDownloadArtifact.groovy
- Defining necessary environment variables
- You will need to update the variables under the
# Artifactory Variables
section- The
ARTIFACTORY_TOKEN
variable should be set in your environment manually
- The
UploadArtifact.groovy
- This script calls the ArtifactoryHelpers publish method to upload artifacts
- Required environment variables:
ARTIFACTORY_URL
ARTIFACTORY_TOKEN
ARTIFACTORY_REPO
ARTIFACTORY_UPLOAD
ARTIFACTORY_UPLOAD_TARGET
DownloadArtifact.groovy
- This script calls the ArtifactoryHelpers download method to download artifacts
- Required environment variables:
ARTIFACTORY_URL
ARTIFACTORY_TOKEN
ARTIFACTORY_REPO
ARTIFACTORY_DOWNLOAD_TARGET
ARTIFACTORY_REMOTE_ARTIFACT
ArtifactoryHelpers.groovy
- This class provides the logic to interact with Artifactory using REST - it is used by
UploadArtifact.groovy
andDownloadArtifact.groovy
- It provides 3 helpers:
- Publishing a file on zFS to an Artifactory repository
- Downloading a remote file from Artifactory repository to zFS
- Retrieve the latest uploaded artifact from a remote path in Artifactory