Skip to content

Commit

Permalink
Merge pull request #374 from toothbrush/toothbrush-patch-1
Browse files Browse the repository at this point in the history
cli-version: Fix int/string mismatch.
  • Loading branch information
toote authored Feb 22, 2023
2 parents b584af1 + d339795 commit 035d117
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 34 deletions.
60 changes: 30 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The following pipeline will run `test.sh` inside a `app` service container using
steps:
- command: test.sh
plugins:
- docker-compose#v4.10.0:
- docker-compose#v4.10.1:
run: app
```
Expand All @@ -28,7 +28,7 @@ through if you need:
steps:
- command: test.sh
plugins:
- docker-compose#v4.10.0:
- docker-compose#v4.10.1:
run: app
config: docker-compose.tests.yml
env:
Expand All @@ -41,7 +41,7 @@ or multiple config files:
steps:
- command: test.sh
plugins:
- docker-compose#v4.10.0:
- docker-compose#v4.10.1:
run: app
config:
- docker-compose.yml
Expand All @@ -56,7 +56,7 @@ env:
steps:
- command: test.sh
plugins:
- docker-compose#v4.10.0:
- docker-compose#v4.10.1:
run: app
```

Expand All @@ -65,7 +65,7 @@ If you want to control how your command is passed to docker-compose, you can use
```yml
steps:
- plugins:
- docker-compose#v4.10.0:
- docker-compose#v4.10.1:
run: app
command: ["custom", "command", "values"]
```
Expand All @@ -79,15 +79,15 @@ steps:
- plugins:
- docker-login#v2.0.1:
username: xyz
- docker-compose#v4.10.0:
- docker-compose#v4.10.1:
build: app
image-repository: index.docker.io/myorg/myrepo
- wait
- command: test.sh
plugins:
- docker-login#v2.0.1:
username: xyz
- docker-compose#v4.10.0:
- docker-compose#v4.10.1:
run: app
```

Expand All @@ -104,7 +104,7 @@ steps:
- command: generate-dist.sh
artifact_paths: "dist/*"
plugins:
- docker-compose#v4.10.0:
- docker-compose#v4.10.1:
run: app
```

Expand All @@ -122,7 +122,7 @@ steps:
- command: generate-dist.sh
artifact_paths: "dist/*"
plugins:
- docker-compose#v4.10.0:
- docker-compose#v4.10.1:
run: app
volumes:
- "./dist:/app/dist"
Expand All @@ -146,7 +146,7 @@ this plugin offers a `environment` block of its own:
steps:
- command: generate-dist.sh
plugins:
- docker-compose#v4.10.0:
- docker-compose#v4.10.1:
run: app
env:
- BUILDKITE_BUILD_NUMBER
Expand All @@ -164,7 +164,7 @@ Alternatively, you can have the plugin add all environment variables defined for
steps:
- command: use-vars.sh
plugins:
- docker-compose#v4.10.0:
- docker-compose#v4.10.1:
run: app
propagate-environment: true
```
Expand All @@ -179,7 +179,7 @@ Alternatively, if you want to set build arguments when pre-building an image, th
steps:
- command: generate-dist.sh
plugins:
- docker-compose#v4.10.0:
- docker-compose#v4.10.1:
build: app
image-repository: index.docker.io/myorg/myrepo
args:
Expand All @@ -196,7 +196,7 @@ If you have multiple steps that use the same service/image (such as steps that r
steps:
- label: ":docker: Build"
plugins:
- docker-compose#v4.10.0:
- docker-compose#v4.10.1:
build: app
image-repository: index.docker.io/myorg/myrepo
Expand All @@ -206,7 +206,7 @@ steps:
command: test.sh
parallelism: 25
plugins:
- docker-compose#v4.10.0:
- docker-compose#v4.10.1:
run: app
```

Expand All @@ -222,7 +222,7 @@ steps:
agents:
queue: docker-builder
plugins:
- docker-compose#v4.10.0:
- docker-compose#v4.10.1:
build:
- app
- tests
Expand All @@ -234,7 +234,7 @@ steps:
command: test.sh
parallelism: 25
plugins:
- docker-compose#v4.10.0:
- docker-compose#v4.10.1:
run: tests
```

Expand All @@ -246,7 +246,7 @@ If you want to push your Docker images ready for deployment, you can use the `pu
steps:
- label: ":docker: Push"
plugins:
- docker-compose#v4.10.0:
- docker-compose#v4.10.1:
push: app
```

Expand All @@ -256,7 +256,7 @@ To push multiple images, you can use a list:
steps:
- label: ":docker: Push"
plugins:
- docker-compose#v4.10.0:
- docker-compose#v4.10.1:
push:
- first-service
- second-service
Expand All @@ -268,7 +268,7 @@ If you want to push to a specific location (that's not defined as the `image` in
steps:
- label: ":docker: Push"
plugins:
- docker-compose#v4.10.0:
- docker-compose#v4.10.1:
push:
- app:index.docker.io/myorg/myrepo/myapp
- app:index.docker.io/myorg/myrepo/myapp:latest
Expand All @@ -282,14 +282,14 @@ A newly spawned agent won't contain any of the docker caches for the first run w
steps:
- label: ":docker: Build an image"
plugins:
- docker-compose#v4.10.0:
- docker-compose#v4.10.1:
build: app
image-repository: index.docker.io/myorg/myrepo
cache-from: app:index.docker.io/myorg/myrepo/myapp:latest
- wait
- label: ":docker: Push to final repository"
plugins:
- docker-compose#v4.10.0:
- docker-compose#v4.10.1:
push:
- app:index.docker.io/myorg/myrepo/myapp
- app:index.docker.io/myorg/myrepo/myapp:latest
Expand All @@ -307,7 +307,7 @@ This plugin allows for the value of `cache-from` to be a string or a list. If it
steps:
- label: ":docker Build an image"
plugins:
- docker-compose#v4.10.0:
- docker-compose#v4.10.1:
build: app
image-repository: index.docker.io/myorg/myrepo
separator-cache-from: "#"
Expand All @@ -317,7 +317,7 @@ steps:
- wait
- label: ":docker: Push to final repository"
plugins:
- docker-compose#v4.10.0:
- docker-compose#v4.10.1:
push:
- app:myregistry:port/myrepo/myapp:my-branch
- app:myregistry:port/myrepo/myapp:latest
Expand All @@ -330,7 +330,7 @@ Adding a grouping tag to the end of a cache-from list item allows this plugin to
steps:
- label: ":docker: Build Intermediate Image"
plugins:
- docker-compose#v4.10.0:
- docker-compose#v4.10.1:
build: myservice_intermediate # docker-compose.yml is the same as myservice but has `target: intermediate`
image-name: buildkite-build-${BUILDKITE_BUILD_NUMBER}
image-repository: index.docker.io/myorg/myrepo/myservice_intermediate
Expand All @@ -340,7 +340,7 @@ steps:
- wait
- label: ":docker: Build Final Image"
plugins:
- docker-compose#v4.10.0:
- docker-compose#v4.10.1:
build: myservice
image-name: buildkite-build-${BUILDKITE_BUILD_NUMBER}
image-repository: index.docker.io/myorg/myrepo
Expand Down Expand Up @@ -384,7 +384,7 @@ A basic pipeline similar to the following:
steps:
- label: ":docker: Run & Push"
plugins:
- docker-compose#v4.10.0:
- docker-compose#v4.10.1:
run: myservice
push: myservice
```
Expand All @@ -399,7 +399,7 @@ A basic pipeline similar to the following:
steps:
- label: ":docker: Build & Push"
plugins:
- docker-compose#v4.10.0:
- docker-compose#v4.10.1:
build: myservice
push: myservice
```
Expand Down Expand Up @@ -464,7 +464,7 @@ Example: `[ "powershell", "-Command" ]`

Whether to skip the repository checkout phase. This is useful for steps that use a pre-built image and will fail if there is no pre-built image.

**Important**: as the code repository will not be available in the step, you need to ensure that the docker compose file(s) are present in some way (like using artifacts)
**Important**: as the code repository will not be available in the step, you need to ensure that the docker compose file(s) are present in some way (like using artifacts)

### `skip-pull` (optional, run only)

Expand Down Expand Up @@ -650,9 +650,9 @@ Select when to upload container logs.

The default is `on-error`.

### `cli-version` (optional)
### `cli-version` (optional, string or integer)

If set to `2`, plugin will use `docker compose` to execute commands; otherwise it will default to version `1` using `docker-compose` instead.
If set to `2`, plugin will use `docker compose` to execute commands; otherwise it will default to version `1`, using `docker-compose` instead.

### `buildkit` (optional, build only, boolean)

Expand Down
9 changes: 5 additions & 4 deletions plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ configuration:
compatibility:
type: boolean
cli-version:
type: string
enum:
- 1
- 2
oneOf:
- type: string
enum: [ "1", "2" ]
- type: integer
enum: [ 1, 2 ]
command:
type: array
config:
Expand Down

0 comments on commit 035d117

Please sign in to comment.