Workers Overview
Subscription Information
From Artifactory 7.94 the Workers service is supported with Enterprise X and Enterprise+ licenses.
Workers is a JFrog Platform service that allows you to extend and control your execution flows. It provides a serverless execution environment. You can create workers to enhance the platform's functionality. Workers are triggered automatically by events within the JFrog Platform, giving you the flexibility to address specific use cases. For on-demand tasks, configure HTTP-triggered workers.
Note
JFrog Workers is the newer, recommended way to easily extend the JFrog Platform (not just Artifactory) in a Cloud-native way. While plugins are supported, we strongly suggest using JFrog Workers whenever possible.
With Workers, you can:
- Enhance Platform Capabilities: Perform custom tasks tailored to your needs.
- Control Execution Flows: Intercept and modify workflows, such as blocking unauthorized actions or enhancing security.
- Integrate Custom Logic: Write code in TypeScript directly in the JFrog Platform UI or via APIs, using the built-in editor for testing.
Only enabled Workers are triggered by platform events, ensuring you have full control over which custom logic is executed.
Workers in Self-Hosted Environments
To use Workers in Self-Hosted environments, both Artifactory and Workers must be deployed in Kubernetes or Docker Compose. For more information, see Installing Workers.
Conflicts Between Worker Events and User Plugins in Artifactory Repositories
Using both Artifactory User Plugins and JFrog Artifactory Worker events on the same repository may lead to unexpected behavior. To avoid this, we recommend configuring JFrog Artifactory Worker events on repositories that do not have user plugins enabled.
Workers Features
JFrog Workers is a service that allows you to create workers that react to events in the JFrog Platform and execute custom code you write.
-
Workers in JFrog Platform: There are 3 worker types as described below:
-
Event Driven Worker: The event-driven worker is triggered when the event you have selected happens in the system.
- Artifactory: Artifactory event-driven workers are a powerful tool that allows you to automate actions in response to specific events occurring within your Artifactory environment.
- Access: Access event-driven workers are a powerful tool that allows you to automate actions in response to specific events occurring within your Access environment.
-
Scheduled Worker: A Scheduled Worker is triggered at predefined times or intervals, relying on a Cron expression to define its schedule.
-
HTTP-Triggered Worker: These workers can execute custom code independent of any events in the JFrog Platform. Generic event workers are launched on demand. You can choose permissions for generic event workers and determine whether they can be run by admin or non-admin users. The HTTP-triggered worker can be triggered manually using REST API or JFrog CLI.
-
-
TypeScript Code for Workers: To enhance the developer experience we have chosen to use TypeScript. Use the typescript editor while configuring worker to achieve your desired results.
-
Configured Workers: On the configured workers, you can enable/disable, search, edit, view and delete workers.
-
Troubleshooting: Workers in the debug mode collect the status of the Worker execution, whether failed or successful.
Workers Benefits
Workers provide the following functionalities that greatly increase the flexibility of the JFrog Platform.
- Workers allow you to execute your own code inside JFrog execution flows using synchronized hooks that integrate custom code to control JFrog execution flows. Workers simplify development support by offering full out-of-the-box Worker APIs, with automation execution points and third party integration scenarios already enabled.
- Workers are executed on JFrog nodes with auto-scaling support that essentially provide Functions as a Service with a serverless experience.
- The Workers' online code editor is easy to use and provides autocompletion support. Code auto-complete exposes available functions and parameters and accelerates code development.
- JFrog Workers CLI integration supports a local development experience.
- Network connectivity between JFrog services is established seamlessly using pre-authenticated API calls.
Updated 9 days ago
