Availability of Workspace

vscode:go

Difference in configuring the built-in task for workspace:

  • When using this task:

    When starting workspace, you need to wait for this task to complete before the WebIDE and VSCode/Cursor client entry points appear.

  • When not using this task:

    After the prepare stage of the pipeline is completed (with code-server code service startup), the WebIDE and VSCode/Cursor client entry points will appear before the stages task is executed.

The timing difference mentioned above refers to the appearance of the entry points from the loading waiting page to the page for selecting the entry point. In reality, regardless of whether this task is used or not, workspace is already available after the code-server code service is started.

Note: Using this task will increase the waiting time. If you need to delay the timing for developers to enter, allowing entry into the workspace environment only after certain tasks are completed, you can use this task.

# Applicable Events

  • vscode
  • branch.create
  • api_trigger
  • web_trigger

# Output Result

{
 // webide url
 url
}

# Configuration Example

# .cnb.yml
$:
  # Dedicated for starting remote development in the page
  vscode:
    - docker:
        # Use a custom image as the development environment.
        # If this parameter is not passed, the default image cnbcool/default-dev-env:latest will be used.
        image: cnbcool/default-dev-env:latest
      services:
        - vscode
        - docker
      stages:
        # Hope to enter the development environment after this task is completed
        - name: ls
          script: ls -al
        - name: vscode go
          type: vscode:go
        # Tasks that can be executed after entering the development environment
        - name: ls
          script: ls -al