Skip to content

docs: revamp-pre-post-task #83

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

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

Hii-Arpit
Copy link
Member

@Hii-Arpit Hii-Arpit commented May 21, 2025

docs: revamp-pre-post-task

Quick Preview

Related PRs

CI Pipeline

Pre/Post (This PR)

Workflow Editor Readme

CD Pipeline

@Hii-Arpit Hii-Arpit self-assigned this May 21, 2025
@Hii-Arpit Hii-Arpit added the documentation Improvements or additions to documentation label May 21, 2025
@Hii-Arpit Hii-Arpit marked this pull request as ready for review May 22, 2025 21:14
@Hii-Arpit Hii-Arpit requested review from a team as code owners May 22, 2025 21:14

The CI pipeline includes Pre and Post-build steps to validate and introduce checkpoints in the build process.
The pre/post plugins allow you to execute some standard tasks, such as Code analysis, Load testing, Security scanning etc. You can build custom pre-build/post-build tasks or select one of the standard preset plugins provided by Devtron.
The build and deployment pipelines includes Pre/Post stages where you can configure predefined or custom tasks to validate and introduce checkpoints in the build and deploy process.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

includes
include

Copy link
Contributor

@ashokdevtron ashokdevtron Jul 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build and deployment pipelines also include a pre stage and a post stage:
* **Pre Stage** - Tasks to be executed before the build/deployment pipeline triggers.
* **Post Stage** - Tasks to be executed only after the successful execution of the build/deployment pipeline.

**Examples**: Tasks like code analysis, Jira Issue updation, load testing, security scanning, etc.


Preset plugins are micro tools that allow you to enhance and refine the CI/CD workflow of your application by adding new features, integrating with external tools, and automating tasks. Unlike custom scripts, preset plugins come bundled with specific variables and conditions that help you make the plugins work seamlessly with your CI/CD pipeline.

Some plugins are specific to build pipelines (used in **Pre-Build** and **Post-Build** stages), while others are specific to deployment pipelines (used in **Pre-Deployment** and **Post-Deployment** stages).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some plugins are applicable to both build as well as deployment. Earlier our API process showed 3 options:

  1. CI
  2. CD
  3. CI_CD

> * Post-Build Stage: The tasks in this stage are triggered once the build is complete.
In Devtron, a task is a step within a CI/CD pipeline that runs a specific operation, such as executing a script or running a container image. Tasks can be created using preset plugins or custom scripts, and are executed in sequence to complete the process.

Preset plugins are micro tools that allow you to enhance and refine the CI/CD workflow of your application by adding new features, integrating with external tools, and automating tasks. Unlike custom scripts, preset plugins come bundled with specific variables and conditions that help you make the plugins work seamlessly with your CI/CD pipeline.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

micro tools
extensions

| Pre-Build/Post-Build | <ol><li>Create a task using one of the [Preset Plugins](#preset-plugins) integrated in Devtron:<ul><li>[K6 Load testing](../../plugins/k6-load-testing.md)</li><li>[Sonarqube](../../plugins/sonarqube.md)</li><li>[Dependency track for Python](../../plugins/dependency-track-python.md)</li><li>[Dependency track for NodeJs](#dependency-track-for-nodejs)</li><li>[Dependency track for Maven and Gradle](../../plugins/dependency-track-maven-gradle.md)</li><li>[Semgrep](../../plugins/semgrep.md)</li><li>[Codacy](../../plugins/codacy.md)</li></ul></li><li>Create a task from [Execute Custom script](#execute-custom-script) which you can customize your script with:<ul><li>[Custom script - Shell](#custom-script-shell)</li><li>Or, [Custom script - Container image](#custom-script-container-image)</li></ul></li></ol> |
To create a pre/post task, follow the steps below

1. Navigate to **Configuration** → **Workflow Editor** of your Devtron App.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Configuration
Configurations


2. Select the **build** or **deployment** pipeline for configuring the pre/post tasks.

![Figure 1: Selecting Workflow](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/global-configurations/sso-login-service/pre-post-workflow-editor.jpg)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation should be more.

Comment on lines +36 to +42
* **Build pipelines:** On the **Edit build pipeline** window, select the **Pre-Build stage** or **Post-Build stage** tab.

![Figure 2: Pre/Post-build stages](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/global-configurations/sso-login-service/pre-post-edit-build.jpg)

* **Deployment pipelines:** On the **Edit deployment pipeline** window, select the **Pre-Deployment stage** or **Post-Deployment stage** tab.

![Figure 3: Pre/Post-deployment stages](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/global-configurations/sso-login-service/pre-post-edit-deploy.jpg)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation should be more.

Copy link
Contributor

@ashokdevtron ashokdevtron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix the bullet and image indentation.
I will continue the review later.

@Hii-Arpit Hii-Arpit requested a review from abhibhaw July 10, 2025 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants