# Setting up a Pipeline

## 1. Setting up a Pipeline <a href="#id-1" id="id-1"></a>

### 1-1. Creating a Pipeline

1\) To create a pipeline, click on the '+ Create Pipeline' button located in the top right corner of the \[CI/CD] - \[Pipeline] tab.

<figure><img src="/files/ZAZCxwXwrZk6gQaxcgeS" alt=""><figcaption><p>[Screen] Initial Pipeline Creation Screen</p></figcaption></figure>

2\) After entering the pipeline creation information, click the 'Save' button located in the top right corner.

<figure><img src="/files/XNMdLLwuNV87KxShpeGV" alt=""><figcaption><p>[Screen] Pipeline Creation Information Input Screen</p></figcaption></figure>

<table><thead><tr><th width="176">Item (* is required)</th><th>content</th></tr></thead><tbody><tr><td>Name*</td><td>Enter the pipeline name to create</td></tr><tr><td>Version*</td><td>Input the version for the pipeline</td></tr><tr><td>Service Map*</td><td>Select the service map to execute the pipeline</td></tr></tbody></table>

3\) Click the "Add Resource" button in the deployment resources section to apply the items you want to configure for the pipeline.

{% hint style="info" %}

* Workloads need to be created by default
  {% endhint %}

<figure><img src="/files/LTOqgsdZFr8AvqIMFU5J" alt=""><figcaption><p>[Screen] Add Deployment Resources to the Pipeline</p></figcaption></figure>

4\) After selecting the workload to add from the workload section, click the "Save" button

<figure><img src="/files/AARQsNzGfvsd42bG9ZGK" alt=""><figcaption><p>[Screen] Select Workload in Add Deployment Resources</p></figcaption></figure>

5\) Once the workload is registered, confirm that the container images registered with the workload are automatically added.

{% hint style="warning" %}

* Only images built using the image build feature in Cocktail are integrated
  {% endhint %}

<figure><img src="/files/X6Sd2YTIPiTiklewhEWw" alt=""><figcaption><p>[Screen] Registering Workload for Pipeline</p></figcaption></figure>

6\) After selecting the service to add from the service exposure section, click the "Save" button.

<figure><img src="/files/ArnROfPacfS5BqPIW1Ta" alt=""><figcaption><p>[Screen] Selecting Service Exposure in Add Deployment Resources</p></figcaption></figure>

7\) After selecting the Ingress to add from the Ingress section, click the "Save" button.

<figure><img src="/files/1kvsmlSFdiYnkBwMCRok" alt=""><figcaption><p>[Screen] Selecting Ingress in Add Deployment Resources</p></figcaption></figure>

8\) After completing the registration of all resources, click the "Run" button located in the top right corner.

<figure><img src="/files/bdkrTtPSnAaAWQqqL3Ac" alt=""><figcaption><p>[Screen] Screen after registering all resources for the pipeline</p></figcaption></figure>

9\) When the \[run popup] appears, enter the content for the execution note regarding this pipeline version, then click the "Save" button.

<figure><img src="/files/JyNcr7N0JrF62QRr6RFb" alt=""><figcaption><p>[Screen] Inputting Pipeline Execution Notes</p></figcaption></figure>

10\) Once the pipeline execution is complete, the release version will be indicated correctly in the top left corner.

<figure><img src="/files/lAKRVG8SXdMcroMrftpV" alt=""><figcaption><p>[Screen] Screen after Pipeline Execution Completion</p></figcaption></figure>

## 2. Modify Pipeline <a href="#id-2" id="id-2"></a>

{% hint style="danger" %}

* When modifying each workload, service exposure, and Ingress in the \[Service Map] tab, changes are not reflected in the pipeline. You need to make modifications directly in the pipeline.
* Modifying the pipeline ensures that each workload and deployment resource is updated to the latest version
  {% endhint %}

1\) Select the pipeline name that needs modification in the \[Pipeline] tab.

<figure><img src="/files/KJyjjFJ4x7ukVuqMuuzA" alt=""><figcaption><p>[Screen] Pipeline List</p></figcaption></figure>

2\) Click the "Create Pipeline Version" button in the top right corner of the pipeline, enter the version, and then click "Create".

<figure><img src="/files/UfJBTyV0iZhxmSLpiWM3" alt=""><figcaption><p>[Screen] Pipeline Version Creation</p></figcaption></figure>

### 2-1. If there are changes in the source requiring rebuilding of images <a href="#id-2-1" id="id-2-1"></a>

1\) Activate the "Build Run" button on the right side of the \[Image Build] section, then click "Run".

{% hint style="info" %}

* The image build is re-executed and immediately reflected in the workload
  {% endhint %}

<figure><img src="/files/uBs1g4V0PdgR0jwUUDBk" alt=""><figcaption><p>[Screen] Screen with Build Execution Enabled and in Progress</p></figcaption></figure>

2\) The image is rebuilt, and you can check the progress of each step in the process.

<figure><img src="/files/RV8BVTU8s0HiiwfNe7MS" alt=""><figcaption><p>[Screen] Image Build Process</p></figcaption></figure>

3\) When the image is rebuilt through the pipeline, verify that the image name in the workload is updated to the tag of the image built through the pipeline.

<figure><img src="/files/EyV9nKhbg6CbFnh0zAXx" alt=""><figcaption><p>[Screen] Confirmation of Image Tag Change</p></figcaption></figure>

### 2-2. If there are changes to the workload, such as replicas or other configurations <a href="#id-2-2.-replicas" id="id-2-2.-replicas"></a>

{% hint style="info" %}

* Deactivate the "Build Run" button on the right side of the \[Image Build] section (no image changes required)
  {% endhint %}

1\) Select the workload name in the \[Deployment Resources] section.

<figure><img src="/files/UmZLUdUT2dfcWk1Hp5Fv" alt=""><figcaption><p>[Screen] Screen with Build Execution Disabled</p></figcaption></figure>

2\) Make the necessary modifications by selecting the relevant parts, then click the "Save" button in the top right corner.

<figure><img src="/files/H99lX8WBS0SrqwpWLW1t" alt=""><figcaption><p>[Screen] Workload Configuration Change Screen</p></figcaption></figure>

3\) After confirming the change in replicas from 1 to 2 in the workload, click the "Close" button in the top right corner.

<figure><img src="/files/TPUZNP3VsnJEQQhNCNOY" alt=""><figcaption><p>[Screen] Information after Workload Configuration Change</p></figcaption></figure>

4\) Once you return to the pipeline modification section, click the "Run" button in the top right corner, and enter the changes in the execution note."

<figure><img src="/files/r3UjN4tgibEnQHe8KneT" alt=""><figcaption><p>[Screen] Screen after Clicking the "Run" Button</p></figcaption></figure>

5\) In the pipeline's \[Deployment Status] tab, verify that there are two pods running.

<figure><img src="/files/d5njHTUItQHUIVcGhN4n" alt=""><figcaption><p>[Screen] Pipeline Deployment Status</p></figcaption></figure>

## 3. Pipeline Rollback <a href="#id-3" id="id-3"></a>

{% hint style="info" %}

* If you need to rollback to a previous configuration while continuously registering versions through the pipeline.
  {% endhint %}

1\) Select the pipeline name that needs modification in the \[Pipeline] tab. Once changes are made in the modification section, click the "Rollback" button in the top right corner.

<figure><img src="/files/10xJWrYfzggVnAepsC3e" alt=""><figcaption><p>[Screen] Pipeline Configuration Screen</p></figcaption></figure>

2\) When the \[Rollback Popup] window appears, review the execution notes of the versions created so far, select the desired version, then click the "Save" button.

<figure><img src="/files/FOsLfsSrEWnW5fn1GChT" alt=""><figcaption><p>[Screen] Popup window with Execution Notes after Clicking Rollback</p></figcaption></figure>

3\) Once the rollback is completed successfully, confirm that the modified version has been changed to the rollback target (e.g., V3 -> V2)

<figure><img src="/files/MTuDYqpYcu2uy3CPTgwA" alt=""><figcaption><p>[Screen] Confirmation of Rollback Version Change</p></figcaption></figure>

4\) Verify that the pod count has returned to normal, such as 2 -> 1.

<figure><img src="/files/28ayKeL62kTAfKMQgo4p" alt=""><figcaption><p>[Screen] Pipeline Deployment Status</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cocktailcloud.gitbook.io/cocktail-cloud-online-en/ci-cd/pipeline.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
