ci: align deploy pipeline with shared scripts/templates layout
generate.py moved to vultr-vps/scripts/ and provider/variables/cloud-init to templates/; run render/inventory from VPS_ROOT via scripts/generate.py, keep terraform -chdir in the env workdir. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
7c46dffde2
commit
b039a36a69
10
.github/workflows/deploy-ai-workspace-iac.yaml
vendored
10
.github/workflows/deploy-ai-workspace-iac.yaml
vendored
@ -62,6 +62,8 @@ concurrency:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
INFRA_REPO: ${{ github.repository_owner }}/ai-workspace-infra
|
INFRA_REPO: ${{ github.repository_owner }}/ai-workspace-infra
|
||||||
|
# vultr-vps 根(共享 scripts/ templates/ config/);ENV_DIR 为 terraform 运行目录(workdir)
|
||||||
|
VPS_ROOT: infra/iac_modules/terraform-hcl-standard/vultr-vps
|
||||||
ENV_DIR: infra/iac_modules/terraform-hcl-standard/vultr-vps/envs/ai-workspace
|
ENV_DIR: infra/iac_modules/terraform-hcl-standard/vultr-vps/envs/ai-workspace
|
||||||
PLAYBOOKS_DIR: infra/playbooks
|
PLAYBOOKS_DIR: infra/playbooks
|
||||||
|
|
||||||
@ -113,8 +115,8 @@ jobs:
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
- name: generate.py render (YAML -> 显式 HCL + tfvars)
|
- name: generate.py render (YAML -> 显式 HCL + tfvars)
|
||||||
working-directory: ${{ env.ENV_DIR }}
|
working-directory: ${{ env.VPS_ROOT }}
|
||||||
run: python3 generate.py render
|
run: python3 scripts/generate.py render
|
||||||
|
|
||||||
- name: Terraform init
|
- name: Terraform init
|
||||||
working-directory: ${{ env.ENV_DIR }}
|
working-directory: ${{ env.ENV_DIR }}
|
||||||
@ -144,8 +146,8 @@ jobs:
|
|||||||
|
|
||||||
- name: generate.py inventory (terraform output + YAML -> cmdb.json + inventory.ini)
|
- name: generate.py inventory (terraform output + YAML -> cmdb.json + inventory.ini)
|
||||||
if: ${{ (github.event.inputs.terraform_action || 'apply') == 'apply' }}
|
if: ${{ (github.event.inputs.terraform_action || 'apply') == 'apply' }}
|
||||||
working-directory: ${{ env.ENV_DIR }}
|
working-directory: ${{ env.VPS_ROOT }}
|
||||||
run: python3 generate.py inventory
|
run: python3 scripts/generate.py inventory
|
||||||
|
|
||||||
- name: Build deploy matrix from cmdb.json
|
- name: Build deploy matrix from cmdb.json
|
||||||
id: matrix
|
id: matrix
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user