GCS Create Bucket
Introduction​
The GCS Create Bucket plugin of Devtron enables automated creation of Google Cloud Storage (GCS) bucket directly within CI/CD workflows. By integrating the GCS Create Bucket plugin, 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.
Prerequisites​
Before integrating the GCS Create Bucket plugin, ensure you have a Google Cloud Platform (GCP) account and GCP Project with appropriate permissions.
Steps​
- Navigate to the Jobs section, click Create, and choose Job.
- In the 'Create job' window, enter Job Name and choose a target project.
- Click Create Job.
- In the 'Configurations' tab, fill the required fields under the 'Source code' section and click Save.
- In Workflow Editor, click + Job Pipeline.
- Give a name to the workflow and click Create Workflow.
- Click Add job pipeline to this workflow.
- Fill the required fields in ‘Basic configuration’ tab.
- Go to the ‘Tasks to be executed’ tab.
- Under ‘Tasks’, click the + Add task button.
- Select the GCS Create Bucket plugin.
- Enter the following 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. The default is false. | true |
| UniformAccess | STRING | Enable uniform bucket-level access control to create a bucket with bucket-level permissions instead of an 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 created. |
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.