Simplify the builders configuration
1. Add driver as an option, defaulting to `docker-container`. For a
"native" build you can set it to `docker`
2. Set arch as a array of architectures to build for, defaulting to
`[ "amd64", "arm64" ]` unless you are using the docker driver in
which case we default to not setting a platform
3. Remote is now just a connection string for the remote builder
4. If remote is set, we only use it for non-local arches, if we are
only building for the local arch, we'll ignore it.
Examples:
On arm64, build for arm64 locally, amd64 remotely or
On amd64, build for amd64 locally, arm64 remotely:
```yaml
builder:
remote: ssh://docker@docker-builder
```
On arm64, build amd64 on remote,
On amd64 build locally:
```yaml
builder:
arch:
- amd64
remote:
host: ssh://docker@docker-builder
```
Build amd64 on local:
```yaml
builder:
arch:
- amd64
```
Use docker driver, building for local arch:
```yaml
builder:
driver: docker
```
This commit is contained in:
committed by
Donal McBreen
parent
cffb6c3d7e
commit
56268d724d
5
test/fixtures/deploy_with_remote_builder.yml
vendored
5
test/fixtures/deploy_with_remote_builder.yml
vendored
@@ -36,6 +36,5 @@ accessories:
|
||||
readiness_delay: 0
|
||||
|
||||
builder:
|
||||
remote:
|
||||
arch: amd64
|
||||
host: ssh://app@1.1.1.5
|
||||
arch: <%= `uname -m`.strip == "x86_64" ? "arm64" : "amd64" %>
|
||||
remote: ssh://app@1.1.1.5
|
||||
|
||||
@@ -40,6 +40,5 @@ ssh:
|
||||
port: 22
|
||||
|
||||
builder:
|
||||
remote:
|
||||
arch: amd64
|
||||
host: ssh://app@1.1.1.5:2122
|
||||
arch: <%= `uname -m`.strip == "x86_64" ? "arm64" : "amd64" %>
|
||||
remote: ssh://app@1.1.1.5:2122
|
||||
|
||||
Reference in New Issue
Block a user