Skip to content

doc: Added Linked CI with Child Info + Runtime Build Parameters #4991

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
merged 8 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions docs/user-guide/application-groups.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,17 @@ The **Build & Deploy** tab of your application group enables you to trigger the

![Figure 5: Selecting Commit](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/application-groups/select-commit-1.jpg)

Repeat the step for other applications, and then click **Start Build**.
{% hint style="info" %}
### Passing Build Parameters [![](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/elements/EnterpriseTag.svg)](https://devtron.ai/pricing)

Similar to application, you can also [pass build parameters](./deploying-application/triggering-ci.md#passing-build-parameters) in application groups before triggering the build.
{% endhint %}

3. Repeat the step for other applications, and then click **Start Build**.

![Figure 6: Building Images](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/application-groups/select-commit-2.jpg)

3. The builds will be initiated, following which, you can close the `Build image` screen.
4. The builds will be initiated, following which, you can close the `Build image` screen.

![Figure 7: Triggered Deployment](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/application-groups/build-image.jpg)

Expand Down
21 changes: 14 additions & 7 deletions docs/user-guide/creating-application/workflow/ci-pipeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,18 +210,25 @@ If one code is shared across multiple applications, `Linked Build Pipeline` can
2. On the **App Configuration** page, select **Workflow Editor**.
3. Select **+ New Workflow**.
4. Select **Linked Build Pipeline**.
5. Enter the following fields on the **Create linked build pipeline** screen:
5. On the **Create linked build pipeline** screen:
* Search for the application in which the source CI pipeline is present.
* Select the source CI pipeline from the application that you selected above.
* Enter a new name for the linked CI pipeline. It cannot be the same as the source CI pipeline.

![](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/creating-application/workflow-ci-pipeline/ca-workflow-linked.jpg)
![](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/creating-application/workflow-ci-pipeline/ca-workflow-linked.jpg)

6. Click **Create Linked CI Pipeline**.

* Select the application in which the source CI pipeline is present.
* Select the source CI pipeline from the application that you selected above.
* Enter a name for the linked CI pipeline.
Thereafter, the source CI pipeline will indicate the number of Linked CI pipelines. Upon clicking it, it will display the child information as shown below. It reveals the applications and environments where Linked CI is used for deployment.

Click **Create Linked CI Pipeline**.
![Linked CI with Child Information](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/creating-application/workflow-ci-pipeline/linkedci.gif)

After creating a linked CI pipeline, you can create a CD pipeline.
Builds cannot be triggered from a linked CI pipeline; they can only be triggered from the source CI pipeline. There will be no images to deploy in the CD pipeline created from the 'linked CI pipeline' at first. To see the images in the CD pipeline of the linked CI pipeline, trigger build in the source CI pipeline. The build images will now be listed in the CD pipeline of the 'linked CI pipeline' whenever you trigger a build in the source CI pipeline.

{% hint style="warning" %}
Linked CI pipelines can't trigger builds. They rely on the source CI pipeline to build images. Trigger a build in the source CI pipeline to see the images available for deployment in the linked CI pipeline's CD stage.
{% endhint %}


### 3. Deploy Image from External Service

Expand Down
48 changes: 43 additions & 5 deletions docs/user-guide/deploying-application/triggering-ci.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Triggering CI Pipelines

To trigger the CI pipeline, first you need to select a Git commit. To select a Git commit, clic the **Select Material** button present on the CI pipeline.
To trigger the CI pipeline, first you need to select a Git commit. To select a Git commit, click the **Select Material** button present on the CI pipeline.

![](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/deploying-application/triggering-ci/select-material-new.jpg)

Expand All @@ -10,9 +10,9 @@ Once clicked, a list will appear showing various commits made in the repository,

CI Pipelines with automatic trigger enabled are triggered immediately when a new commit is made to the git branch. If the trigger for a build pipeline is set to manual, it will not be automatically triggered and requires a manual trigger.

{% hint style="info" %}
---

### Partal Cloning Feature [![](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/elements/EnterpriseTag.svg)](https://devtron.ai/pricing)
## Partal Cloning Feature [![](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/elements/EnterpriseTag.svg)](https://devtron.ai/pricing)

CI builds can be time-consuming for large repositories, especially for enterprises. However, Devtron's partial cloning feature significantly increases cloning speed, reducing the time it takes to clone your source code and leading to faster build times.

Expand All @@ -22,13 +22,51 @@ CI builds can be time-consuming for large repositories, especially for enterpris
* Faster software releases
* Improved productivity

Get in touch with us if you are looking for a way to improve the efficiency of your software development process
{% endhint %}
Get in touch with us if you are looking for a way to improve the efficiency of your software development process.

The **Refresh** icon updates the Git Commits section in the CI Pipeline by fetching the latest commits from the repository. Clicking on the refresh icon ensures that you have the most recent commit available.

The **Ignore Cache** option ignores the previous build cache and creates a fresh build. If selected, will take a longer build time than usual.

---

## Passing Build Parameters [![](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/elements/EnterpriseTag.svg)](https://devtron.ai/pricing)

{% hint style="warning" %}
### Who Can Perform This Action?
Users need to have [Build & deploy permission](../global-configurations/authorization/user-access.md#role-based-access-levels) or above (along with access to the environment and application) to pass build parameters.
{% endhint %}

If you wish to pass runtime parameters for build job, you can provide key-value pairs before triggering the build. This will inject those key-value pairs as environment variables in CI runner pods and all its containers.

**Steps**

1. Go to the **Parameters** tab available on the screen where you select the commit.

![](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/deploying-application/triggering-ci/build-parameter-tab.jpg)

2. Click **+ Add parameter**.

![](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/deploying-application/triggering-ci/add-parameter.jpg)

3. Enter your key-value pair as shown below.

![](https://devtron-public-asset.s3.us-east-2.amazonaws.com/images/deploying-application/triggering-ci/key-value.jpg)

<br /> Similarly, you may add more than one key-value pair by using the **+ Add Parameter** button.

4. Click **Start Build**.

{% hint style="info" %}
Passing build parameters is currently not supported for [Linked Build pipeline](../creating-application/workflow/ci-pipeline.md#2-linked-build-pipeline) and [External CI pipeline](../creating-application/workflow/ci-pipeline.md#3-deploy-image-from-external-service).

In case you trigger builds in bulk, you can consider passing build parameters in [Application Group](../application-groups.md).
{% endhint %}

---

## Fetching Logs and Reports

Click the `CI Pipeline` or navigate to the `Build History` to get the CI pipeline details such as build logs, source code details, artifacts, and vulnerability scan reports.

To access the logs of the CI Pipeline, simply click `Logs`.
Expand Down