Creating build project
    • PDF

    Creating build project

    • PDF

    Article Summary

    Available in Classic and VPC

    To create a build project from the NAVER Cloud Platform console, follow these steps:

    1. In the NAVER Cloud Platform console, click Services > Developer Tools > SourceBuild, in order.
    2. Click the [Create build project] button.
    3. Check if Object Storage is selected as In use in Required preparations, and then click the [Next] button.
      • If it is not in use, then click i-sourcebuild_toggle to go to the Object Storage page. Subscribe to the service, create a bucket, and then try again
    4. Proceed with the following steps on the page in order.

    1. Basic settings

    To set the basic information for the build project to be created, follow these steps:

    sourcebuild-use-create_1-basic_ko

    1. Enter the name and description for the build project to be created.

      • You can use only letters, numbers, and special characters (-, _) for the name. You can't enter the name same as that of the build project already created
      • You can enter the description within 500 characters
    2. Select the build target type, and then set the details needed.

      • Set the following items when selecting SourceCommit

        • Repository: select the repository where the build target code is saved
        • Branch: select the build target repository branch
      • When selecting Github, click the [Login] button and set the following items

        • Click the [Log in] button and log in using the OAuth authentication or personal access token
          • OAuth: click the [Log in to GitHub] button and enter the GitHub account information
          • Personal access token: enter the personal access token value issued in GitHub and click the [Log in to GitHub] button
        • Repository: select the repository where the build target code is saved
        • Branch: select the build target repository branch
        Note

        For more information on how to create a personal access token in GitHub, see GitHub's Personal Access Token creation guide.

      • When selecting Bitbucket, click the [Login] button and set the following items:

        • Click the [Log in] > [Log in to Bitbucket] buttons in order, then enter the Bitbucket account information or use the OAuth account
        • Workspace: select the workspace where the build target code is located
        • Repository: select the repository where the build target code is saved
        • Branch: select the build target repository branch
      • When selecting Github Enterprise Server, click the [Login] button and set the following items

        • Enter one of the following authentication information and click the [Github Enterprise Server Login] button
          • OAuth: enter the Github Enterprise Server URL for importing the repository and enter the Client Id and Client Secret of OAuth App created in the relevant server
          • Personal Access Token: enter the Github Enterprise Server URL for importing the repository and the Personal Access Token created on the relevant server
          • Username/Password: enter the Github Enterprise Server URL for importing the repository and the user account information of the relevant server
          • SSH Key: enter the Git repository URL of the SSH protocol format and the SSH Private Key for authentication
        Note
        • If communication with the Github Enterprise Server is not possible due to firewall settings, etc., you cannot use the relevant storage type.
        • The Github Enterprise Server URL can be entered with IP and Hostname and the environment must be public.
        • SSH Key login, unlike other logins, can access only the repository of the Git repository URL entered.
        • GitHub Enterprise Server official guide
        • Owner: select the owner where the build target code is located
        • Repository: select the repository where the build target code is saved
        • Branch: select the build target repository branch
    3. You can set the notification settings for when the build starts and when the build ends.

      • To register the person to be notified when an event occurs, click [Manage notification target] to register in advance.
      • Select the person to be notified when the event occurs and the notification method (SMS, email), then click the [Add] button.
      • To delete a set person, click the [Delete] button to delete them from the list.
    4. Click the [Next] button.

    Note
    • If you are logged in right away without the login page appearing after selecting GitHub/Bitbucket/GitHub Enterprise server, that means you are already logged in from the browser. If you have to log in again with another account, then directly connect to the website, log out, and try again.

    2. Set up build environment

    The method to set the build environment varies depending on the selected build environment image's type. See the guide appropriate to the selected type.

    Using image managed in SourceBuild

    To set a build environment using the image managed in SourceBuild, follow these steps:

    sourcebuild-use-create_2-env-sourcebuild_ko

    1. Select the image managed in SourceBuild as the build environment image.
    2. Select an operating system for the build environment.
      • Only Ubuntu 16.04 (x64) is available
    3. Select the build runtime and runtime version.
      • Available build runtimes and versions
    Build runtimeBuild runtime version
    base16.04-1.0.0
    java7-1.0.0
    8-1.0.0
    9-1.0.0
    10-1.0.0
    11-1.0.0
    17-1.0.0
    21-1.0.0
    dotnet1.0-1.0.0
    2.0-1.0.0
    2.1-1.0.0
    6.0-1.0.0
    android-java26.1.1-8-1.0.0
    26.1.1-9-1.0.0
    26.1.1-10-1.0.0
    python2.7-1.0.0
    3.5-1.0.0
    3.8-1.0.0
    3.9-1.0.0
    3.10-1.0.0
    nodejs8.16-1.0.0
    10.17-1.0.0
    11.15-1.0.0
    12.22-1.0.0
    14.21-1.0.0
    16.20-1.0.0
    :::(Info) (Note)
    • Build runtimes and versions will continue to be updated.
    • When you click the [Installation package list] button, you can check the selected build runtime and key package list installed in the version.

    :::

    1. Select Check if you use the Docker build command, and then select the Docker engine version when building a Docker image.
    Note

    SourceBuild provides the 18.09.01 version of the Docker engine. 50% of the selected computing type will be separately assigned to be used for Docker builds.

    1. Select the computing type of the build environment.
      • The usage fee differs by the build environment
    2. Enter the timeout time.
      • Enter between 5 and 540 minutes
    3. If you have an environment variable to add, enter its name and value, and then click the [Add] button to add.
    4. Click the [Next] button.

    Using Container Registry image

    To set a build environment using the image created in Container Registry, follow these steps:

    sourcebuild-use-create_2-env-container_ko

    1. Select the Container Registry image as the build environment image.
    2. Select the registry where the image is saved.
    3. Select a Docker image to use.
    4. Select a tag for the image.
    5. Select Check if you use the Docker build command, and then select the Docker engine version when building a Docker image.
    Note

    SourceBuild provides the 18.09.01 version of the Docker engine. 50% of the selected computing type will be separately assigned to be used for Docker builds.

    1. Select the computing type of the build environment.
      • The usage fee differs by the build environment
    2. Enter the timeout time.
      • Enter between 5 and 540 minutes
    3. If you have an environment variable to add, enter its name and value, and then click the [Add] button to add.
    4. Click the [Next] button.

    Using Public Registry image

    To set a build environment using the image created in a public registry such as DockerHub, follow these steps:

    sourcebuild-use-create_2-env-public_ko

    1. Select the Public Registry's image as the build environment image.
    2. Enter the name of the Docker image to use.
      • Enter the name only for images in DockerHub
      • Enter the name for other images with the registry address included (<example> sourcebuild.myregistry.com/sourcebuild_image)
    3. Enter a tag for the image.
      • Enter within 80 characters using English letters, numbers, and special characters (period, -, and _)
      • Use an English letter or number for the first character
    4. Select Check when building a Docker image, and then select the Docker engine version when building a Docker image.
    Note

    SourceBuild provides the 18.09.01 version of the Docker engine. 50% of the selected computing type will be separately assigned to be used for Docker builds.

    1. Select the computing type of the build environment.
      • The usage fee differs by the build environment
    2. Enter the timeout time.
      • Enter between 5 and 540 minutes
    3. If you have an environment variable to add, enter its name and value, and then click the [Add] button to add.
    4. Click the [Next] button.

    3. Set up build commands

    To set a build running command, follow these steps:

    sourcebuild-use-create_3-command_ko

    1. Enter each command to be performed before, during, and after running the build.

      • Available shell: /bin/sh
      • When entering multiple commands, distinguish with line breaks
      • Perform the command in the top directory of the source code
      • Build order: provisioning (creating a server) > downloading source code > command before building > command during build > command after building > uploading the result
    2. Select whether to use from the Docker image build settings.

      • You can select Use only if the Docker image build is selected under the build environment settings
      • Dockerfile path: enter the path from the top directory of the source code to the file name
        • The path of the local file (ADD, COPY, etc.) used within the Dockerfile uses the relative paths starting from the Dockerfile location
      • Container Registry: select a registry to save the built Docker image
      • Image name: enter the name of the image to be saved
        • Enter within 200 characters using lowercase English letters, numbers, and special characters (period, -, and _)
        • Use a lowercase English letter or number for the first and last characters
        • Consecutive periods (.) are not allowed, but two consecutive special characters (_) are allowed
      • Image tag: enter the image tag
        • Enter within 80 characters using English letters, numbers, and special characters (period, -, _, and #)
        • Use an English letter, number, or # for the first character
        • The entered # will be replaced by incremental numbers starting from 1, and consecutive #s entered will be handled as entering a single one
      • Set as latest: pushes the latest tag additionally when selected
    3. Click the [Next] button.

    4. Set uploads

    To set whether to save the build result and completed image, follow these steps:

    sourcebuild-use-create_4-upload_ko

    Note

    When creating a build project, Docker image build setup and Upload image after completing build functions are used for following purposes:

    • Docker image build: function that creates images based on your Dockerfile and uploads the images to Container Registry Used for the general docker build.
    • Upload image after completing build: function that saves the build environment as container images and upload the images to Container Registry. Because setup processes such as such as installation of packages required for the build is included in the image, this function is useful for shortening build time and managing build environments by version. However, because the environment after completing the build is stored, information of the previous build may be included to the image. So, please be cautious when using when using the image.

    If you use Dockerfile to create images, you can proceed only with Docker image build.

    1. Select whether to save the build result in Object Storage.
    2. If you select Save result, set the following items:
      • Build result path: enter the directory path or file path to save the result
        • Multiple results are distinguished by line breaks
      • Object Storage to upload: select a bucket to save the result
      • Object Storage folder path: enter the directory path to the Object Storage where the result will be stored
      • File name to be saved: enter the file name to be used when saving as zip
        • If the bucket is locked, you cannot use the same name as that of the file already saved in the bucket
      • Backup result: select whether to save the backup copy of the result
        • Path to save the backup copy: /sourcebuild_backup/{build-id}
    3. Select whether to save the image in the Build completed status.
    4. If you select Save image, set the following items:
      • Container Registry: select a registry to save the completed image
      • Image name: enter the name of the image to be saved
        • Enter within 200 characters using lowercase English letters, numbers, and special characters (period, -, and _)
        • Use a lowercase English letter or number for the first and last characters
        • Consecutive periods (.) are not allowed, but two consecutive special characters (_) are allowed
      • Image tag: enter the image tag
        • Enter within 80 characters using English letters, numbers, and special characters (period, -, _, and #)
        • Use an English letter, number, or # for the first character
        • The entered # will be replaced by incremental numbers starting from 1, and consecutive #s entered will be handled as entering a single one
      • Set as latest: pushes the latest tag additionally when selected
    5. Click the [Next] button.

    5. Connect additional product

    You can connect the newly created build with NAVER Cloud Platform's log service and security service. It has the following advantages when connecting an additional service.

    • You can check the build logs of only 2 days in SourceBuild, but if you connect with Cloud Log Analytics, a log service, then you can check the build logs of 30 days in Cloud Log Analytics.
    • If you connect with File Safer, a security service, then you can diagnose whether the result is contaminated with malware by automatically scanning the result in File Safer when the build is successfully completed.
    Note
    • You can also change whether to connect the service after creating the build.
    • Charges may apply depending on the service usage. For more information, see each service introduction in the portal.

    To set the service connection, follow these steps:

    1. Select whether to connect Cloud Log Analytics.
    2. Select whether to connect File Safer.
      • Standard of files that can request inspection by File Safer
        • Size: 10 MB or smaller
        • Extension: bat, cmd, vbs, vbe, js, jse, wsf, wsh, html, htm, hta, jsp, php, cgi, ahk, au3, py, lsp, fas, ps, eps, gsf, ps1, sh, exe, dll, com, so, zip, tar, gz, tgz, rar, xz, 7z
      • Shows the previous scan result if there is a scan history with the same hash
    3. Click the [Next] button.

    6. Final confirmation

    1. Check the build project information set.
      • Click the [Previous] button to edit the settings
    2. Click the [Create] button.

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.