Custom Profiles¶
Create custom profiles to match your organization's specific CI/CD requirements.
Profile Schema¶
Profiles are defined in YAML:
name: my-profile
description: Custom profile for my organization
go:
versions:
- "1.24"
- "1.25"
os:
- ubuntu-latest
- macos-latest
checks:
required:
- test
- lint
- build
lint:
enabled: true
tool: golangci-lint
test:
coverage: true
race: true
Creating a Profile¶
1. Create Profile Directory¶
2. Create Profile File¶
Create configs/profiles/enterprise.yaml:
name: enterprise
description: Enterprise Go CI with strict requirements
go:
versions:
- "1.24"
- "1.25"
os:
- ubuntu-latest
- macos-latest
- windows-latest
checks:
required:
- test
- lint
- build
- security-scan
lint:
enabled: true
tool: golangci-lint
test:
coverage: true
race: true
3. Use the Profile¶
Profile Fields¶
name (required)¶
Unique identifier for the profile.
description¶
Human-readable description.
go.versions¶
List of allowed Go versions.
os¶
List of required operating systems in the build matrix.
checks.required¶
List of required CI checks.
lint¶
Linting configuration.
test¶
Test configuration.
Example Profiles¶
Microservices Profile¶
name: microservices
description: CI for containerized microservices
go:
versions:
- "1.25"
os:
- ubuntu-latest
checks:
required:
- test
- lint
- build
- docker-build
lint:
enabled: true
tool: golangci-lint
test:
coverage: true
race: true
Library Profile¶
name: library
description: CI for reusable Go libraries
go:
versions:
- "1.23"
- "1.24"
- "1.25"
os:
- ubuntu-latest
- macos-latest
- windows-latest
checks:
required:
- test
- lint
- build
lint:
enabled: true
tool: golangci-lint
test:
coverage: true
race: true
Minimal Profile¶
name: minimal
description: Minimal CI for internal tools
go:
versions:
- "1.25"
os:
- ubuntu-latest
checks:
required:
- test
- build
lint:
enabled: false
test:
coverage: false
race: false
Loading Custom Profiles¶
Custom profiles are loaded automatically when placed in configs/profiles/.
The profile manager searches for:
- Built-in profiles (
default,modern,legacy) - Profiles in
configs/profiles/*.yaml
Profile Inheritance (Future)¶
Coming Soon
Profile inheritance will allow extending base profiles.
# Future syntax
name: strict
extends: default
description: Stricter version of default
go:
versions:
- "1.25" # Override: only latest
Validation¶
Profiles are validated when loaded. Invalid profiles will cause an error:
Output:
Best Practices¶
- Start from built-in - Copy a built-in profile and modify
- Be specific - Name profiles by purpose (
microservices,library) - Document requirements - Use the description field
- Version control - Store profiles in your repo
- Test changes - Validate profiles before deploying
See Also¶
- Built-in Profiles - Default profiles
- Configuration - Set default profile