-
Notifications
You must be signed in to change notification settings - Fork 887
docs: add guide for CI/CD template testing #15528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Introduce a new tutorial outlining the process for testing and publishing Coder templates within a CI/CD pipeline using GitHub Actions. This guide includes prerequisites, a comprehensive workflow example, and detailed steps for template validation and deployment.
Add a new entry in the documentation's manifest for a tutorial on testing and publishing Coder templates in a CI/CD pipeline.
docs/tutorials/testing-templates.md
Outdated
- name: Create a test workspace | ||
run: | | ||
coder create -t $TEMPLATE_NAME --template-version ${{ steps.name.outputs.version_name }} --yes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also show how to test if specific conditions work inside the template (e.g. make build
) or something? Like how to run example commands and ensure they run properly? The coder exp scaletest
command may be useful for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
coder ssh <workspace>
does not let us run the command, and coder exp scale test
doesn't let you use a template not set as active.
Another approach could be to use coder config-ssh
along with ssh coder.<workspace-name> -- <command to run>
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would love @jatcod3r's review as this was something we were discussing lately. We could add this to our demo env
Add SSH configuration and example commands to test the workspace creation using the new template version. This ensures the template functions as expected before promotion.
@jatcod3r Can you be the approver for this PR? |
Co-authored-by: Edward Angert <EdwardAngert@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Clarified CLI installation instructions for pushing template versions and linked to the GitHub Actions setup-coder for automation. Removed redundant setup-action note and added details on creating a headless user for CI workflows.
b6d559a
to
fa904b2
Compare
Introduce a new tutorial outlining the process for testing and publishing
Coder templates within a CI/CD pipeline using GitHub Actions. This guide
includes prerequisites, a comprehensive workflow example, and detailed
steps for template validation and deployment.
Closes #9899