mirror of
https://github.com/fleetdm/fleet
synced 2026-04-21 13:37:30 +00:00
<!-- Add the related story/sub-task/bug number, like Resolves #123, or remove if NA --> **Related issue:** Resolves #42691 # Checklist for submitter If some of the following don't apply, delete the relevant line. - [ ] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files) for more information. n/a ## Testing - [ ] Added/updated automated tests - [X] QA'd all new/changed functionality manually - I ran the updated snapshot action on this branch and verified that it pushed the branch-tagged image, but not the SHA-tagged one. - I ran the cleanup script in dry-run mode and verified that it didn't expect to delete any non-sha-tagged images - I wasn't able to test the delete-image-on-branch-delete action for obvious reasons. - I haven't tested the cleanup script in non-dry-run mode... I could do on my personal dockerhub... <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes * **New Features** * Automated cleanup of Docker images when development branches are deleted to maintain registry hygiene. * New utility for managing and cleaning up legacy Docker image tags. * **Chores** * Enhanced Docker image tagging in snapshot builds with improved branch name handling. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
69 lines
1.8 KiB
YAML
69 lines
1.8 KiB
YAML
version: 2
|
|
|
|
project_name: fleet
|
|
|
|
snapshot:
|
|
version_template: "{{ .Env.FLEET_VERSION }}"
|
|
|
|
monorepo:
|
|
tag_prefix: fleet-
|
|
dir: .
|
|
|
|
before:
|
|
hooks:
|
|
- make deps
|
|
- make generate
|
|
|
|
gomod:
|
|
proxy: true
|
|
|
|
builds:
|
|
- id: fleet
|
|
dir: ./cmd/fleet/
|
|
binary: fleet
|
|
env:
|
|
- CGO_ENABLED=1
|
|
goos:
|
|
- linux
|
|
goarch:
|
|
- amd64
|
|
flags:
|
|
- -tags=full,fts5,netgo
|
|
- -trimpath
|
|
ldflags:
|
|
- -extldflags "-static"
|
|
- -X github.com/fleetdm/fleet/v4/server/version.appName={{ .ArtifactName }}
|
|
- -X github.com/fleetdm/fleet/v4/server/version.version={{ .Version }}
|
|
- -X github.com/fleetdm/fleet/v4/server/version.branch={{ .Branch }}
|
|
- -X github.com/fleetdm/fleet/v4/server/version.revision={{ .FullCommit }}
|
|
- -X github.com/fleetdm/fleet/v4/server/version.buildDate={{ time "2006-01-02" }}
|
|
- -X github.com/fleetdm/fleet/v4/server/version.buildUser={{ .Env.USER }}
|
|
|
|
- id: fleetctl
|
|
dir: ./cmd/fleetctl/
|
|
binary: fleetctl
|
|
env:
|
|
- CGO_ENABLED=0
|
|
goos:
|
|
- linux
|
|
goarch:
|
|
- amd64
|
|
flags:
|
|
- -trimpath
|
|
ldflags:
|
|
- -X github.com/fleetdm/fleet/v4/server/version.appName={{ .ArtifactName }}
|
|
- -X github.com/fleetdm/fleet/v4/server/version.version={{ .Version }}
|
|
- -X github.com/fleetdm/fleet/v4/server/version.branch={{ .Branch }}
|
|
- -X github.com/fleetdm/fleet/v4/server/version.revision={{ .FullCommit }}
|
|
- -X github.com/fleetdm/fleet/v4/server/version.buildDate={{ time "2006-01-02" }}
|
|
- -X github.com/fleetdm/fleet/v4/server/version.buildUser={{ .Env.USER }}
|
|
|
|
dockers:
|
|
- goos: linux
|
|
goarch: amd64
|
|
ids:
|
|
- fleet
|
|
- fleetctl
|
|
dockerfile: tools/fleet-docker/Dockerfile
|
|
image_templates:
|
|
- 'fleetdm/fleet:{{ envOrDefault "DOCKER_IMAGE_TAG" .Branch }}'
|