本镜像为Concourse CI/CD平台提供专用资源支持,旨在集成并执行Cycloid平台的核心功能。通过该资源,用户可在Concourse流水线中自动化触发terracost(基础设施成本估算)和infrapolicy(基础设施策略检查)等Cycloid特性,实现部署前的成本管控与合规性验证。
1. 定义资源类型
在Concourse管道配置中声明资源类型,指定镜像来源:
yamlresource_types: - name: cycloid-resource type: docker-image source: repository: [镜像仓库地址] # 替换为实际镜像仓库路径 tag: [版本标签] # 如"latest"或具体版本号
2. 配置资源实例
定义资源实例,设置Cycloid连接参数:
yamlresources: - name: cycloid-feature-check type: cycloid-resource source: cycloid_api_url: https://[cycloid-instance].com # Cycloid实例API地址 cycloid_api_token: ((cycloid-api-token)) # 通过Concourse变量存储API令牌 timeout: "300s" # 可选,设置功能执行超时时间 log_level: "info" # 可选,设置日志级别(debug/info/warn/error)
3. 流水线中使用资源
在Job计划中通过get或put步骤触发功能执行:
yamljobs: - name: infrastructure-validation plan: - get: infrastructure-code # 获取基础设施代码(如Terraform文件) - get: cycloid-feature-check params: action: "terracost" # 指定执行功能:"terracost"或"infrapolicy" tf_plan_path: "./infrastructure-code/terraform.plan" # Terraform计划文件路径 policy_path: "./infrastructure-code/policy" # 策略文件路径(infrapolicy时需指定)
| 参数名 | 类型 | 描述 | 适用功能 | 是否必填 |
|---|---|---|---|---|
| cycloid_api_url | string | Cycloid平台API访问地址 | 所有 | 是 |
| cycloid_api_token | string | Cycloid平台API认证令牌 | 所有 | 是 |
| action | string | 执行动作,取值"terracost"或"infrapolicy" | 所有 | 是 |
| tf_plan_path | string | Terraform计划文件路径 | terracost | 是 |
| policy_path | string | 策略文件或目录路径 | infrapolicy | 是 |
| timeout | string | 执行超时时间(如"300s") | 所有 | 否 |
| log_level | string | 日志输出级别(debug/info/warn/error) | 所有 | 否 |
yamlresource_types: - name: cycloid-resource type: docker-image source: repository: cycloid/concourse-resource tag: latest resources: - name: terraform-code type: git source: uri: https://github.com/example/terraform-repo.git branch: main - name: cycloid-checker type: cycloid-resource source: cycloid_api_url: https://cycloid.example.com cycloid_api_token: ((cycloid-token)) log_level: "debug" jobs: - name: pre-deploy-validation plan: - get: terraform-code trigger: true - task: generate-tf-plan config: platform: linux image_resource: type: docker-image source: {repository: hashicorp/terraform, tag: 1.6.0} inputs: - name: terraform-code outputs: - name: tf-plan run: path: sh args: - -c - | cd terraform-code terraform init terraform plan -out=../tf-plan/terraform.plan - get: cycloid-checker params: action: "terracost" tf_plan_path: "./tf-plan/terraform.plan" - get: cycloid-checker params: action: "infrapolicy" policy_path: "./terraform-code/policy" tf_plan_path: "./tf-plan/terraform.plan"
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
docker search 限制
站内搜不到镜像
离线 save/load
插件要用 plugin install
WSL 拉取慢
安全与 digest
新手拉取配置
镜像合规机制
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
域名连通性排查
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务