-
Notifications
You must be signed in to change notification settings - Fork 556
doc: Devtron Job Trigger Plugin doc #5742
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ashoknayak777
merged 5 commits into
devtron-labs:main
from
bhushan-nemade-dt:devtron-job-trigger
Aug 30, 2024
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
e0edf3d
devtron-job-trigger plugin doc
bhushan-nemade-dt 782823e
summary updated
bhushan-nemade-dt 40e2cf2
Updated input variable description
bhushan-nemade-dt 25b2c7e
Merge branch 'main' into devtron-job-trigger
ashoknayak777 4ede235
token value updated
bhushan-nemade-dt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| # Devtron-Job-Trigger | ||
|
|
||
| ## Introduction | ||
| The **Devtron Job Trigger** plugin enables you to trigger Devtron Jobs from your current application workflow. For example, by integrating this plugin at the pre-deployment stage of your application workflow, you can trigger jobs designed to run migration scripts in your database. This ensures that necessary migrations are executed before your application is deployed. | ||
|
|
||
| ### Prerequisites | ||
| Before integrating the Devtron Job Trigger plugin, you need to properly configure the target Devtron Job to ensure smooth execution. | ||
|
|
||
| --- | ||
|
|
||
| ## Steps | ||
| 1. Go to **Applications** → **Devtron Apps**. | ||
| 2. Click your application. | ||
| 3. Go to **App Configuration** → **Workflow Editor**. | ||
| 4. Click **New Workflow** and navigate to the **Build and Deploy from Source Code**. | ||
| 5. Fill the required fields in the **Create build pipeline** window and navigate to the **Create deployment pipeline**. | ||
| 6. Fill the required fields in the **Deployment Stage** window and navigate to the **Pre-Deployment stage**. | ||
|
|
||
| {% hint style="warning" %} | ||
| If you have already configured workflow, edit the deployment pipeline, and navigate to **Pre-Deployment stage**. | ||
| {% endhint %} | ||
|
|
||
| 6. Under 'TASKS', click the **+ Add task** button. | ||
| 7. Select the **Devtron Job Trigger** plugin. | ||
| 8. Enter the following [user inputs](#user-inputs) with appropriate values. | ||
| --- | ||
|
|
||
| ## User Inputs | ||
|
|
||
| ### Task Name | ||
| Enter the name of your task | ||
|
|
||
| e.g., `Triggers Devtron Job ` | ||
|
|
||
| ### Description | ||
| Add a brief explanation of the task and the reason for choosing the plugin. Include information for someone else to understand the purpose of the task. | ||
|
|
||
| e.g., `The Devtron Job Trigger plugin is integrated for triggering the Devtron Job.` | ||
|
|
||
| ### Input Variables | ||
|
|
||
| | Variable | Format | Description | Sample Value | | ||
| | ------------------------ | ------------ | ----------- | ------------ | | ||
| | DevtronApiToken | STRING | Enter Devtron API token with required permissions. | abc123xyz456token789 | | ||
| | DevtronEndpoint | STRING | Enter the URL of Devtron dashboard. | https://devtron.example.com | | ||
| | DevtronJob | STRING | Enter the name or ID of Devtron Job to be triggered | plugin-test-job | | ||
| | DevtronEnv | STRING | Enter the name or ID of the Environment where the job is to be triggered. Required if JobPipeline is not given | prod | | ||
ashoknayak777 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| | JobPipeline | STRING | Enter the name or ID of the Job pipeline to be triggered. Required if DevtronEnv is not given | hello-world | | ||
| | GitCommitHash | STRING | Enter the commit hash from which the job is to be triggered. If not given then, will pick the latest | cf19e4fd348589kjhsdjn092nfse01d2234235sdsg | | ||
| | StatusTimeoutSeconds | NUMBER | Enter the maximum time to wait for the job status | 120 | | ||
|
|
||
| ### Trigger/Skip Condition | ||
| Here you can set conditions to execute or skip the task. You can select `Set trigger conditions` for the execution of a task or `Set skip conditions` to skip the task. | ||
|
|
||
| ### Output Variables | ||
| Devtron Job Trigger will not be generating an output variable. | ||
|
|
||
| Click **Update Pipeline**. | ||
|
|
||
|
|
||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.