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.
- Click the Project card on the Main page. You will be taken to the Project Dashboard page.
Add code repository (Option)
| Repository type | App 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 repository | ○ | X | ○ | X |
| Use existing repository | X | X | ○ | ○ |
To add a code repository, follow these steps.
- On the Main page, click the Project card. You will be taken to the Project Dashboard page.
- Click Repository > Code Repository in the left menu.
- Click the Add Code Repository button at the top right. The Add Code Repository page opens.
- Enter/set each item and click the Connection Test button.
- Click the Save button to complete Add code repository.
Item Explanation Repository type Select 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 usage Select Create new repository or Use existing repository - The activation status changes depending on specific conditions. For more information, see Table. Conditions for activating new repository creation and existing repository usage.
Repository information Enter repository information - When creating a new repository, the URL is formed from the project group name/project name.
Authentication information Enter authentication credentials. Repository information Enter 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 - Registered tool: The user can select and use the types of SCM Repository tools (
Add image repository (Option)
To add an image repository, follow these steps.
App. Add image repository
- 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.
- App. Add Image Repository page, enter and configure each item.
- Connection Test Click the button.
- Click the Save button.
Item Explanation Select repository type Select 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 repository Choose whether to create a new repository or use an existing one. - If you selected the
Docker huborImage Registrytype earlier, you can only select Use existing repository.
Registered tool Enter repository information. Unregistered tool Enter 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 - If you selected the
Add pull-only image repository
- 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.
- Add Pull‑only Image Repository On the page, enter and configure each field.
- Connection Test Click the button.
- Click the Save button.
Install Helm
To install Helm, follow these steps.
- Click the Project card on the Main page. You will be taken to the Project Dashboard page.
- Click the Build/Deploy > HelmInstall menu in the left menu.
- In the K8S cluster field, select the K8S cluster you wish to install.
- Click the Helm chart you want to install to go to the Helm Chart Details screen.
- Click the Helm Install button. It navigates to the Helm Chart Install screen.
- Enter each item and click the Next button.
Item Explanation Release name Enter the name to use in the Helm chart release.
It must be unique and cannot be duplicated within the namespace.Category Development, Operations Version Select the version of the chart you want to install with Helm. K8S cluster Displays 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.namespace Select the target namespace for the helm install from the list. Reference information This is reference information provided by the selected K8S cluster. Click each tab to view detailed information. Default Values.yaml included in the chart You can edit the values.yamlfile to run helm install with the desired values.
If needed, refer to the reference information and edit thevalues.yamlfile with those values.Writing type Form 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 input This 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 - Helm chart installation A popup window opens. Click the Run button to complete the Helm install.
- When the installation is complete, the Kubernetes deployment page opens.
Add Build Pipeline
To add a build pipeline, follow these steps.
- On the Main page, click the Project card. You will be taken to the Project Dashboard page.
- In the left menu, click the Build/Deploy > Build Pipeline menu. You will be taken to the Build Pipeline page.
- Build Pipeline page, click the Add Pipeline button at the top right. You will be taken to the Add Pipeline page.
- Add Pipeline Enter or configure each field on the page.
- Click the Next button.
Item Explanation Category Select Development or Operations - The actions that each role can perform differ depending on development or operations.
- Refer to Table. Role-specific permissions within the project (1) for role-specific permissions.
Jenkins URL Select Jenkinsfrom the list to add a build pipeline.Build Agent Select 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 OS Displays the OS information of the environment where the build agent runs. Folder type Select the folder type. - Existing folder: Add a pipeline under an already created folder in
Jenkins. - New folder: Create a new folder in
Jenkinsand add a pipeline under it.
folder Select a folder from the list or enter the name of a new folder to create. Pipeline name Please enter the pipeline name. Parameter setting Set the parameters to be used in the pipeline. Environment variable configuration Set the environment variables to be used in the pipeline. Stage Settings Configure the stage to be used in the pipeline. Configure email recipients for build results Set 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.
- Click the Parameter area. The Parameter registration page opens on the right.
- When you click the Add button, the Add Parameter popup window opens.
- 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.
- Click the Environment Variable area. The Environment Variable Registration page opens on the right.
- A list of pre-registered environment variables appears, and select the checkboxes for the environment variables you want to use.
- 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.
- Click the Mail Recipient area. The Add Mail Recipient page opens on the right.
- In the Search area, search for the recipient and add them.
- 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.
- Click the New Stage area. The stage settings page opens on the right.
- Choose Checkout as the Stage type.
- Enter the information and click Apply. (In the URL, you can select the code repository you added from Add Code Repository (Option).)
Item Explanation URL Select the code repository to perform the checkout. Branch name Enter the name of the branch to checkout. Table. Checkout Stage Settings
Configure the Build stage
To add a Build stage, follow these steps.
- Click the Add icon to add a new stage.
- Click the New Stage area. The Stage Settings page opens on the right.
- On the Stage Settings page, select Build as the Stage Type.
- After entering information on the Stage Settings page, click the Apply button.
Item Explanation language Select the programming language used by the application. Build tool Select the Build tool used for building the application.
Provides default Shell commands based on the selected Build tool.Shell command Enter 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.
- Click the Add icon to add a new stage.
- Click the New Stage area. The Stage Settings page opens on the right.
- Select Docker Build as the Stage Type.
- 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 | Explanation | example |
|---|---|---|
Registry URL (docker push) | Select the image repository where the Docker build result image will be pushed. | |
| ID | The ID value of the account to be used for the image repository | |
| image tag pattern | The Docker image tag is automatically generated according to the selected pattern.
|
|
| Add base image repository | Add 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 tool | Displays the image build tool. | |
| Pre-build command | If 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 folder | If you need to run the Docker image build from a specific folder, select the checkbox and enter the folder path. | docker |
| Dockerfile | Enter the Dockerfile filename. | Dockerfile |
| Image build options | Enter it if you need to use additional options with the image build tool. | --no-cache |
| Build command | Displays the image build command that will actually be executed. | |
| Post-build command | If there are commands that need to be executed after building a Docker image, write them in Shell command format. | rm -rf docker/*.jar |
Deploy to K8S Stage Configuration
Deploy to K8S To add a stage, follow the steps below.
- Click the Add icon to add a new stage.
- Click the New Stage area. The stage settings page opens on the right.
- Select Deploy to K8S as the Stage type.
- 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 |
|---|---|
| type | Select deployment type
|
| K8S cluster | Select a K8S cluster
|
| namespace | Please select a namespace. |
| Helm release | Select HelmRelease. |
| Deployment method | Select deployment method
|
| Registry URL | Select the image repository where the image to be deployed to Kubernetes has been docker pushed. |
| Secret | Select the secret information input method
|
Check the final pipeline script
- Check the build pipeline script that will actually be generated. If needed, edit the script directly.
- Click the Complete button to finish adding the pipeline.