English | 中文
This is a beginner's challenge repository for the CNB platform. Through hands-on practice, you'll progressively unlock CNB's core features — from setting up your profile to configuring pipelines, from building container images to creating NPCs.
Each task has clear objectives and a verification mechanism. After submitting a PR, the pipeline will automatically check your progress.
💡 If the current task doesn't involve code changes (e.g., just setting up your profile), you can simply add a file (like creating a
hello.txtwith your name in it) — as long as you can submit a PR to trigger the pipeline.
| # | Task | Description | Reference |
|---|---|---|---|
| 1.1 | Change default username | After registration, CNB assigns a default username (e.g., cnb.cwH7BL2BwHA). Go to Account Settings to change it to something memorable | N/A |
| 1.2 | Set your bio | Your bio is displayed on your profile page, helping other developers quickly learn about you. Go to Profile Settings to fill it in | N/A |
| 1.3 | Pin repositories | The repository wall is your profile's "showcase". Pin your best projects so visitors can see your highlights at a glance | N/A |
| 1.4 | Follow users | Following other developers lets you see their latest activities in your feed. For example, follow: Hunter Bown, 哪嘟通临时工, etc. | N/A |
| 1.5 | Star repositories | Starring is a way to recognize quality repos. Star these repositories: cnb/feedback, examples/showcase | N/A |
| # | Task | Description | Reference |
|---|---|---|---|
| 2.1 | Configure branch protection | Branch protection prevents unreviewed code from being pushed directly to the main branch. Configure it in "Settings → Branch Protection". If you're the repo owner or admin, you can also enable "Allow admins/owners to push to protected branches" to make subsequent challenges smoother | N/A |
| 2.2 | Add an open-source LICENSE | A license declares the usage rules for your code. Code without a LICENSE defaults to "all rights reserved". Add a standard license (e.g., MIT) so others can confidently use your code | Choose a License |
| 2.3 | Customize repository UI | Through the .cnb/settings.yml config file, you can customize the Fork button and Cloud IDE button descriptions, hover images, and more to give your repo personality | UI Customization |
| # | Task | Description | Reference |
|---|---|---|---|
| 3.1 | Enable auto-trigger | Forked repositories do not automatically trigger cloud-native builds by default. Go to "Settings → Cloud Native Build" and enable "Allow event auto-trigger" and "Allow cron auto-trigger" so that subsequent pipeline tasks can run properly | N/A |
| 3.2 | Push trigger | The most basic trigger — automatically runs the pipeline when code is pushed to a specified branch. Ideal for CI scenarios | Quick Start |
| 3.3 | Crontab trigger | Configure scheduled tasks via cron expressions. Suitable for periodic builds, data sync, health checks, etc. Format: "crontab: 30 5 * * *" | Cron Events |
| 3.4 | Pull Request trigger | Triggered when a PR is created or updated. Used for automated code checks, unit tests, and build verification — a great Code Review companion | Pull Request Events |
| 3.5 | Tag push trigger | Triggered when a tag is pushed. Typically used for releasing versions and building production images | Tag Events |
| 3.6 | Web trigger | Manually triggered from the build page. Suitable for tasks that require human confirmation before execution | Web Events |
| 3.7 | API trigger | Trigger pipelines in other repositories via Open API or the built-in cnb:trigger task, enabling cross-repo orchestration | API Events |
| 3.8 | Deploy trigger | Define deployment environments and approval workflows via .cnb/tag_deploy.yml. One-click deploy from the Release page with multi-environment chaining and approval support | Custom Deploy |
| # | Task | Description | Reference |
|---|---|---|---|
| 4.1 | Use Cloud IDE | Click the "Cloud IDE" button on the repo page to launch a full development environment (VS Code) in your browser — no local setup required | Cloud IDE Intro |
| 4.2 | Configure custom dev environment | The default environment may not include the tools you need. Specify a custom Docker image in the vscode event of .cnb.yml to pre-install specific languages, frameworks, and toolchains | Custom Dev Environment |
| 4.3 | Configure dev preview | After configuring onlyPreview and launch, the Cloud IDE will automatically start your web app and provide a live preview link | Preview Configuration |
| # | Task | Description | Reference |
|---|---|---|---|
| 5.1 | Docker artifacts | Build Docker images via pipelines and push them to CNB's built-in artifact registry, automating the path from code to deployable images. Registry format: docker.cnb.cool/<slug>/<image-name> | Docker Artifacts |
| 5.2 | NPM artifact registry | CNB supports hosting private NPM packages. Internal shared component libraries can be managed and distributed through the NPM artifact registry | NPM Artifacts |
| 5.3 | Maven artifact registry | Java projects can publish build artifacts to CNB's Maven registry for team-wide dependency management | Maven Artifacts |
| # | Task | Description | Reference |
|---|---|---|---|
| 6.1 | Create a mission | Missions is CNB's lightweight project management feature, supporting creation, assignment, and tracking of work items. Create missions in your organization to manage development plans and bug tracking | Missions |
| # | Task | Description | Reference |
|---|---|---|---|
| 7.1 | Enable repository knowledge base | Once enabled, AI will automatically index your repository content, providing more context-aware answers in Issues and PRs. Enable it with one click in repository "Settings" | Knowledge Base |
| 7.2 | Enable Wiki | CodeWiki is a documentation system deeply integrated with the code repository. Enable it by configuring cnbcool/codewiki:latest in .cnb.yml. Ideal for maintaining project docs and team knowledge | CodeWiki |
| 7.3 | Create and enable an NPC | NPC (Non-Player Character) is CNB's AI assistant. You can create custom NPCs that automatically perform code reviews, summarize PRs, answer technical questions, and even modify code based on requirements | NPC |
7 levels, 26 tasks in total. Enjoy the challenge!
Having issues? Feel free to open an Issue at cnb/feedback.