The page has been translated by Gen AI.

Add Build/Deploy (Helm Chart Deployment)

The user can, through the following steps, create a new build pipeline in an already created DevOps Console project, build the source to create an image, and perform Helm chart deployment to a Kubernetes cluster.

Through Helm install, the deployed Helm release will be used in Deploy to K8S stage configuration.

Getting Started with Build/Deploy Additions

To begin adding build and deployment, follow these steps.

  1. Click the Project card on the Main page. You will be taken to the Project Dashboard page.

Add code repository (Option)

Reference
Proceed only if a new code repository is needed.

Repository typeApp with source code. Template
+
DevOps Console registration tool
App with source code included. Template
+
DevOps Console unregistered tool
Source code not included (EnvironmentOnly)
App. Template
+
DevOps Console registration tool
Source code not included (Environment Only)
App. Template
+
DevOps Console unregistered tool
Create new repositoryXX
Use existing repositoryXX
Table. Conditions for creating a new repository and enabling use of existing repository

To add a code repository, follow these steps.

  1. On the Main page, click the Project card. You will be taken to the Project Dashboard page.
  2. Click Repository > Code Repository in the left menu.
  3. Click the Add Code Repository button at the top right. The Add Code Repository page opens.
  4. Enter/set each item and click the Connection Test button.
  5. Click the Save button to complete Add code repository.
    ItemExplanation
    Repository typeSelect the repository to use
    • Registered tool: The user can select and use the types of SCM Repository tools (Github, Gitlab, etc.) that are available.
    • Unregistered tool: You can enter the domain of a tool that will not be registered to use it. The unregistered tool option appears only for App templates that do not include source code (Environment Only).
    New/Existing usageSelect Create new repository or Use existing repository
    Repository informationEnter repository information
    • When creating a new repository, the URL is formed from the project group name/project name.
    Authentication informationEnter authentication credentials.
    Repository informationEnter repository information
    • You can use a code repository that is not registered as a tool in DevOps Console.
    • Click the URL Check button to proceed with the verification process.
    Table. Code Repository Configuration Items

Add image repository (Option)

Note
Proceed only if a new image repository is needed.

To add an image repository, follow these steps.

App. Add image repository

  1. On the Image Repository page, click the App. Add Image Repository button in the upper right. You will be taken to the App. Add Image Repository page.
  2. App. Add Image Repository page, enter and configure each item.
  3. Connection Test Click the button.
  4. Click the Save button.
    ItemExplanation
    Select repository typeSelect the image repository type.
    To use an image repository not registered in the Devops Console, select the Image Registry type.
    Choose whether to create a repositoryChoose whether to create a new repository or use an existing one.
    • If you selected the Docker hub or Image Registry type earlier, you can only select Use existing repository.
    Registered toolEnter repository information.
    Unregistered toolEnter repository information
    • You can register an image repository that is not registered with the DevOps Console tool.
    • Click the URL Check button to proceed with the verification process.
    • Only Use existing repository can be selected.
    Table. App. Add Image Repository Input Fields

Add pull-only image repository

  1. On the Image Repository page, click the Add Pull-Only Image Repository button in the upper right. You will be taken to the Add Pull-Only Image Repository page.
  2. Add Pull‑only Image Repository On the page, enter and configure each field.
  3. Connection Test Click the button.
  4. Click the Save button.

Install Helm

To install Helm, follow these steps.

  1. Click the Project card on the Main page. You will be taken to the Project Dashboard page.
  2. Click the Build/Deploy > HelmInstall menu in the left menu.
  3. In the K8S cluster field, select the K8S cluster you wish to install.
  4. Click the Helm chart you want to install to go to the Helm Chart Details screen.
  5. Click the Helm Install button. It navigates to the Helm Chart Install screen.
  6. Enter each item and click the Next button.
    ItemExplanation
    Release nameEnter the name to use in the Helm chart release.
    It must be unique and cannot be duplicated within the namespace.
    CategoryDevelopment, Operations
    VersionSelect the version of the chart you want to install with Helm.
    K8S clusterDisplays the target K8S cluster for Helm install.
    Changes cannot be made, and if you wish to change, please select the K8S cluster from Start Helm Install.
    namespaceSelect the target namespace for the helm install from the list.
    Reference informationThis is reference information provided by the selected K8S cluster. Click each tab to view detailed information.
    Default Values.yaml included in the chartYou can edit the values.yaml file to run helm install with the desired values.
    If needed, refer to the reference information and edit the values.yaml file with those values.
    Writing typeForm type items are displayed only for Helm charts that support Form input
    • Form: Enter the items shown on the screen. For creating Helm charts that support Form input, see Creating Helm charts that support Form input.
    • values.yaml: Edit values in the yaml editor screen just like a regular Helm chart.
    Form / values.yaml input can be toggled, but switching clears any previously entered data.
    Form inputThis is the screen displayed when you select Form in the creation type; review each item and enter the values. After completing the entry, click the Validation Check button to verify the input values.
    Table. Helm Install Configuration Items
  7. Helm chart installation A popup window opens. Click the Run button to complete the Helm install.
  8. When the installation is complete, the Kubernetes deployment page opens.

Add Build Pipeline

To add a build pipeline, follow these steps.

  1. On the Main page, click the Project card. You will be taken to the Project Dashboard page.
  2. In the left menu, click the Build/Deploy > Build Pipeline menu. You will be taken to the Build Pipeline page.
  3. Build Pipeline page, click the Add Pipeline button at the top right. You will be taken to the Add Pipeline page.
  4. Add Pipeline Enter or configure each field on the page.
  5. Click the Next button.
    ItemExplanation
    CategorySelect Development or Operations
    Jenkins URLSelect Jenkins from the list to add a build pipeline.
    Build AgentSelect the agent (build environment) on which the build pipeline will run.
    Click the Info icon to view the list of tools provided by the agent.
    Build environment OSDisplays the OS information of the environment where the build agent runs.
    Folder typeSelect the folder type.
    • Existing folder: Add a pipeline under an already created folder in Jenkins.
    • New folder: Create a new folder in Jenkins and add a pipeline under it.
    folderSelect a folder from the list or enter the name of a new folder to create.
    Pipeline namePlease enter the pipeline name.
    Parameter settingSet the parameters to be used in the pipeline.
    Environment variable configurationSet the environment variables to be used in the pipeline.
    Stage SettingsConfigure the stage to be used in the pipeline.
    Configure email recipients for build resultsSet the recipients who will receive the result email after the pipeline completes (success/failure).
    Table. Additional Build Pipeline Settings

Setting parameters

Follow these steps to set the parameters to use when running the pipeline.

  1. Click the Parameter area. The Parameter registration page opens on the right.
  2. When you click the Add button, the Add Parameter popup window opens.
  3. Add a parameter and click the Apply button to complete the parameter configuration.

Setting Environment Variables

Follow these steps to set environment variables for use in the pipeline.

  1. Click the Environment Variable area. The Environment Variable Registration page opens on the right.
  2. A list of pre-registered environment variables appears, and select the checkboxes for the environment variables you want to use.
  3. Check the selected environment variable and click the Apply button to complete the environment variable configuration.

Configure email recipients for build results

To set the recipients who will receive the build results by email, follow these steps.

  1. Click the Mail Recipient area. The Add Mail Recipient page opens on the right.
  2. In the Search area, search for the recipient and add them.
  3. Click the Apply button to complete the mail recipient settings.

Configure additional stage

Setting up the Checkout stage

To add a Checkout stage, follow these steps.

  1. Click the New Stage area. The stage settings page opens on the right.
  2. Choose Checkout as the Stage type.
  3. Enter the information and click Apply. (In the URL, you can select the code repository you added from Add Code Repository (Option).)
    ItemExplanation
    URLSelect the code repository to perform the checkout.
    Branch nameEnter the name of the branch to checkout.
    Table. Checkout Stage Settings

Configure the Build stage

To add a Build stage, follow these steps.

  1. Click the Add icon to add a new stage.
  2. Click the New Stage area. The Stage Settings page opens on the right.
  3. On the Stage Settings page, select Build as the Stage Type.
  4. After entering information on the Stage Settings page, click the Apply button.
    ItemExplanation
    languageSelect the programming language used by the application.
    Build toolSelect the Build tool used for building the application.
    Provides default Shell commands based on the selected Build tool.
    Shell commandEnter the command to use for building the application.
    All commands available in the Shell can be used.
    Table. Build stage input items

Setting Up Docker Build Stages

To add a Docker Build stage, follow these steps.

  1. Click the Add icon to add a new stage.
  2. Click the New Stage area. The Stage Settings page opens on the right.
  3. Select Docker Build as the Stage Type.
  4. After entering the information, click the Apply button. (You can select the image repository you added in Registry URL from Add Image Repository (Option).)
item
Explanationexample
Registry URL (docker push)Select the image repository where the Docker build result image will be pushed.
IDThe ID value of the account to be used for the image repository
image tag patternThe Docker image tag is automatically generated according to the selected pattern.
  • {YYYYMMDD}: year, month, and day
  • {HHMMSS}: hour, minute, and second
  • {BUILD_NUM}: the number of the current build pipeline execution
  • {YYYYMMDD}.{HHMMSS}: 20200414.150938
  • {YYYYMMDD}.{BUILD_NUM}: 20220414.13
Add base image repositoryAdd Base Image Repository A popup window opens.
Registry URL (docker pull)Select the image repository for docker pull when the repository providing the Base Image used in the Dockerfile (FROM clause, docker pull) differs from the repository of the Registry URL (docker push).
Image build toolDisplays the image build tool.
Pre-build commandIf there are any commands that need to be run before building a Docker image, write them in shell command format.cp target/*.jar docker/
Image Build folderIf you need to run the Docker image build from a specific folder, select the checkbox and enter the folder path.docker
DockerfileEnter the Dockerfile filename.Dockerfile
Image build optionsEnter it if you need to use additional options with the image build tool.--no-cache
Build commandDisplays the image build command that will actually be executed.
Post-build commandIf there are commands that need to be executed after building a Docker image, write them in Shell command format.rm -rf docker/*.jar
Table. Docker Build Stage Input Items

Deploy to K8S Stage Configuration

Deploy to K8S To add a stage, follow the steps below.

  1. Click the Add icon to add a new stage.
  2. Click the New Stage area. The stage settings page opens on the right.
  3. Select Deploy to K8S as the Stage type.
  4. After entering the information, click the Apply button. (Type Helm Release (Helm Chart type) can be selected to choose the Helm Release added in 헬름인스톨 하기.)
Item
Explanation
typeSelect deployment type
  • Helm release (Helm chart type)
  • Workload
  • ArgoCD
K8S clusterSelect a K8S cluster
  • Helm release (Helm chart type) When selected, a list of Helm releases deployed via the DevOps Console is displayed.
namespacePlease select a namespace.
Helm releaseSelect HelmRelease.
Deployment methodSelect deployment method
  • Recreate
  • Rolling Update
Registry URLSelect the image repository where the image to be deployed to Kubernetes has been docker pushed.
SecretSelect the secret information input method
  • Auto-generate: Automatically create the secret corresponding to the selected image repository from the Registry URL in the DevOps Console and use it.
  • Use existing secret: Use a pre-created secret through K8S secret management.
Table. Deploy to K8S stage input items

Check the final pipeline script

  1. Check the build pipeline script that will actually be generated. If needed, edit the script directly.
  2. Click the Complete button to finish adding the pipeline.

Pipeline addition result

Note
The added pipeline does not run automatically. If execution is required, run the pipeline manually.
Tutorial (From Project Creation to Build/Deploy)
Add Build/Deploy (Workload Deployment)