Skip to content

Commit

Permalink
Snapshot Updation PVC + PreBuild CI-CD (#3964)
Browse files Browse the repository at this point in the history
  • Loading branch information
ashokdevtron committed Sep 26, 2023
1 parent 346317d commit 5106a47
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 63 deletions.
43 changes: 28 additions & 15 deletions docs/user-guide/creating-application/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The `Overview` section contains the brief information of the application, any added tags, configured external links and deployment details of the particular application.
In this section, you can also [change project of your application](#change-project-of-your-application) and [manage tags](#manage-tags) if you added them while creating application.

![](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/creating-application/overview-latest.jpg)
![](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/creating-application/overview/overview-latest-1.jpg)


The following details are provided on the **Overview** page:
Expand All @@ -23,28 +23,38 @@ You can change the project of your application by clicking **Project** on the `O
1. Click `Project`.
2. On the `Change project` dialog box, select the different project you want to change from the drop-down list.

![](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/creating-application/overview/change-project-app.jpg)
![](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/creating-application/overview/change-project-app-1.jpg)

3. Click **Save**. The application will be moved to the selected project.

Click **Save**. The application will be moved to the selected project.
{% hint style="info" %}
### If you change the project:

The current users will lose the access to the application.

The users who already have an access to the selected project, will get an access to the application automatically.
{% endhint %}

**Note**: If you change the project:
* The current users will lose the access to the application.
* The users who already have an access to the selected project, will get an access to the application automatically.

## Manage Tags

`Tags` are key-value pairs. You can add one or multiple tags in your application. When tags are propagated, they are considered as labels to Kubernetes resources. Kubernetes offers integrated support for using these labels to query objects and perform bulk operations e.g., consolidated billing using labels. You can use these tags to filter/identify resources via CLI or in other Kubernetes tools.

`Manage tags` is the central place where you can create, edit, and delete tags. You can also propagate tags as labels to Kubernetes resources for the application.

![](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/creating-application/manage-tags-latest.jpg)
![](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/creating-application/overview/manage-tags-latest-1.jpg)

* Click `Edit tags`.
* Click `Edit`.
* On the `Manage tags` page, click `+ Add tag` to add a new tag.
* Click `X` to delete a tag.
* Click the symbol <img src="https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/creating-application/donot-propagate.jpg" height="10"> on the left side of your tag to propagate a tag.<br>`Note`: Dark grey colour in symbol specifies that the tags are propagated.
* Click the symbol <img src="https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/creating-application/donot-propagate.jpg" height="10"> on the left side of your tag to propagate a tag.<br>

{% hint style="info" %}
Dark grey colour in symbol specifies that the tags are propagated.
{% endhint %}

* To remove the tags from propagation, click the symbol <img src="https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/creating-application/propagate-dark.jpg" height="10"> again.

* Click `Save`.

The changes in the tags will be reflected in the `Tags` on the `Overview` section.
Expand Down Expand Up @@ -87,18 +97,21 @@ For more detail, refer [Kubernetes PVC](https://kubernetes.io/docs/tasks/configu

In order to configure PVC:
* Go to the `Overview` section of your application.
* On the right-corner, click `Edit Tags`.
* On the right-corner, click `Edit`.

![](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/creating-application/overview/pvc-edit-tags.jpg)

![](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/creating-application/overview/manage-tags-pvc.jpg)
![](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/creating-application/overview/pvc-edit-tags-1.jpg)

* For app level PVC mounting, enter the following:<ul><li>key:`devtron.ai/ci-pvc-all`</li><li>value: metadata name (e.g., `cache-pvc)` which you define on the [PVC template](#create-pvc-file).</li></ul>`Note`: This PVC mounting will impact all the build pipilines of the application.

![](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/creating-application/overview/manage-tags-pvc-1.jpg)

* For pipeline level, enter the following:<ul><li>key:`devtron.ai/ci-pvc-{pipelinename}`</li><li>value: metadata name which you define on the [PVC template](#create-pvc-file).</li></ul>`Note`: This PVC mounting will impact only the particular build pipeline.

To know the `pipelinename` detail, go to the `App Configutation`, click `Workflow Editor` the pipeline name will be on the `Build` pipeline as shown below.
To know the `pipelinename` detail, go to the `App Configuration`, click `Workflow Editor` the pipeline name will be on the `Build` pipeline as shown below.

![](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/creating-application/overview/pipeline-name-pvc-1.jpg)

![](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/creating-application/overview/pipeline-name-pvc.jpg)
![](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/creating-application/overview/pipeline-level-tag.jpg)

* Click `Save`.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,18 @@ Lets take `Codacy` as an example and configure it in the Pre-Build stage in the
* Enter a descriptive message for the task in the `Description` field. It is an optional field. <br>`Note`: The description is available by default.
* In the **Input Variables**, provide the information in the following fields:

![](https://devtron-public-asset.s3.us-east-2.amazonaws.com/plugins/plugins-latest/codacy-details-pre-build-stage.jpg)
![](https://devtron-public-asset.s3.us-east-2.amazonaws.com/plugins/codacy-1.jpg)

| Variable | Format | Description |
![](https://devtron-public-asset.s3.us-east-2.amazonaws.com/plugins/codacy-2.jpg)

| Variable | Format | Description |
| ---- | ---- | ---- |
| CodacyEndpoint | String | API endpoint for Codacy. |
| GitProvider | String | Git provider for the scanning. |
| CodacyApiToken | String | API token for Codacy. If it is provided, it will be used, otherwise it will be picked from Global secret (CODACY_API_TOKEN). |
| Organisation | String | Your Organisation for Codacy.|
| RepoName | String | Your Repository name. |
| Branch | String | Your branch name. |
| CodacyEndpoint | String | API endpoint for Codacy |
| GitProvider | String | Git provider for the scanning |
| CodacyApiToken | String | API token for Codacy. If it is provided, it will be used, otherwise it will be picked from Global secret (CODACY_API_TOKEN) |
| Organisation | String | Your Organization for Codacy|
| RepoName | String | Your Repository name |
| Branch | String | Your branch name |

* In `Trigger/Skip Condition`, set the trigger conditions to execute a task or `Set skip conditions`. As an exmple: CodacyEndpoint equal to https://app.codacy.com.<br>`Note`: You can set more than one condition.

Expand Down Expand Up @@ -96,17 +98,17 @@ K6 is an open-source tool and cloud service that makes load testing easy for dev

| Variable | Format | Description |
| ---- | ---- | ---- |
| RelativePathToScript | String | Checkout path + script path along with script name. |
| PrometheusUsername | String | Username of Prometheus account. |
| PrometheusApiKey | String | API key of Prometheus account. |
| PrometheusRemoteWriteEndpoint | String | Remote write endpoint of Prometheus account. |
| RelativePathToScript | String | Checkout path + script path along with script name |
| PrometheusUsername | String | Username of Prometheus account |
| PrometheusApiKey | String | API key of Prometheus account |
| PrometheusRemoteWriteEndpoint | String | Remote write endpoint of Prometheus account |
| OutputType | String | `Log` or `Prometheus` |

* `Trigger/Skip Condition` refers to a conditional statement to execute or skip the task. You can select either:<ul><li>`Set trigger conditions` or</li><li>`Set skip conditions`</li></ul>

* Click **Update Pipeline**.

#### Sonarqube
#### SonarQube

Configuring `Sonarqube` in pre-build or post build task enhances your workflow with Continuous Code Quality & Code Security.

Expand All @@ -116,21 +118,21 @@ Configuring `Sonarqube` in pre-build or post build task enhances your workflow w
2. Click **+ Add task**.
3. Select **Sonarqube** from **PRESET PLUGINS**.

![](https://devtron-public-asset.s3.us-east-2.amazonaws.com/plugins/preset-plugin-sonarqube-2.png)
![](https://devtron-public-asset.s3.us-east-2.amazonaws.com/plugins/sonarqube.jpg)

* Enter a relevant name in the `Task name` field. It is a mandatory field.
* Enter a descriptive message for the task in the `Description` field. It is an optional field.
* Provide a value for the input variable.<br> Note: The value may be any of the values from the previous build stages, a global variable, or a custom value.</br>

| Variable | Format | Description |
| ---- | ---- | ---- |
| SonarqubeProjectKey | String | Project key of sonarqube account. |
| SonarqubeApiKey | String | API key of Sonarqube account. |
| SonarqubeEndpoint | String | API endpoint of Sonarqube account. |
| CheckoutPath | String | Checkout path of Git material. |
| UsePropertiesFileFromProject | Boolean | Enter either `true` or `false` accordingly whether you want the poll to generate report or not. |
| CheckForSonarAnalysisReport | Boolean | Enter either `true` or `false` accordingly whether you want the poll to generate report or not. |
| AbortPipelineOnPolicyCheckFailed | Boolean | Enter either `true` or `false` accordingly whether you want to check if the policy fails or not. |
| SonarqubeProjectKey | String | Project key of SonarQube account |
| SonarqubeApiKey | String | API key of SonarQube account |
| SonarqubeEndpoint | String | API endpoint of SonarQube account |
| CheckoutPath | String | Checkout path of Git material |
| UsePropertiesFileFromProject | Boolean | Enter either `true` or `false` accordingly whether the configuration file should be fetched from the project's source code |
| CheckForSonarAnalysisReport | Boolean | Enter either `true` or `false` accordingly whether you want poll or actively check for the generation of the SonarQube analysis report |
| AbortPipelineOnPolicyCheckFailed | Boolean | Enter either `true` or `false` accordingly whether you want to check if the policy fails or not |

* `Trigger/Skip Condition` refers to a conditional statement to execute or skip the task. You can select either:<ul><li>`Set trigger conditions` or</li><li>`Set skip conditions`</li></ul>

Expand All @@ -156,14 +158,14 @@ Configuring `Dependency Track for Python` in pre-build or post build task create
| Variable | Format | Description |
| ---- | ---- | ---- |
| ProjectManifestType | String | Type of your Python project manifest which is used to build cycloneDx [Software Bill of Materials (SBOM)](https://owasp.org/www-community/Component_Analysis#software-bill-of-materials-sbom). E.g., PIP, Poetry etc. |
| RelativePathToPoetryLock | String | Path to your poetry.lock file inside your project. |
| RelativePathToPipfile | String | Path to your Pipfile.lock file inside your project. |
| RelativePathToRequirementTxt | String | Path to your requirements.txt file inside your project. |
| DTrackEndpoint | String | API endpoint of your dependency track account. |
| DTrackProjectName | String | Name of your dependency track project. |
| DTrackProjectVersion | String | Version of dependency track project. |
| DTrackApiKey | String | API key of your dependency track account. |
| CheckoutPath | String | Checkout path of Git material. |
| RelativePathToPoetryLock | String | Path to your poetry.lock file inside your project |
| RelativePathToPipfile | String | Path to your Pipfile.lock file inside your project |
| RelativePathToRequirementTxt | String | Path to your requirements.txt file inside your project |
| DTrackEndpoint | String | API endpoint of your dependency track account |
| DTrackProjectName | String | Name of your dependency track project |
| DTrackProjectVersion | String | Version of dependency track project |
| DTrackApiKey | String | API key of your dependency track account |
| CheckoutPath | String | Checkout path of Git material |

* `Trigger/Skip Condition` refers to a conditional statement to execute or skip the task. You can select either:<ul><li>`Set trigger conditions` or</li><li>`Set skip conditions`</li></ul>

Expand All @@ -189,11 +191,11 @@ Configuring `Dependency Track for NodeJs` in pre-build or post build task create

| Variable | Format | Description |
| ---- | ---- | ---- |
| DTrackEndpoint | String | API endpoint of your dependency track account. |
| DTrackProjectName | String | Name of your dependency track project. |
| DTrackProjectVersion | String | Version of dependency track project. |
| DTrackApiKey | String | API key of your dependency track account. |
| CheckoutPath | String | Checkout path of Git material. |
| DTrackEndpoint | String | API endpoint of your dependency track account |
| DTrackProjectName | String | Name of your dependency track project |
| DTrackProjectVersion | String | Version of dependency track project |
| DTrackApiKey | String | API key of your dependency track account |
| CheckoutPath | String | Checkout path of Git material |

* `Trigger/Skip Condition` refers to a conditional statement to execute or skip the task. You can select either:<ul><li>`Set trigger conditions` or</li><li>`Set skip conditions`</li></ul>

Expand All @@ -219,12 +221,12 @@ Configuring `Dependency Track for NodeJs` in pre-build or post build task create

| Variable | Format | Description |
| ---- | ---- | ---- |
| BuildToolType | String | Type of build tool your project is using. E.g., Maven, or Gradle. |
| DTrackEndpoint | String | API endpoint of your dependency track account. |
| DTrackProjectName | String | Name of your dependency track project. |
| DTrackProjectVersion | String | Version of dependency track project. |
| DTrackApiKey | String | API key of your dependency track account. |
| CheckoutPath | String | Checkout path of Git material. |
| BuildToolType | String | Type of build tool your project is using. E.g., Maven, or Gradle |
| DTrackEndpoint | String | API endpoint of your dependency track account |
| DTrackProjectName | String | Name of your dependency track project |
| DTrackProjectVersion | String | Version of dependency track project |
| DTrackApiKey | String | API key of your dependency track account |
| CheckoutPath | String | Checkout path of Git material |

* `Trigger/Skip Condition` refers to a conditional statement to execute or skip the task. You can select either:<ul><li>`Set trigger conditions` or</li><li>`Set skip conditions`</li></ul>

Expand Down Expand Up @@ -276,12 +278,12 @@ Codacy is an automated code analysis/quality tool that helps developers to ship

| Variable | Format | Description |
| ---- | ---- | ---- |
| CodacyEndpoint | String | API endpoint for Codacy. |
| GitProvider | String | Git provider for the scanning. |
| CodacyEndpoint | String | API endpoint for Codacy |
| GitProvider | String | Git provider for the scanning |
| CodacyApiToken | String | API token for Codacy. If it is provided, it will be used, otherwise it will be picked from Global secret (CODACY_API_TOKEN). |
| Organisation | String | Your Organisation for Codacy.|
| RepoName | String | Your Repository name. |
| Branch | String | Your branch name. |
| Organisation | String | Your Organization for Codacy|
| RepoName | String | Your Repository name |
| Branch | String | Your branch name |

* `Trigger/Skip Condition` refers to a conditional statement to execute or skip the task. You can select either:<ul><li>`Set trigger conditions` or</li><li>`Set skip conditions`</li></ul>

Expand Down Expand Up @@ -346,9 +348,9 @@ This example creates a Pre-build task from a container image. The output variabl
| Mount custom code | Optional | Enable to mount the custom code in the container. Enter the script in the box below. <ul><li>Mount above code at (required): Path where the code should be mounted</li></ul> |
| Command | Optional | The command to be executed inside the container |
| Args | Optional | The arguments to be passed to the command mentioned in the previous field |
| Port mapping | Optional | The port number on which the container listens. The port number exposes the container to outside services |
| Mount code to container | Optional | Mounts the source code inside the container. Default is "No". If set to "Yes", enter the path |
| Mount directory from host | Optional | Mount any directory from the host into the container. This can be used to mount code or even output directories |
| Port mapping | Optional | The port number on which the container listens. The port number exposes the container to outside services. |
| Mount code to container | Optional | Mounts the source code inside the container. Default is "No". If set to "Yes", enter the path. |
| Mount directory from host | Optional | Mount any directory from the host into the container. This can be used to mount code or even output directories. |
| Output directory path | Optional | Directory path for the script output files such as logs, errors, etc. |

* Select **Update Pipeline**.
Expand Down

0 comments on commit 5106a47

Please sign in to comment.