From 19bd2ca30653e813bd65b115c53bf921ce0528fe Mon Sep 17 00:00:00 2001 From: bhushannemade Date: Wed, 13 Nov 2024 13:28:04 +0530 Subject: [PATCH 1/5] gcs-create-bucket plugin doc --- docs/user-guide/plugins/gcs-create-bucket.md | 69 ++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 docs/user-guide/plugins/gcs-create-bucket.md diff --git a/docs/user-guide/plugins/gcs-create-bucket.md b/docs/user-guide/plugins/gcs-create-bucket.md new file mode 100644 index 000000000..d6c3711e1 --- /dev/null +++ b/docs/user-guide/plugins/gcs-create-bucket.md @@ -0,0 +1,69 @@ +# GCS Create Bucket + +## Introduction +The **GCS Create Bucket** plugin of Devtron enables automated creation of Google Cloud Storage (GCS) buckets directly within CI/CD workflows. By integrating the GCS Create Bucket teams can simplify cloud storage provisioning and can efficiently manage and store application logs, deployment artifacts, backup data, and other critical application assets in a centralized cloud storage solution. + +### Prerequisites +Before integrating the **GCS Create Bucket** plugin, ensure you have a Google Cloud Platform (GCP) account and GCP Project with appropriate permissions. + +--- + +## 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 **Pre-build stage**. + +{% hint style="warning" %} +If you have already configured workflow, edit the build pipeline, and navigate to **Pre-build stage**. +{% endhint %} + +6. Under 'TASKS', click the **+ Add task** button. +7. Click the **GCS Create Bucket** plugin. +8. Enter the following [user inputs](#user-inputs) with appropriate values. +--- + +## User Inputs + +### Task Name +Enter the name of your task + +e.g., `GCS Create Bucket` + +### 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., `A Plugin to create GCS Bucket` + +### Input Variables + +| Variable | Format | Description | Sample Value | +| ------------------------ | ------------ | ----------- | ------------ | +| BucketName | STRING | Name of the GCS bucket to be created | my-app-logs-bucket | +| StorageClass | STRING | Storage class for the bucket (STANDARD, NEARLINE, COLDLINE, ARCHIVE) | archive | +| Project | STRING | GCP project ID where the bucket will be created | gcp-68493 | +| EnableBucketPrefix | STRING | Enable prefix for bucket naming (true/false) | true | +| ServiceAccountCred | STRING | Base64 encoded GCP service account credentials | eyJ0eXBlIjoic2VydmljZV9hY2 | +| LocationType | STRING | Type of location (region/dual-region/multi-region) | region | +| Location | STRING | Geographic location where bucket will be created | us-central1 | +| EnableAutoClass | BOOL | Automatically optimizes storage costs by moving objects between storage classes based on how frequently they are accessed. Default is false. | true | +| UniformAccess | STRING | Enable uniform bucket-level access control to create bucket with bucket level permissions instead of Access control list (true/false) | true | + +### 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 + +| Variable | Format | Description | +| ------------------------ | ------------ | ----------- | +| BucketName | STRING | The name of the bucket createed. + +### Pass/Failure Condition +Here you can define when a task should be marked as passed or failed. You can select `Set pass conditions` to define success criteria or `Set failure conditions` to specify failure scenarios. + + +Click **Update Pipeline**. + + + From 336856361f0b708104cbdad21b3507d6a46626de Mon Sep 17 00:00:00 2001 From: bhushannemade Date: Fri, 15 Nov 2024 12:53:52 +0530 Subject: [PATCH 2/5] fix --- docs/user-guide/plugins/gcs-create-bucket.md | 69 -------------------- 1 file changed, 69 deletions(-) delete mode 100644 docs/user-guide/plugins/gcs-create-bucket.md diff --git a/docs/user-guide/plugins/gcs-create-bucket.md b/docs/user-guide/plugins/gcs-create-bucket.md deleted file mode 100644 index d6c3711e1..000000000 --- a/docs/user-guide/plugins/gcs-create-bucket.md +++ /dev/null @@ -1,69 +0,0 @@ -# GCS Create Bucket - -## Introduction -The **GCS Create Bucket** plugin of Devtron enables automated creation of Google Cloud Storage (GCS) buckets directly within CI/CD workflows. By integrating the GCS Create Bucket teams can simplify cloud storage provisioning and can efficiently manage and store application logs, deployment artifacts, backup data, and other critical application assets in a centralized cloud storage solution. - -### Prerequisites -Before integrating the **GCS Create Bucket** plugin, ensure you have a Google Cloud Platform (GCP) account and GCP Project with appropriate permissions. - ---- - -## 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 **Pre-build stage**. - -{% hint style="warning" %} -If you have already configured workflow, edit the build pipeline, and navigate to **Pre-build stage**. -{% endhint %} - -6. Under 'TASKS', click the **+ Add task** button. -7. Click the **GCS Create Bucket** plugin. -8. Enter the following [user inputs](#user-inputs) with appropriate values. ---- - -## User Inputs - -### Task Name -Enter the name of your task - -e.g., `GCS Create Bucket` - -### 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., `A Plugin to create GCS Bucket` - -### Input Variables - -| Variable | Format | Description | Sample Value | -| ------------------------ | ------------ | ----------- | ------------ | -| BucketName | STRING | Name of the GCS bucket to be created | my-app-logs-bucket | -| StorageClass | STRING | Storage class for the bucket (STANDARD, NEARLINE, COLDLINE, ARCHIVE) | archive | -| Project | STRING | GCP project ID where the bucket will be created | gcp-68493 | -| EnableBucketPrefix | STRING | Enable prefix for bucket naming (true/false) | true | -| ServiceAccountCred | STRING | Base64 encoded GCP service account credentials | eyJ0eXBlIjoic2VydmljZV9hY2 | -| LocationType | STRING | Type of location (region/dual-region/multi-region) | region | -| Location | STRING | Geographic location where bucket will be created | us-central1 | -| EnableAutoClass | BOOL | Automatically optimizes storage costs by moving objects between storage classes based on how frequently they are accessed. Default is false. | true | -| UniformAccess | STRING | Enable uniform bucket-level access control to create bucket with bucket level permissions instead of Access control list (true/false) | true | - -### 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 - -| Variable | Format | Description | -| ------------------------ | ------------ | ----------- | -| BucketName | STRING | The name of the bucket createed. - -### Pass/Failure Condition -Here you can define when a task should be marked as passed or failed. You can select `Set pass conditions` to define success criteria or `Set failure conditions` to specify failure scenarios. - - -Click **Update Pipeline**. - - - From ee83b29e3332c58e4b2969909e9bf40d809588c6 Mon Sep 17 00:00:00 2001 From: bhushannemade Date: Fri, 29 Nov 2024 10:54:12 +0530 Subject: [PATCH 3/5] Custom Email Notifier plugin doc --- .../plugins/custom-email-notifier.md | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 docs/user-guide/plugins/custom-email-notifier.md diff --git a/docs/user-guide/plugins/custom-email-notifier.md b/docs/user-guide/plugins/custom-email-notifier.md new file mode 100644 index 000000000..c884ea95c --- /dev/null +++ b/docs/user-guide/plugins/custom-email-notifier.md @@ -0,0 +1,56 @@ +# Custom Email Notifier + +## Introduction +The **Custom Email Notifier** plugin by Devtron enables user to set an automated email notifications to respective stakeholders of that specific CI/CD workflow. The Custom Email Notifier can be integrated into pre/post stages of Devtron CI/CD workflows to keep team members informed about current status and other pipeline events. +For better understanding consider a common development scenario where a developer needs to notify the operations team about build completion. Using this plugin, the developer can configure Custom Email Notifier at the post-build stage to automatically send an email notification informing that the build process has completed successfully and the Docker image is ready for deployment. + +### Prerequisites +Before integrating the **Custom Email Notifier** plugin, you must ensure that you have properly configured notifications in your Devtron setup. For detailed notification configuration steps, please refer to the Devtron documentation at: [Devtron Notifications](https://docs.devtron.ai/global-configurations/manage-notification). + +--- + +## 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 **Post-build stage**. + +{% hint style="warning" %} +If you have already configured workflow, edit the build pipeline, and navigate to **Post-build stage**. +{% endhint %} + +6. Under 'TASKS', click the **+ Add task** button. +7. Click the **Custom Email Notifier** plugin. +8. Enter the following [user inputs](#user-inputs) with appropriate values. +--- + +## User Inputs + +### Task Name +Enter the name of your task + +e.g., `Email Notifier` + +### 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 Custom Email Notifier plugin is integrated for sending an automated email notifications to relevant stakeholders.` + +### Input Variables +| Variable | Format | Description | Sample Value | +| ------------------------ | ------------ | ----------- | ------------ | +| CONFIG_TYPE | STRING | Type of notification configuration. SES or SMTP | SES | +| CONFIG_NAME | STRING | Name of the notification configuration to be used. This should match an existing notification configuration in Devtron. | prod-deploy-notify | +| EMAIL_IDS | STRING | Comma-separated list of email addresses that should receive the notification. | devops@company.com,team@company.com | + +### 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 +Custom Email Notifier will not be generating an output variable. + +Click **Update Pipeline**. + + + From 43943f5cade8536aefb1a9942ac29eed59661025 Mon Sep 17 00:00:00 2001 From: bhushannemade Date: Fri, 29 Nov 2024 10:56:45 +0530 Subject: [PATCH 4/5] summary file update --- docs/SUMMARY.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index 58af2000f..5e434e57d 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -139,6 +139,7 @@ * [Copy Container Image](user-guide/plugins/copy-container-image.md) * [Cosign](user-guide/plugins/cosign.md) * [CraneCopy](user-guide/plugins/crane-copy.md) + * [Custom Email Notifier](user-guide/plugins/custom-email-notifier.md) * [Dependency track - Maven & Gradle](user-guide/plugins/dependency-track-maven-gradle.md) * [Dependency track - NodeJS](user-guide/plugins/dependency-track-nodejs.md) * [Dependency track - Python](user-guide/plugins/dependency-track-python.md) From c049eb401150c9cf19b17a95c3a79986511690d9 Mon Sep 17 00:00:00 2001 From: Bhushan Nemade Date: Thu, 30 Jan 2025 10:55:55 +0530 Subject: [PATCH 5/5] Updated the steps --- .../plugins/custom-email-notifier.md | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/docs/user-guide/plugins/custom-email-notifier.md b/docs/user-guide/plugins/custom-email-notifier.md index c884ea95c..e8e512533 100644 --- a/docs/user-guide/plugins/custom-email-notifier.md +++ b/docs/user-guide/plugins/custom-email-notifier.md @@ -1,8 +1,9 @@ # Custom Email Notifier ## Introduction -The **Custom Email Notifier** plugin by Devtron enables user to set an automated email notifications to respective stakeholders of that specific CI/CD workflow. The Custom Email Notifier can be integrated into pre/post stages of Devtron CI/CD workflows to keep team members informed about current status and other pipeline events. -For better understanding consider a common development scenario where a developer needs to notify the operations team about build completion. Using this plugin, the developer can configure Custom Email Notifier at the post-build stage to automatically send an email notification informing that the build process has completed successfully and the Docker image is ready for deployment. +The **Custom Email Notifier** plugin by Devtron enables users to set automated email notifications to respective stakeholders of that specific CI/CD workflow. The Custom Email Notifier can be integrated into pre/post stages of Devtron CI/CD workflows to inform team members about the current status and other pipeline events. Some key use cases of this plugin can be: +- Configuring notifications at pre/post stages to update teams on task completion status, such as sending vulnerability scanning reports. +- Setting up automated alerts at the runbooks of auto-remediation using jobs. ### Prerequisites Before integrating the **Custom Email Notifier** plugin, you must ensure that you have properly configured notifications in your Devtron setup. For detailed notification configuration steps, please refer to the Devtron documentation at: [Devtron Notifications](https://docs.devtron.ai/global-configurations/manage-notification). @@ -10,19 +11,23 @@ Before integrating the **Custom Email Notifier** plugin, you must ensure that yo --- ## 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 **Post-build stage**. {% hint style="warning" %} -If you have already configured workflow, edit the build pipeline, and navigate to **Post-build stage**. +If you want to integrate the **Custom Email Notifier** plugin into pre/post stages of CI/CD pipelines, navigate to the **[Custom Webhook Notifier](https://docs.devtron.ai/usage/plugins/plugin-list/custom-webhook-notifier)** plugin and follow the steps mentioned. {% endhint %} -6. Under 'TASKS', click the **+ Add task** button. -7. Click the **Custom Email Notifier** plugin. -8. Enter the following [user inputs](#user-inputs) with appropriate values. +1. Navigate to the **Jobs** section, click **Create**, and choose **Job**. +2. In the 'Create job' window, enter **Job Name** and choose a target project. +3. Click **Create Job**. +4. In the 'Configurations' tab, fill the required fields under the 'Source code' section and click **Save**. +5. In Workflow Editor, click **+ Job Pipeline**. +6. Give a name to the workflow and click **Create Workflow**. +7. Click **Add job pipeline to this workflow**. +8. Fill the required fields in ‘Basic configuration’ tab. +9. Go to the ‘Tasks to be executed’ tab. +10. Under ‘Tasks’, click the **+ Add task** button. +11. Select the **Custom Email Notifier** plugin. +12. Enter the following [user inputs](#user-inputs) with appropriate values. --- ## User Inputs