Add Build/Deploy (Workload 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 workload deployment on a Kubernetes cluster.
The workload added via Add Workload will be used in Deploy to K8S Stage Setup.
Build/Deploy Add Getting Started
To begin adding build/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)
To add a code repository, follow these steps.
- On the Code Repository page, click the Add Code Repository button in the upper right. You will be taken to the Add Code Repository page.
- On the Add Code Repository page, enter and configure each item.
- Connection Test Click the button.
- Click the Save button.
Item Explanation Repository type Select the repository to use - Registered tools: Users can select and use the types of SCM Repository tools (
Github,Gitlab, etc.) that are available. - Unregistered tools: You can enter the domain of a tool that is not registered. The unregistered tool entry 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 varies depending on specific conditions. For details, 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.
- You must also go through the URL check process.
Table. Code Repository Add Input Items - Registered tools: Users 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.
Add workload
To add a workload, follow the steps below.
- On the Main page, click the Project card. You will be taken to the Project Dashboard page.
- Click the Build/Deploy > Kubernetes Deploy menu in the left menu. You will be taken to the Kubernetes Deploy page.
- On the Kubernetes deployment page, click the Add workload menu. The Add workload popup opens.
- Add Workload Enter the information in the popup window and click the Save button.
- In the confirmation popup, click the Confirm button to complete adding the workload.Item
Explanation Query target Only workloads deployed with the same Base image as the App template used when the project was first created are displayed. Workload already registered in the project Shows the workload already registered in the project. - Workloads already registered in the project cannot be added.
Table. Additional Workload Input Items
Modify K8S authentication information
K8S credentials are the authentication information used to verify permission to use a K8S cluster/namespace when performing a deployment in the build pipeline.
To modify the K8S credentials, follow these steps.
- On the Deployment Details page, click the Edit Credentials icon to the right of K8S Cluster/Namespace. The Edit Credentials popup will open.
- Authentication information is fixed to the logged-in user’s account. Click the Save button to edit.
- In the confirmation popup, click the Confirm button.
- K8S authentication information will be changed to the logged-in user.
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 used when running the pipeline.
- Click the Parameter card.
- Click the Add button to add a parameter.
- Click the Apply button to complete the parameter settings.
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.
Add additional stage
Checkout stage setup
To add a Checkout stage, follow these steps.
- Click the New Stage area. The Stage Settings page opens on the right.
- On the Stage Settings page, select Checkout as the Stage Type.
- After entering the information, click the Apply button. (You can select the code repository you added from 코드 저장소 추가하기 (Option) on the URL.)
Item description URL Select the code repository to perform the checkout. Branch name Enter the name of the branchto checkout.표. Checkout 스테이지 입력 항목
Setting up 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
Docker Build Stage Setup
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 Setup
Deploy to K8S To add a stage, follow the steps below.
- Click the + 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 Deploy to K8S as the Stage Type.
- On the Stage Settings page, after entering the information, click the Apply button. (If you select a workload in the type, you can select the workload 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.