CLI를 통해 CCD 사용
Follow this workflow to use CCD through the UGS command line interface, such as to authenticate, create buckets, manage entries, and handle releases.
읽는 시간 4분최근 업데이트: 한 달 전
이 섹션에서는 다음 주제를 포함하여 CLI(커맨드 라인 인터페이스)를 통해 CCD(Cloud Content Delivery)를 사용하는 방법에 대한 예제를 제공합니다.
인증
API 키를 사용하여 서비스에 로그인합니다. API 키를 찾는 데 도움이 필요하면 시작하기 섹션을 참고하십시오. 인증$ ucd auth login XXXXXXXXXXXXLogin successful.
auth info$ ucd auth infoCurrent user: Joe Smith
버킷 생성
첫 번째 버킷을 생성합니다. 버킷은 단일 프로젝트와 연결됩니다. 이 예제의 프로젝트 ID는e1942cea-12df-4220-aa6d-f8c9c3ab7526b5179fae-d9be-4cd4-8afb-7bfdd691eb06이 프로젝트에 대해$ ucd buckets list e1942cea-12df-4220-aa6d-f8c9c3ab7526 --environment=b5179fae-d9be-4cd4-8afb-7bfdd691eb06 No buckets found for given project and environment.
example_bucket$ ucd buckets create e1942cea-12df-4220-aa6d-f8c9c3ab7526 example_bucket --environment=b5179fae-d9be-4cd4-8afb-7bfdd691eb06Created bucket: example_bucket (aee9ee5f-fa01-46d3-a293-731d15f066cf)
버킷과 엔트리 이름은 대소문자를 구분합니다.
새로 생성된 버킷을 보려면 이 프로젝트의 버킷을 다시 나열합니다.
버킷 나열
엔트리와 릴리스 생성 작업을 더 쉽게 하려면 개발 환경과 새로 생성된 버킷을 로컬 구성에 저장합니다. (모든 작업에 대해 CLI에 파라미터로 제공하지 마십시오.) 개발 환경 ID를 복사합니다(이 예제에서는$ ucd buckets list e1942cea-12df-4220-aa6d-f8c9c3ab7526 --environment=b5179fae-d9be-4cd4-8afb-7bfdd691eb06Buckets for project (e1942cea-12df-4220-aa6d-f8c9c3ab7526) in environment (b5179fae-d9be-4cd4-8afb-7bfdd691eb06):- example_bucket (aee9ee5f-fa01-46d3-a293-731d15f066cf)
b5179fae-d9be-4cd4-8afb-7bfdd691eb06위의 버킷 생성 메시지에서 버킷 ID(버킷 이름 아님)를 복사합니다(이 예제에서는$ ucd config set environment b5179fae-d9be-4cd4-8afb-7bfdd691eb06 --project=e1942cea-12df-4220-aa6d-f8c9c3ab7526Successfully switched to environment b5179fae-d9be-4cd4-8afb-7bfdd691eb06.Currently active project: e1942cea-12df-4220-aa6d-f8c9c3ab7526.
aee9ee5f-fa01-46d3-a293-731d15f066cfCCD는 사용자가 지정한 개발 환경 및 버킷의 엔트리 및 릴리스와 관련된 모든 커맨드를 자동으로 수행합니다.$ ucd config set bucket aee9ee5f-fa01-46d3-a293-731d15f066cfSuccessfully switched to bucket aee9ee5f-fa01-46d3-a293-731d15f066cf.Currently active project: e1942cea-12df-4220-aa6d-f8c9c3ab7526.Currently active environment: b5179fae-d9be-4cd4-8afb-7bfdd691eb06.Currently active bucket: aee9ee5f-fa01-46d3-a293-731d15f066cf (example_bucket).
버킷에 엔트리 생성
새로 생성된 버킷(비어 있어야 함)의 엔트리를 나열합니다. 엔트리 나열로컬 폴더의 모든 파일을 동기화합니다. 이 예제에서 로컬 폴더에는 콘텐츠로 생성된 에셋 번들이 포함되어 있습니다. 파일 동기화$ ucd entries listNo Entries found for current bucket.
이를 통해 파일이 버킷에 엔트리로 추가됩니다. 버킷의 콘텐츠를 나열하고 각 엔트리에 대한 몇 가지 기본 정보를 확인할 수 있습니다. 버킷의 콘텐츠 나열$ ucd entries sync ./ServerData/StandaloneOSXCalculating...Added Entry: catalog_2019.07.30.18.24.34.hashAdded Entry: catalog_2019.07.30.18.24.34.jsonAdded Entry: remotedemodata_green.bundleAdded Entry: remotedemodata_mat1.bundleAdded Entry: remotedemodata_sphere.bundleAdded Entry: remotedemodata_unitylogo.bundleAdded Entry: remotedemodata_unitylogoprefab.bundleAdded Entry: remotedemodata_scenes_scene2.bundleAdded Entry: remotedemodata_scenes_scene.bundleAdded Entry: spaceshooterdata_done_asteroid01.bundleAdded Entry: spaceshooterdata_done_asteroid02.bundleAdded Entry: spaceshooterdata_done_asteroid03.bundleAdded Entry: spaceshooterdata_done_bolt-enemy.bundleAdded Entry: spaceshooterdata_done_bolt.bundleAdded Entry: spaceshooterdata_done_enemyship.bundleAdded Entry: spaceshooterdata_done_player.bundleAdded Entry: spaceshooterdata_engines_enemy.bundleAdded Entry: spaceshooterdata_engines_player.bundleAdded Entry: spaceshooterdata_explosion_asteroid.bundleAdded Entry: spaceshooterdata_explosion_enemy.bundleAdded Entry: spaceshooterdata_explosion_player.bundleAdded Entry: spaceshooterdata_starfield.bundleComplete! Bytes uploaded: 5346781
특정 엔트리에 대한 자세한 정보를 가져오려면$ ucd entries list22 entries for current bucket (aee9ee5f-fa01-46d3-a293-731d15f066cf):2019-08-21 14:27:03 167915 spaceshooterdata_starfield.bundle2019-08-21 14:27:00 573539 spaceshooterdata_explosion_player.bundle2019-08-21 14:26:56 412235 spaceshooterdata_explosion_enemy.bundle2019-08-21 14:26:52 382630 spaceshooterdata_explosion_asteroid.bundle2019-08-21 14:26:49 177018 spaceshooterdata_engines_player.bundle2019-08-21 14:26:45 157215 spaceshooterdata_engines_enemy.bundle2019-08-21 14:26:42 1085518 spaceshooterdata_done_player.bundle2019-08-21 14:26:38 1070297 spaceshooterdata_done_enemyship.bundle2019-08-21 14:26:34 27178 spaceshooterdata_done_bolt.bundle2019-08-21 14:26:31 28362 spaceshooterdata_done_bolt-enemy.bundle2019-08-21 14:26:28 231658 spaceshooterdata_done_asteroid03.bundle2019-08-21 14:26:24 221450 spaceshooterdata_done_asteroid02.bundle2019-08-21 14:26:20 227842 spaceshooterdata_done_asteroid01.bundle2019-08-21 14:26:17 23016 remotedemodata_scenes_scene.bundle2019-08-21 14:26:13 23064 remotedemodata_scenes_scene2.bundle2019-08-21 14:26:10 10568 remotedemodata_unitylogoprefab.bundle2019-08-21 14:26:07 462522 remotedemodata_unitylogo.bundle2019-08-21 14:26:03 7864 remotedemodata_sphere.bundle2019-08-21 14:26:00 6320 remotedemodata_mat1.bundle2019-08-21 14:25:57 6320 remotedemodata_green.bundle2019-08-21 14:25:53 44218 catalog_2019.07.30.18.24.34.json2019-08-21 14:25:50 32 catalog_2019.07.30.18.24.34.hash
entries info이제 게임 클라이언트는 엔트리와 연결된 경로를 사용하여 버킷의 개별 파일에 대한 콘텐츠를 요청할 수 있습니다. 모든 게임 클라이언트 요청을$ ucd entries info spaceshooterdata_starfield.bundle`Entry Info:Path: spaceshooterdata_starfield.bundleId: 8ac46783-be01-4a47-b23e-74233fc7cc09Last Modified: 2019-08-21 14:27:03Content Size: 167915Content Hash: 4a3ad5b69bd489699d1909e8868a7cb1Content Type: application/octet-streamContent Link: …Labels:Metadata:Current Version: aa0304db-fd9f-4772-9549-dfeb44cc6d6f
<project_guid>.client-api.unity3dusercontent.com/client_api/v1/spaceshooterdata_starfield.bundlehttps://<project_guid>.client-api.unity3dusercontent.com/client_api/v1/buckets/aee9ee5f-fa01-46d3-a293-731d15f066cf/entry_by_path/content/?path=spaceshooterdata_starfield.bundlehttps://<project_guid>.client-api.unity3dusercontent.com/client_api/v1/buckets/aee9ee5f-fa01-46d3-a293-731d15f066cf/entries/8ac46783-be01-4a47-b23e-74233fc7cc09/content/릴리스 생성
엔트리의 현재 상태에서 릴리스를 생성합니다. 릴리스 생성이를 통해 나중에 해당 엔트리를 업데이트하거나 제거하더라도 콘텐츠를 요청할 때 해당 엔트리의 정확한 버전을 사용할 수 있습니다.$ ucd releases create -n "This is a sample note"Created release (#1) in bucket (aee9ee5f-fa01-46d3-a293-731d15f066cf).Id: 80653663-eb39-45e7-9323-e34b23df0d75Created: 2019-08-21 14:27:30...
릴리스에 대한 자세한 정보를 가져오려면
releases info이 버킷에서 생성한 모든 릴리스 목록을 가져오려면 다음을 입력합니다. 버킷의 릴리스 나열$ ucd releases info 80653663-eb39-45e7-9323-e34b23df0d75Release #1:Id: 80653663-eb39-45e7-9323-e34b23df0d75Created: 2019-08-21 14:27:30Content Size: 123456Content Hash: b62343cb3582a7de1286dd3cf23c3592Notes: This is a sample noteMetadata:Entries:- remotedemodata_scenes_scene2.bundle (version: d7c69bc0-5c0b-4625-8a7d-94a4972aa236)- remotedemodata_unitylogo.bundle (version: 97d3659f-0b74-403a-be67-02641ce2dc91)- spaceshooterdata_done_enemyship.bundle (version: edcedc81-80b6-4006-9732-0444898fcffa)- remotedemodata_unitylogoprefab.bundle (version: 4edfa2be-7fae-44c9-bb45-f601cc1130db)- spaceshooterdata_done_bolt-enemy.bundle (version: ef36bfa8-8b24-4b81-a329-b3fad0a0939b)...
이제 이 릴리스에 포함된 콘텐츠를 직접 참조할 수 있습니다. 이렇게 하면 나중에 버킷에서 엔트리를 변경하더라도 CCD가 릴리스를 생성하는 데 사용하는 정확한 콘텐츠 세트를 얻을 수 있습니다.$ ucd releases listReleases for current bucket (aee9ee5f-fa01-46d3-a293-731d15f066cf):2019-08-21 14:27:30 #1 (80653663-eb39-45e7-9323-e34b23df0d75)
spaceshooterdata_starfield.bundlehttps://<project_guid>.client-api.unity3dusercontent.com/client_api/v1/buckets/aee9ee5f-fa01-46d3-a293-731d15f066cf/releases/80653663-eb39-45e7-9323-e34b23df0d75/entry_by_path/content/?path=spaceshooterdata_starfield.bundlehttps://<project_guid>.client-api.unity3dusercontent.com/client_api/v1/buckets/aee9ee5f-fa01-46d3-a293-731d15f066cf/releases/80653663-eb39-45e7-9323-e34b23df0d75/entries/8ac46783-be01-4a47-b23e-74233fc7cc09/content/release_by_badgelatesthttps://<project_guid>.client-api.unity3dusercontent.com/client_api/v1/buckets/aee9ee5f-fa01-46d3-a293-731d15f066cf/release_by_badge/latest/entry_by_path/content/?path=spaceshooterdata_starfield.bundle배지 관리
릴리스를 생성한 후 릴리스를 고유하게 식별하는 배지를 적용할 수 있습니다. 배지는 버킷 내의 단일 릴리스만 가리킬 수 있지만 릴리스 간에 배지를 이동할 수 있습니다. 런타임 시 특정 릴리스 ID 대신 배지 이름을 사용하여 콘텐츠를 쿼리할 수 있으므로 워크플로의 유연성이 향상됩니다. 예를 들어 QA 팀이 사용할 최신 릴리스에qa_latestmy_first_badgebadge_namerelease_ID이 버킷에 적용한 모든 배지를 나열하려면 다음을 수행합니다. 버킷의 배지 나열$ ucd badges add my_first_badge 80653663-eb39-45e7-9323-e34b23df0d75Added badge 'my_first_badge' to release (80653663-eb39-45e7-9323-e34b23df0d75).
배지가 참조하는 릴리스와 관련된 콘텐츠를 다운로드할 준비가 되었습니다. 엔트리 ID로 콘텐츠를 직접 다운로드하는 것과 비슷한 방식으로 이 작업을 수행할 수 있습니다.$ ucd badges listBadges for current bucket (aee9ee5f-fa01-46d3-a293-731d15f066cf):2020-01-07 12:55:41 my_first_badge (80653663-eb39-45e7-9323-e34b23df0d75)
spaceshooterdata_starfield.bundlehttps://<project_guid>.client-api.unity3dusercontent.com/client_api/v1/buckets/aee9ee5f-fa01-46d3-a293-731d15f066cf/release_by_badge/my_first_badge/entry_by_path/content/?path=spaceshooterdata_starfield.bundlehttps://<project_guid>.client-api.unity3dusercontent.com/client_api/v1/buckets/aee9ee5f-fa01-46d3-a293-731d15f066cf/release_by_badge/my_first_badge/entries/8ac46783-be01-4a47-b23e-74233fc7cc09/content/