Skip to content

Commit

Permalink
Merge pull request #63 from buildkite/release-0.1.0
Browse files Browse the repository at this point in the history
Bump helm image to v0.1.0
  • Loading branch information
benmoss authored Jan 12, 2023
2 parents 7720484 + 2b6581f commit ffb25a5
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 30 deletions.
50 changes: 26 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,38 +93,40 @@ sequenceDiagram

## Sample buildkite pipeline

```yaml!
```yaml
steps:
- label: build image
plugins:
- kubernetes:
podSpec:
containers:
- image: gradle:latest
command: [gradle]
args:
- jib
- --image=ttl.sh/example:1h
- label: build image
agents:
queue: kubernetes
plugins:
- kubernetes:
podSpec:
containers:
- image: gradle:latest
command: [gradle]
args:
- jib
- --image=ttl.sh/example:1h
```
## Cloning repos via SSH
To use SSH to clone your repos, you'll need to add a secret reference via an [EnvFrom](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#envfromsource-v1-core) to your pipeline to specify where to mount your SSH private key from.
```yaml!
```yaml
steps:
- label: build image
plugins:
- kubernetes:
gitEnvFrom:
- secretRef: {name: agent-stack-k8s} # <--
podSpec:
containers:
- image: gradle:latest
command: [gradle]
args:
- jib
- --image=ttl.sh/example:1h
- label: build image
plugins:
- kubernetes:
gitEnvFrom:
- secretRef: { name: agent-stack-k8s } # <--
podSpec:
containers:
- image: gradle:latest
command: [gradle]
args:
- jib
- --image=ttl.sh/example:1h
```
## Development
Expand Down
2 changes: 1 addition & 1 deletion charts/agent-stack-k8s/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
agentToken: ""
graphqlToken: ""
image: "ghcr.io/buildkite/agent-stack-k8s:latest"
image: "ghcr.io/buildkite/agent-stack-k8s:v0.1.0"

config:
org: ""
2 changes: 1 addition & 1 deletion cmd/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func addFlags(cmd *cobra.Command) {
cmd.Flags().StringSlice("tags", []string{"queue=kubernetes"}, `A comma-separated list of tags for the agent (for example, "linux" or "mac,xcode=8")`)
cmd.Flags().String("namespace", api.DefaultNamespace, "kubernetes namespace to create resources in")
cmd.Flags().Bool("debug", false, "debug logs")
cmd.Flags().Int("max-in-flight", 1, "max jobs in flight, 0 means no max")
cmd.Flags().Int("max-in-flight", 25, "max jobs in flight, 0 means no max")
cmd.Flags().Duration("job-ttl", 10*time.Minute, "time to retain kubernetes jobs after completion")
cmd.Flags().String("agent-token-secret", "buildkite-agent-token", "name of the Buildkite agent token secret")
}
Expand Down
6 changes: 2 additions & 4 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,18 @@ agent repo=("ghcr.io/buildkite/agent-k8s") tag=("latest"):
docker buildx build --tag {{repo}}:{{tag}} --platform linux/arm64,linux/amd64 --push .
rm buildkite-agent-linux*
publish:
ko publish -P
publish *FLAGS:
ko publish -P {{FLAGS}}

deploy *FLAGS:
#!/usr/bin/env bash
set -euxo pipefail
image=$(just publish)
helm upgrade agent-stack-k8s charts/agent-stack-k8s \
--namespace buildkite \
--install \
--create-namespace \
--wait \
--set image=$image \
{{FLAGS}}


Expand Down

0 comments on commit ffb25a5

Please sign in to comment.