The following sections provide code samples for workers.
Worker | Description | For Code Samples, See ... |
|---|---|---|
Configure Event Driven Workers for Artifactory Event-driven workers are a powerful tool that allows you to automate actions in response to specific events occurring within your Artifactory environment. | ||
Before Download Worker | Triggers before downloading an artifact. For example, verify user permissions to ensure they can download the artifact. NoteAuthorized JFrog Advanced Security (JAS) users can block download of artifacts by before download. Users without JAS can still use this Worker, but without the Stop Action feature: when trying to use it, the download will not be blocked. | |
After Download Worker | Triggers when an artifact download process is initiated without waiting for it to complete. For example, log the download activity for analytics purposes. | |
Before Create Property Worker | Triggers before creating a property. For example, verify that users can create properties. | |
Before Upload Worker | Triggers before uploading an artifact to cloud storage and without waiting for it to complete. For example, verify user permissions to upload an artifact. NoteOnly JFrog users with JFrog Advanced Security (JAS) can block upload of artifacts by before upload. Users without JAS can still use this Worker, but without the Stop Action feature: when trying to use it, the upload will not be blocked. | |
After Create Worker | Triggers after successfully creating an artifact in the Artifactory Storage. For example, add a property value automatically to a newly created artifact. | |
Before Delete Property Worker | Triggers before deleting a property for an artifact. For example, verify user permissions to delete a property for an artifact. | |
Before Delete Worker | Triggers before deleting an artifact. For example, terminate deleting an artifact based on certain conditions (tagged as production). | |
After Move Worker | Triggers after moving an artifact successfully from one path to another. For example, notify the monitoring team after an artifact is moved. | |
After Build Info Save Worker | Triggers after saving build info. For example, start a CI/CD pipeline immediately after saving build info. | |
Before Copy Worker | Triggers before copying an artifact. For example, terminate copying an artifact based on certain conditions (tagged as deprecated). | |
Before Create Worker | Triggers before creating an artifact in Artifactory Storage. For example, terminate creating an artifact based on certain conditions (avoid duplicates). NoteAuthorized JFrog Advanced Security (JAS) users can block upload of artifacts by before create. Users without JAS can still use this Worker, but without the Stop Action feature: when trying to use it, the upload will not be blocked. | |
Before Move Worker | Triggers before moving an artifact. For example, terminate moving an artifact based on certain conditions (tagged as production). | |
Before Remote Info Worker | Triggers before querying the remote repository for an artifact’s availability. For example, add an extra header before reaching a remote repository. NoteAuthorized JFrog Advanced Security (JAS) users can block download of remote info. Users without JAS can still use this Worker, but without the Stop Action feature: when trying to use it, the download will not be blocked. | |
After Remote Download Worker | Triggers after downloading a remote artifact. For example, update metadata after successfully downloading a remote artifact. | |
Before Delete Replication Worker | Triggers before replicating a delete action. For example, terminate replicating delete action based on certain conditions (particular artifactory instance). | |
Before Directory Replication Worker | Triggers before replicating a directory. For example, terminate replicating a directory based on certain conditions (particular artifactory instance). NoteAuthorized JFrog Advanced Security (JAS) users can block replication of directory. Users without JAS can still use this Worker, but without the Stop Action feature: when trying to use it, the replication will not be blocked. | |
Before File Replication Worker | Triggers before replicating a file. For example, terminate replicating a file based on certain conditions (non-production files). NoteAuthorized JFrog Advanced Security (JAS) users can block replication of file. Users without JAS can still use this Worker, but without the Stop Action feature: when trying to use it, the replication will not be blocked. | |
Before Property Replication Worker | Triggers before replicating a property. For example, terminate replicating a property based on certain conditions (specific properties). | |
Before Statistics Replication Worker | Triggers before replicating statistics. For example, terminate replicating statistics based on certain conditions (download count). | |
After Copy Worker | Triggers after copying an artifact from one repository to another. For example, log the copy action for audit purposes. | |
After Create Property Worker | Triggers after creating a property. For example, log the create property action for audit purposes or notify another system. | |
After Delete Property Worker | Triggers after deleting a property. For example, notify upon deletion of significant properties. | |
After Delete Worker | Triggers after deleting an artifact. For example, notify upon deletion of significant artifacts. | |
Alt Remote Path Worker | Triggers before accessing a remote path. For example, ensure the remote path is changed before accessing the old one. NoteAuthorized JFrog Advanced Security (JAS) users can block download from alt remote path. Users without JAS can still use this Worker, but without the Stop Action feature: when trying to use it, the download will not be blocked. | |
Before Remote Download Worker | Triggers before downloading an artifact from a remote repository. For example, verify the API token before processing the download. NoteAuthorized JFrog Advanced Security (JAS) users can block download of artifacts from remote repository. Users without JAS can still use this Worker, but without the Stop Action feature: when trying to use it, the download will not be blocked. | |
Alt Response Worker | Deprecated from version 7.119.0 | |
Alt All Responses Worker | Triggers before downloading an artifact from a remote path for handling responses. For example, replace the remote response to add custom information. NoteAuthorized JFrog Advanced Security (JAS) users can block download from alt all responses. Users without JAS can still use this Worker, but without the Stop Action feature: when trying to use it, the download will not be blocked. | |
Alt Remote Content Worker | Triggers before downloading the remote content. For example, send alternate content instead of the requested artifact. NoteAuthorized JFrog Advanced Security (JAS) users can block download of remote content. Users without JAS can still use this Worker, but without the Stop Action feature: when trying to use it, the download will not be blocked. | |
After Download Error Worker | Triggers after an error occurs while downloading an artifact. For example, monitor and log errors encountered during downloads. | |
Before Download Request Worker | Triggers once a download request has passed all filters (such as authentication), indicating readiness to process the request. For example, verify user permissions again just before processing the download. NoteAuthorized JFrog Advanced Security (JAS) users can block download of artifacts by before download request. Users without JAS can still use this Worker, but without the Stop Action feature: when trying to use it, the download will not be blocked. | |
Before Build Info Save Worker | Triggers before saving build info. For example, ensure all required metadata is included before saving build info to maintain data integrity. NoteAuthorized JFrog Advanced Security (JAS) users can block publishing of build info. Users without JAS can still use this Worker, but without the Stop Action feature: when trying to use it, the publication will not be blocked. | |