1.8. 构建的卷定义
您可以在 Build
CR 中定义卷。定义的卷覆盖 BuildStrategy
资源中指定的卷。如果卷没有被覆盖,则构建运行会失败。
以下示例显示了在 Build
CR 中使用 volumes
字段:
apiVersion: shipwright.io/v1beta1 kind: Build metadata: name: <build_name> spec: source: git: url: https://github.com/example/url strategy: name: buildah kind: ClusterBuildStrategy paramValues: - name: dockerfile value: Dockerfile output: image: registry/namespace/image:latest volumes: - name: <your_volume_name> configMap: name: <your_configmap_name>