Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
The push template task from Line 158 used here. Does not seem to support any kind of test. Version name is in here.
https://github.com/coder/coder/blob/main/.github/workflows/dogfood.yaml
The examples here set it create it with the name and test it with the name
https://coder.com/docs/tutorials/testing-templates
The code of coder templates Push
Lines 140 to 144 in ffd336b
Using the github actions to push a new template with an auto-generated version name. it pushes successfully but the version name is the default auto-generated human readable version instead of the version specified in the push.
If you try to test it when it's new it's using a human readable name and not an assigned name and the test will fail.
A subsequent re-run of the CICD job with no changes succeeds.
Relevant Log Output
- name: Push template to Coder
run: |
coder templates push $TEMPLATE_NAME --activate=false --name ${{ steps.name.outputs.version_name }} --message "${{ steps.message.outputs.pr_title }}" --yes
- name: Create a test workspace and run some example commands
run: |
coder create -t $TEMPLATE_NAME --template-version ${{ steps.name.outputs.version_name }} test-${{ steps.name.outputs.version_name }} --yes
coder config-ssh --yes
# run some example commands
coder ssh test-${{ steps.name.outputs.version_name }} -- make build
Expected Behavior
if specifying a version name builds and test steps should pass with the variable set.
Steps to Reproduce
- create a variable for template version and Set version name of a newly created template such as
coder templates push $TEMPLATE_NAME —activate=false --name ${{ steps.name.outputs.version_name }}
- run tests or builds against that version name.
- Confirm that initial tests use a default human generated name.
Environment
- Host OS:
- Coder version:
Additional Context
No response