Authors Documentation
Breadcrumbs

Getting Started

This guide quickly gets you up and running using the repository template, the devtools container image, and a few basic CodeBundle tests.

CodeCollection Development Environment Setup

Repository Initialization

To get started, first create a CodeCollection using the repository template on GitHub. Select the Create a new repository option from the Use this template dropdown.

image?url=https%3A%2F%2F2918392740-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F8bTq4LyoJlmSU9O0EDAS%252Fuploads%252F0fHdlI77NbGYIEDMCcB0%252Fimage.png%3Falt%3Dmedia%26token%3D005c4219-8f8b-4b98-8b28-df0f2d9818cb&w
Creating a CodeCollection Repository from Template


image?url=https%3A%2F%2F2918392740-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F8bTq4LyoJlmSU9O0EDAS%252Fuploads%252Fr3e3E6f9hHd5aMaTYJa6%252Fimage.png%3Falt%3Dmedia%26token%3Dff39a430-adcc-4769-8ec5-e4d1edfec5a3&w
Example CodeCollection Repository


Starting Your Development Container In GitHub Codespaces

With your template created you'll be able to run it in codespaces (or locally using the devcontainer VSCode plugin).

image?url=https%3A%2F%2F2918392740-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F8bTq4LyoJlmSU9O0EDAS%252Fuploads%252Fevar0g2KFjGTU6G0qKsf%252Fimage.png%3Falt%3Dmedia%26token%3Dc994e8a8-23cd-4261-8272-7fd8e474f447&w

Once the devcontainer has started, your enviornment should look as follows:

image?url=https%3A%2F%2F2918392740-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F8bTq4LyoJlmSU9O0EDAS%252Fuploads%252FRcO5b8RpoX57HHe2u5PN%252Fimage.png%3Falt%3Dmedia%26token%3Df8b3934d-390b-4280-8ebb-190cddd43bf0&w

Starting Your Development Environment in VS Code

If running in Visual Studio Code, clone the repository and upon opening the repo, access the Command Pallet (Ctrl + Shift + P) and select "Dev Containers: Reopen in Container"

image?url=https%3A%2F%2F2918392740-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F8bTq4LyoJlmSU9O0EDAS%252Fuploads%252FfAZjAHUq6HJ4xEdaaNl6%252Fimage.png%3Falt%3Dmedia%26token%3D35a03f7f-4f00-4891-8124-3eda0631314c&w



Validate CodeBundle Functionality

To ensure that the environment is functioning, run the hello world CodeBundle. Use the ro cli utility, which is just a simple wrapper for running robot, to run the sli.robot file.

Copy

runwhen@codespaces-29ff86:~/codecollection/$ cd codebundles/hello_world
runwhen@codespaces-29ff86:~/codecollection/codebundles/hello_world$ ro sli.robot 
==============================================================================
Sli :: This is a hello world codebundle!                                      
==============================================================================
Hello World                                                           ..
Push metric: value:1 sub_name:None metric_type:untyped labels:{}

Hello World                                                           | PASS |
------------------------------------------------------------------------------
Sli :: This is a hello world codebundle!                              | PASS |
1 task, 1 passed, 0 failed
==============================================================================
Output:  /robot_logs/sli-output.xml
Log:     /robot_logs/sli-log.html
Report:  /robot_logs/sli-report.html
runwhen@codespaces-29ff86:~/codecollection/codebundles/hello_world$ 

To view the detailed log output, you can select the Ports tab and open port 3000 in the browser:

image?url=https%3A%2F%2F2918392740-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F8bTq4LyoJlmSU9O0EDAS%252Fuploads%252FQLjCdXDaP2m7qzEmcQyh%252Fimage.png%3Falt%3Dmedia%26token%3D90dea925-26e1-4968-8e36-a6d8bcb27f86&w
Accessing the HTTP Log Server
image?url=https%3A%2F%2F2918392740-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F8bTq4LyoJlmSU9O0EDAS%252Fuploads%252FvFTW7Xx5xsgpdXwAv1PX%252Fimage.png%3Falt%3Dmedia%26token%3Dde623057-fef4-44f0-b4d8-6a75ce11e0dd&w
Viewing the HTTP Log Server Directories


image?url=https%3A%2F%2F2918392740-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F8bTq4LyoJlmSU9O0EDAS%252Fuploads%252Fc03sTDNnlLC0EIDLVygW%252Fimage.png%3Falt%3Dmedia%26token%3D704d0ecb-a0c0-4061-9f87-8a96ff2e2301&w
Viewing Robot Logs