mirror of
https://github.com/holos-run/holos.git
synced 2026-03-19 08:44:58 +00:00
Compare commits
75 Commits
jeff/compi
...
jeff/435-e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a533d4e7d9 | ||
|
|
f6c06df979 | ||
|
|
524b01a6b3 | ||
|
|
c1a064fd70 | ||
|
|
69f6a8b1eb | ||
|
|
4482930e82 | ||
|
|
12389320a6 | ||
|
|
b024346f19 | ||
|
|
e58433fe08 | ||
|
|
c94d5b69c5 | ||
|
|
65430e3379 | ||
|
|
1945392227 | ||
|
|
b4361e3997 | ||
|
|
1b562118a8 | ||
|
|
578677d9a6 | ||
|
|
49398fe211 | ||
|
|
82c429b8df | ||
|
|
012de360ac | ||
|
|
c5600f2310 | ||
|
|
bc0266e5e3 | ||
|
|
18be14c2ea | ||
|
|
ab49a40246 | ||
|
|
28a0a3625e | ||
|
|
1bdb580aca | ||
|
|
c1b749c6bc | ||
|
|
12ee084759 | ||
|
|
6a2a81e3fc | ||
|
|
204ce788b6 | ||
|
|
abb014ee48 | ||
|
|
e7cd480510 | ||
|
|
bd32ad62a4 | ||
|
|
57789b48e5 | ||
|
|
8476a8748f | ||
|
|
2b89b45fc5 | ||
|
|
23e38f1e7e | ||
|
|
a0f6776358 | ||
|
|
830bb4f804 | ||
|
|
2e02bfe48a | ||
|
|
b0d5fe0072 | ||
|
|
f1ae5db910 | ||
|
|
bc8ad22492 | ||
|
|
4da0740a5e | ||
|
|
ee2d86d7df | ||
|
|
7a94cc5f87 | ||
|
|
0e9b02f337 | ||
|
|
a419b08cca | ||
|
|
04f1a21ee8 | ||
|
|
88663e223b | ||
|
|
2f77b1c09f | ||
|
|
e2ea6deda2 | ||
|
|
2131a99a30 | ||
|
|
9702efca70 | ||
|
|
658453bd76 | ||
|
|
da7430e741 | ||
|
|
57b491065a | ||
|
|
48a40c808f | ||
|
|
228dc3474b | ||
|
|
d83765e980 | ||
|
|
6ca6080a3f | ||
|
|
491efa0f4f | ||
|
|
5c1689b52b | ||
|
|
cd33f7b1dc | ||
|
|
80559b7ca6 | ||
|
|
de9b177c71 | ||
|
|
ebb8d8d44c | ||
|
|
c9994a0851 | ||
|
|
45568f2e6d | ||
|
|
46cb7f5d29 | ||
|
|
f34624e416 | ||
|
|
19690d760a | ||
|
|
35ede4293b | ||
|
|
1b499b1ab6 | ||
|
|
6a3b8da7f2 | ||
|
|
ee9969d409 | ||
|
|
b635c233fa |
18
.claude/settings.json
Normal file
18
.claude/settings.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"permissions": {
|
||||
"allow": [
|
||||
"Bash(make:*)",
|
||||
"Bash(holos:*)",
|
||||
"Bash(cue:*)",
|
||||
"Bash(grep:*)",
|
||||
"Bash(cd:*)",
|
||||
"Bash(mkdir:*)",
|
||||
"Bash(find:*)",
|
||||
"Bash(echo:*)",
|
||||
"Bash(head:*)",
|
||||
"Bash(git commit:*)",
|
||||
"Bash(git add:*)"
|
||||
],
|
||||
"deny": []
|
||||
}
|
||||
}
|
||||
@@ -308,6 +308,7 @@
|
||||
"sysfs",
|
||||
"systemconnect",
|
||||
"tablewriter",
|
||||
"taskset",
|
||||
"templatable",
|
||||
"testscript",
|
||||
"testutil",
|
||||
|
||||
4
.github/workflows/golangci-lint.yaml
vendored
4
.github/workflows/golangci-lint.yaml
vendored
@@ -25,6 +25,6 @@ jobs:
|
||||
with:
|
||||
go-version: stable
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@v6
|
||||
uses: golangci/golangci-lint-action@v7
|
||||
with:
|
||||
version: v1.64.5
|
||||
version: v2.1.6
|
||||
|
||||
2
.github/workflows/test.yaml
vendored
2
.github/workflows/test.yaml
vendored
@@ -30,6 +30,8 @@ jobs:
|
||||
|
||||
- name: Set up Helm
|
||||
uses: azure/setup-helm@v4
|
||||
with:
|
||||
version: '3.17.3'
|
||||
|
||||
- name: Set up Kubectl
|
||||
uses: azure/setup-kubectl@v4
|
||||
|
||||
5
.gitignore
vendored
5
.gitignore
vendored
@@ -16,4 +16,7 @@ node_modules/
|
||||
|
||||
# nix
|
||||
/.direnv/
|
||||
result
|
||||
result
|
||||
|
||||
# claude
|
||||
/.claude/settings.local.json
|
||||
|
||||
@@ -1,2 +1,20 @@
|
||||
run:
|
||||
timeout: 5m
|
||||
version: "2"
|
||||
linters:
|
||||
exclusions:
|
||||
generated: lax
|
||||
presets:
|
||||
- comments
|
||||
- common-false-positives
|
||||
- legacy
|
||||
- std-error-handling
|
||||
paths:
|
||||
- third_party$
|
||||
- builtin$
|
||||
- examples$
|
||||
formatters:
|
||||
exclusions:
|
||||
generated: lax
|
||||
paths:
|
||||
- third_party$
|
||||
- builtin$
|
||||
- examples$
|
||||
|
||||
116
CLAUDE.md
Normal file
116
CLAUDE.md
Normal file
@@ -0,0 +1,116 @@
|
||||
# CLAUDE.md
|
||||
|
||||
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
||||
|
||||
## Project Overview
|
||||
|
||||
Holos is a configuration management tool for Kubernetes that implements the rendered manifests pattern using CUE. It unifies Helm charts, Kustomize bases, and raw Kubernetes manifests into a single, declarative pipeline.
|
||||
|
||||
### Core Flow
|
||||
```
|
||||
Platform → Components → BuildPlan → Generators → Transformers → Validators → Manifests
|
||||
```
|
||||
|
||||
## Key Commands
|
||||
|
||||
```bash
|
||||
# Development
|
||||
make build # Build the binary
|
||||
make install # Install binary (REQUIRED before testing holos commands)
|
||||
make test # Run all tests
|
||||
make fmt # Format Go code
|
||||
make lint # Run linters
|
||||
make coverage # Generate coverage report
|
||||
|
||||
# Documentation
|
||||
make update-docs # Update generated docs
|
||||
make website # Build the documentation website
|
||||
|
||||
# Usage (run 'make install' first to test code changes)
|
||||
holos render platform # Render entire platform
|
||||
holos render component # Render single component
|
||||
holos show buildplans # Show build plans
|
||||
holos init platform # Initialize new platform
|
||||
```
|
||||
|
||||
## Architecture
|
||||
|
||||
### Directory Structure
|
||||
- `/api/` - API definitions (v1alpha5 stable, v1alpha6 in development)
|
||||
- `/cmd/` - CLI entry point
|
||||
- `/internal/cli/` - Command implementations
|
||||
- `/internal/component/` - Component handling logic
|
||||
- `/internal/platform/` - Platform handling logic
|
||||
- `/internal/generate/` - Code generation
|
||||
|
||||
### Key Files
|
||||
- `/internal/cli/render/render.go` - Core render logic
|
||||
- `/internal/component/component.go` - Component processing
|
||||
- `/api/core/v1alpha*/types.go` - API type definitions
|
||||
|
||||
### Component Types
|
||||
1. **Helm** - Wraps Helm charts
|
||||
2. **Kustomize** - Wraps Kustomize bases
|
||||
3. **Kubernetes** - Raw Kubernetes manifests
|
||||
|
||||
## CUE Patterns
|
||||
|
||||
Components are defined in CUE:
|
||||
```cue
|
||||
package holos
|
||||
|
||||
holos: Component.BuildPlan
|
||||
|
||||
Component: #Helm & {
|
||||
Name: "example"
|
||||
Chart: {
|
||||
version: "1.0.0"
|
||||
repository: {
|
||||
name: "example"
|
||||
url: "https://charts.example.com"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Testing
|
||||
|
||||
- Unit tests: `*_test.go` files colocated with source
|
||||
- Integration tests: `/cmd/holos/tests/`
|
||||
- Example platforms: `/internal/testutil/fixtures/`
|
||||
- Run single test: `go test -run TestName ./path/to/package`
|
||||
|
||||
## Development Patterns
|
||||
|
||||
1. Error handling: Prefer `errors.Format()` from `/internal/errors/` over `fmt.Errorf()`
|
||||
2. Logging: Use structured `slog`, get logger with `logger.FromContext(ctx)`
|
||||
3. CLI commands: Follow Cobra patterns in `/internal/cli/`
|
||||
4. CUE formatting: Always run `cue fmt` on CUE files
|
||||
5. Go formatting: Always run `go fmt` on go files
|
||||
6. Develop against v1alpha6 packages.
|
||||
7. Commits: Use the package name as the first word in the commit, lower case. Commit without asking permission. Always run `make lint` and `make test` before committing.
|
||||
|
||||
## Version Management
|
||||
|
||||
- Version files: `/version/embedded/{major,minor,patch}`
|
||||
- Bump version: `make bump`
|
||||
- API versions: v1alpha5 (stable), v1alpha6 (development)
|
||||
|
||||
## Key Concepts
|
||||
|
||||
- **Platform**: Top-level configuration containing all components
|
||||
- **Component**: Unit of configuration (DAG of Tasks producing deployment configs for one component)
|
||||
- **TaskSet**: DAG of Tasks (Similar to how make tasks behave)
|
||||
- **BuildPlan**: Instructions for building a component. Deprecated in v1alpha6, use TaskSet instead.
|
||||
- **Generator**: Creates manifests (Helm, Kustomize, etc.) author schema only in v1alpha6
|
||||
- **Transformer**: Modifies generated manifests, author schema only in v1alpha6
|
||||
- **Validator**: Validates final manifests, author schema only in v1alpha6
|
||||
|
||||
## Resources
|
||||
|
||||
- Tutorials: `/doc/md/tutorial/`
|
||||
- Platform templates: `/internal/generate/platforms/`
|
||||
- Test fixtures: `/internal/testutil/fixtures/`
|
||||
- Core schemas: `/api/core/` (Abstraction over low level data pipeline tasks)
|
||||
- Author schemas: `/api/author/` (User facing abstractions over core Schemas)
|
||||
- Task planning documents are located in the `/tasks/` directory
|
||||
@@ -382,6 +382,10 @@ type Command struct {
|
||||
IsStdoutOutput bool `json:"isStdoutOutput,omitempty" yaml:"isStdoutOutput,omitempty"`
|
||||
}
|
||||
|
||||
// NameLabel indicates a field name matching the name of the value. Usually the
|
||||
// name or metadata.name field of the struct value.
|
||||
type NameLabel string
|
||||
|
||||
// InternalLabel is an arbitrary unique identifier internal to holos itself.
|
||||
// The holos cli is expected to never write a InternalLabel value to rendered
|
||||
// output files, therefore use a InternalLabel when the identifier must be
|
||||
@@ -426,7 +430,7 @@ type Platform struct {
|
||||
// PlatformSpec represents the platform specification.
|
||||
type PlatformSpec struct {
|
||||
// Components represents a collection of holos components to manage.
|
||||
Components []Component `json:"components" yaml:"components"`
|
||||
Components map[NameLabel]Component `json:"components" yaml:"components" cue:"{[NAME=string]: name: NAME}"`
|
||||
}
|
||||
|
||||
// Component represents the complete context necessary to produce a [BuildPlan]
|
||||
|
||||
@@ -12,7 +12,8 @@ stderr -count=1 '^rendered platform'
|
||||
|
||||
# Holos uses CUE to build a platform specification.
|
||||
exec holos show platform
|
||||
cmp stdout want/1.platform_spec.yaml
|
||||
cp stdout platform.yaml
|
||||
exec holos compare yaml platform.yaml want/1.platform_spec.yaml
|
||||
|
||||
# Define the host and port in projects/blackbox.schema.cue
|
||||
mv projects/blackbox.schema.cue.disabled projects/blackbox.schema.cue
|
||||
@@ -25,7 +26,7 @@ mv platform/prometheus.cue.disabled platform/prometheus.cue
|
||||
exec holos render platform
|
||||
stderr -count=1 '^rendered prometheus'
|
||||
stderr -count=1 '^rendered platform'
|
||||
cmp deploy/components/prometheus/prometheus.gen.yaml want/1.prometheus.gen.yaml
|
||||
exec holos compare yaml deploy/components/prometheus/prometheus.gen.yaml want/1.prometheus.gen.yaml
|
||||
|
||||
# Add the CUE configuration to manage the blackbox Helm Chart component.
|
||||
mv projects/platform/components/blackbox/blackbox.cue.disabled projects/platform/components/blackbox/blackbox.cue
|
||||
@@ -37,7 +38,7 @@ exec holos render platform ./platform
|
||||
stderr -count=1 '^rendered prometheus'
|
||||
stderr -count=1 '^rendered blackbox'
|
||||
stderr -count=1 '^rendered platform'
|
||||
cmp deploy/components/blackbox/blackbox.gen.yaml want/1.blackbox.gen.yaml
|
||||
exec holos compare yaml deploy/components/blackbox/blackbox.gen.yaml want/1.blackbox.gen.yaml
|
||||
|
||||
# Import helm values
|
||||
exec cue import --package holos --path 'Helm: Values:' --outfile projects/platform/components/prometheus/values.cue projects/platform/components/prometheus/vendor/25.27.0/prometheus/values.yaml
|
||||
@@ -55,7 +56,7 @@ mv platform/httpbin.cue.disabled platform/httpbin.cue
|
||||
# Render the platform with httpbin
|
||||
exec holos render platform ./platform
|
||||
stderr -count=1 '^rendered httpbin'
|
||||
cmp deploy/components/httpbin/httpbin.gen.yaml want/1.httpbin.gen.yaml
|
||||
exec holos compare yaml deploy/components/httpbin/httpbin.gen.yaml want/1.httpbin.gen.yaml
|
||||
|
||||
# Verify the labels are correct
|
||||
grep 'replacement: blackbox:9115' deploy/components/prometheus/prometheus.gen.yaml
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
exec holos init platform v1alpha5 --force
|
||||
# want a buildplan shown
|
||||
exec holos show buildplans
|
||||
cmp stdout buildplan.yaml
|
||||
cp stdout buildplan-output.yaml
|
||||
exec holos compare yaml buildplan-output.yaml buildplan.yaml
|
||||
# want this error to go away
|
||||
! stderr 'cannot convert non-concrete value string'
|
||||
-- platform/example.cue --
|
||||
|
||||
@@ -4,10 +4,12 @@ env HOME=$WORK
|
||||
|
||||
exec holos init platform v1alpha5 --force
|
||||
exec holos show platform
|
||||
cmp stdout want/empty.yaml
|
||||
cp stdout empty.yaml
|
||||
exec holos compare yaml empty.yaml want/empty.yaml
|
||||
|
||||
exec holos show platform -t foo
|
||||
cmp stdout want/foo.yaml
|
||||
cp stdout foo.yaml
|
||||
exec holos compare yaml foo.yaml want/foo.yaml
|
||||
|
||||
-- platform/empty.cue --
|
||||
@if(foo)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# https://github.com/holos-run/holos/issues/330
|
||||
# take care to install helm 3.17.3 otherwise kube versions may not align
|
||||
exec holos init platform v1alpha5 --force
|
||||
# Make sure the helm chart works with plain helm
|
||||
exec helm template ./components/capabilities/vendor/0.1.0/capabilities
|
||||
@@ -6,13 +7,13 @@ stdout 'name: has-foo-v1beta1'
|
||||
stdout 'kubeVersion: v'
|
||||
exec holos render platform ./platform
|
||||
# When no capabilities are specified
|
||||
cmp deploy/components/capabilities/capabilities.gen.yaml want/when-no-capabilities-specified.yaml
|
||||
exec holos compare yaml deploy/components/capabilities/capabilities.gen.yaml want/when-no-capabilities-specified.yaml
|
||||
# With APIVersions specified
|
||||
cmp deploy/components/specified/specified.gen.yaml want/with-capabilities-specified.yaml
|
||||
exec holos compare yaml deploy/components/specified/specified.gen.yaml want/with-capabilities-specified.yaml
|
||||
# With KubeVersion specified
|
||||
cmp deploy/components/kubeversion1/kubeversion1.gen.yaml want/with-kubeversion-specified.yaml
|
||||
exec holos compare yaml deploy/components/kubeversion1/kubeversion1.gen.yaml want/with-kubeversion-specified.yaml
|
||||
# With both APIVersions and KubeVersion specified
|
||||
cmp deploy/components/kubeversion2/kubeversion2.gen.yaml want/with-both-specified.yaml
|
||||
exec holos compare yaml deploy/components/kubeversion2/kubeversion2.gen.yaml want/with-both-specified.yaml
|
||||
-- want/with-both-specified.yaml --
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
@@ -44,7 +45,7 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
kubeVersion: v1.31.0
|
||||
kubeVersion: v1.99.0
|
||||
name: has-foo-v1beta1
|
||||
spec:
|
||||
ports:
|
||||
@@ -57,7 +58,7 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
kubeVersion: v1.31.0
|
||||
kubeVersion: v1.99.0
|
||||
name: has-foo-v1
|
||||
spec:
|
||||
ports:
|
||||
@@ -103,7 +104,7 @@ Component: #Helm & {
|
||||
Chart: version: "0.1.0"
|
||||
_APIVersions: string | *"[]" @tag(apiVersions, type=string)
|
||||
APIVersions: json.Unmarshal(_APIVersions)
|
||||
KubeVersion: string | *"v1.31.0" @tag(kubeVersion, type=string)
|
||||
KubeVersion: string | *"v1.99.0" @tag(kubeVersion, type=string)
|
||||
}
|
||||
-- components/capabilities/vendor/0.1.0/capabilities/Chart.yaml --
|
||||
apiVersion: v2
|
||||
@@ -137,7 +138,7 @@ kind: Service
|
||||
metadata:
|
||||
name: has-foo-v1beta1
|
||||
annotations:
|
||||
kubeVersion: v1.31.0
|
||||
kubeVersion: v1.99.0
|
||||
spec:
|
||||
ports:
|
||||
- port: 80
|
||||
|
||||
@@ -12,7 +12,8 @@ stderr -count=1 '^rendered platform'
|
||||
|
||||
# When author.#Kubernetes is empty
|
||||
exec holos cue export --expression holos --out=yaml ./components/empty
|
||||
cmp stdout want.txt
|
||||
cp stdout empty.yaml
|
||||
exec holos compare yaml empty.yaml want.txt
|
||||
|
||||
-- components/empty/empty.cue --
|
||||
package holos
|
||||
|
||||
@@ -37,6 +37,7 @@ Package core contains schemas for a [Platform](<#Platform>) and [BuildPlan](<#Bu
|
||||
- [type Kustomization](<#Kustomization>)
|
||||
- [type Kustomize](<#Kustomize>)
|
||||
- [type Metadata](<#Metadata>)
|
||||
- [type NameLabel](<#NameLabel>)
|
||||
- [type Platform](<#Platform>)
|
||||
- [type PlatformSpec](<#PlatformSpec>)
|
||||
- [type Repository](<#Repository>)
|
||||
@@ -478,6 +479,15 @@ type Metadata struct {
|
||||
}
|
||||
```
|
||||
|
||||
<a name="NameLabel"></a>
|
||||
## type NameLabel {#NameLabel}
|
||||
|
||||
NameLabel indicates a field name matching the name of the value. Usually the name or metadata.name field of the struct value.
|
||||
|
||||
```go
|
||||
type NameLabel string
|
||||
```
|
||||
|
||||
<a name="Platform"></a>
|
||||
## type Platform {#Platform}
|
||||
|
||||
@@ -511,7 +521,7 @@ PlatformSpec represents the platform specification.
|
||||
```go
|
||||
type PlatformSpec struct {
|
||||
// Components represents a collection of holos components to manage.
|
||||
Components []Component `json:"components" yaml:"components"`
|
||||
Components map[NameLabel]Component `json:"components" yaml:"components" cue:"{[NAME=string]: name: NAME}"`
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -84,10 +84,14 @@ Install these tools to use Holos's full capabilities:
|
||||
- [Kubectl] for [kustomize] operations
|
||||
|
||||
:::note
|
||||
Holos is tested with Helm `v3.16.2`. If you see `Error: chart requires
|
||||
Holos is tested with Helm `v3.17.3`. If you see `Error: chart requires
|
||||
kubeVersion` errors, try upgrading Helm.
|
||||
:::
|
||||
|
||||
## Known Issues
|
||||
|
||||
Helm `v3.18.0` has a [known issue](https://github.com/NixOS/nixpkgs/pull/322994) that causes it to produce incorrect output. This may affect Holos users. For more details, see [Holos issue #433](https://github.com/holos-run/holos/issues/433).
|
||||
|
||||
## Next Steps
|
||||
|
||||
With your platform structure initialized, proceed to [Hello Holos] to learn Helm
|
||||
|
||||
4
go.mod
4
go.mod
@@ -5,7 +5,8 @@ go 1.23.0
|
||||
toolchain go1.23.6
|
||||
|
||||
require (
|
||||
cuelang.org/go v0.13.0-alpha.4
|
||||
cuelang.org/go v0.13.0-rc.1
|
||||
github.com/google/go-cmp v0.7.0
|
||||
github.com/mattn/go-isatty v0.0.20
|
||||
github.com/mattn/go-runewidth v0.0.15
|
||||
github.com/olekukonko/tablewriter v0.0.5
|
||||
@@ -81,7 +82,6 @@ require (
|
||||
github.com/golang/protobuf v1.5.4 // indirect
|
||||
github.com/google/btree v1.0.1 // indirect
|
||||
github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 // indirect
|
||||
github.com/google/go-cmp v0.7.0 // indirect
|
||||
github.com/google/gofuzz v1.2.0 // indirect
|
||||
github.com/google/pprof v0.0.0-20240622144329-c177fd99eaa9 // indirect
|
||||
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
|
||||
|
||||
4
go.sum
4
go.sum
@@ -1,7 +1,7 @@
|
||||
cuelabs.dev/go/oci/ociregistry v0.0.0-20250304105642-27e071d2c9b1 h1:Dmbd5Q+ENb2C6carvwrMsrOUwJ9X9qfL5JdW32gYAHo=
|
||||
cuelabs.dev/go/oci/ociregistry v0.0.0-20250304105642-27e071d2c9b1/go.mod h1:dqrnoZx62xbOZr11giMPrWbhlaV8euHwciXZEy3baT8=
|
||||
cuelang.org/go v0.13.0-alpha.4 h1:tmMJdmPCh6Y1vCPbvlsrG/g4Un3AnLajTScNDhLGMwU=
|
||||
cuelang.org/go v0.13.0-alpha.4/go.mod h1:kA/8D9/d32IBp2lISWo90BEJhLyS9tqBcvqw2QAEhEg=
|
||||
cuelang.org/go v0.13.0-rc.1 h1:0y3LZKA5LpJehVMHTJhjR7jQxBdYZ5fg05htMaKHaJg=
|
||||
cuelang.org/go v0.13.0-rc.1/go.mod h1:kA/8D9/d32IBp2lISWo90BEJhLyS9tqBcvqw2QAEhEg=
|
||||
dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s=
|
||||
dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=
|
||||
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
|
||||
|
||||
70
internal/cli/compare.go
Normal file
70
internal/cli/compare.go
Normal file
@@ -0,0 +1,70 @@
|
||||
package cli
|
||||
|
||||
import (
|
||||
"github.com/holos-run/holos/internal/compare"
|
||||
"github.com/holos-run/holos/internal/errors"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
// New for the compare command.
|
||||
func NewCompareCmd() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "compare",
|
||||
Short: "Compare Holos resources",
|
||||
Long: "Compare Holos resources to verify semantic equivalence",
|
||||
Args: func(cmd *cobra.Command, args []string) error {
|
||||
if len(args) > 0 {
|
||||
return errors.Format("unknown command %q for %q", args[0], cmd.CommandPath())
|
||||
}
|
||||
return nil
|
||||
},
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
return cmd.Help()
|
||||
},
|
||||
}
|
||||
|
||||
cmd.AddCommand(NewCompareBuildPlansCmd())
|
||||
cmd.AddCommand(NewCompareYAMLCmd())
|
||||
return cmd
|
||||
}
|
||||
|
||||
// New for the compare buildplans subcommand.
|
||||
func NewCompareBuildPlansCmd() *cobra.Command {
|
||||
var backwardsCompatible bool
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "buildplans [file1] [file2]",
|
||||
Short: "Compare two BuildPlan files",
|
||||
Long: "Compare two BuildPlan files to verify they are semantically equivalent",
|
||||
Args: cobra.ExactArgs(2),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
c := compare.New()
|
||||
return c.BuildPlans(args[0], args[1], backwardsCompatible)
|
||||
},
|
||||
}
|
||||
|
||||
cmd.Flags().BoolVar(&backwardsCompatible, "backwards-compatible", false, "Enable backwards compatibility mode where file2 may have fields missing from file1")
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
// New for the compare yaml subcommand.
|
||||
func NewCompareYAMLCmd() *cobra.Command {
|
||||
var backwardsCompatible bool
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "yaml [file1] [file2]",
|
||||
Short: "Compare two yaml object streams",
|
||||
Long: "Compare two yaml object streams to verify they are structurally equivalent",
|
||||
Args: cobra.ExactArgs(2),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
c := compare.New()
|
||||
// TODO(jeff): Add a YAML() function.
|
||||
return c.BuildPlans(args[0], args[1], backwardsCompatible)
|
||||
},
|
||||
}
|
||||
|
||||
cmd.Flags().BoolVar(&backwardsCompatible, "backwards-compatible", false, "Enable backwards compatibility mode where file2 may have fields missing from file1")
|
||||
|
||||
return cmd
|
||||
}
|
||||
@@ -61,6 +61,8 @@ func (r *renderPlatform) Run(ctx context.Context, p *platform.Platform) error {
|
||||
args := make([]string, 0, 100)
|
||||
args = append(args, prefixArgs...)
|
||||
args = append(args, "render", "component")
|
||||
// Add the write-to flag
|
||||
args = append(args, "--write-to", r.pcfg.WriteTo)
|
||||
// holos render platform --inject tags
|
||||
for _, tag := range r.pcfg.TagMap.Tags() {
|
||||
args = append(args, "--inject", tag)
|
||||
|
||||
@@ -76,6 +76,9 @@ func New(cfg *holos.Config) *cobra.Command {
|
||||
// Show
|
||||
rootCmd.AddCommand(NewShowCmd(platform.NewConfig()))
|
||||
|
||||
// Compare
|
||||
rootCmd.AddCommand(NewCompareCmd())
|
||||
|
||||
// Compile
|
||||
rootCmd.AddCommand(NewCompileCmd())
|
||||
|
||||
@@ -110,9 +113,9 @@ func HandleError(ctx context.Context, err error, hc *holos.Config) (exitCode int
|
||||
if errors.As(err, &errAt) {
|
||||
loc := errAt.Source.Loc()
|
||||
err2 := errAt.Unwrap()
|
||||
log.ErrorContext(ctx, fmt.Sprintf("could not run: %s at %s", err2, loc), "err", err2, "loc", loc)
|
||||
log.ErrorContext(ctx, fmt.Sprintf("error at %s: %s", loc, err2), "err", err2, "loc", loc)
|
||||
} else {
|
||||
log.ErrorContext(ctx, fmt.Sprintf("could not run: %s", err), "err", err)
|
||||
log.ErrorContext(ctx, err.Error(), "err", err)
|
||||
}
|
||||
|
||||
// cue errors are bundled up as a list and refer to multiple files / lines.
|
||||
|
||||
@@ -66,7 +66,7 @@ func TestShowAlpha6(t *testing.T) {
|
||||
|
||||
t.Run("BuildPlans", func(t *testing.T) {
|
||||
t.Run("EmptyPlatform", func(t *testing.T) {
|
||||
platformDir := filepath.Join(tempDir, "platform")
|
||||
platformDir := filepath.Join(tempDir, "fixtures", "v1alpha6", "empty-platform")
|
||||
h := newHarness()
|
||||
err := h.Run(ctx, "buildplans", platformDir)
|
||||
require.NoError(t, err)
|
||||
@@ -81,7 +81,8 @@ func TestShowAlpha6(t *testing.T) {
|
||||
err = yaml.Unmarshal(wantBytes, &want)
|
||||
require.NoError(t, err)
|
||||
want.BuildContext.RootDir = tempDir
|
||||
want.BuildContext.HolosExecutable = "holos"
|
||||
want.BuildContext.HolosExecutable, err = util.Executable()
|
||||
require.NoError(t, err)
|
||||
want.BuildContext.LeafDir = "fixtures/v1alpha6/components/slice"
|
||||
|
||||
t.Run("FormatYAML", func(t *testing.T) {
|
||||
|
||||
401
internal/compare/compare.go
Normal file
401
internal/compare/compare.go
Normal file
@@ -0,0 +1,401 @@
|
||||
package compare
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"io"
|
||||
"os"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/google/go-cmp/cmp/cmpopts"
|
||||
"github.com/holos-run/holos/internal/errors"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
// Comparer handles comparison operations between BuildPlans
|
||||
type Comparer struct {
|
||||
}
|
||||
|
||||
// New creates a new Comparer instance
|
||||
func New() *Comparer {
|
||||
return &Comparer{}
|
||||
}
|
||||
|
||||
// BuildPlans compares two BuildPlan Files for semantic equivalence.
|
||||
//
|
||||
// The holos show buildplans command writes a BuildPlan File to standard output.
|
||||
// A BuildPlan File is a yaml encoded stream of BuildPlan objects.
|
||||
//
|
||||
// BuildPlan File one is equivalent to two when:
|
||||
// 1. one and two have an equal number of BuildPlan objects.
|
||||
// 2. each object in one is equivalent to exactly one unique object in two.
|
||||
//
|
||||
// Two BuildPlans, before and after, are equivalent when:
|
||||
//
|
||||
// 1. All field values in before are equivalent to the same field in after
|
||||
// 2. Both 1 and 2 apply to nested objects, recursively.
|
||||
// 3. Field f is equivalent when before.f exactly equals after.f, except for:
|
||||
// 3.1. Objects in the spec.artifacts list may appear in any arbitrary order.
|
||||
// 3.2. The ordering of keys does not matter.
|
||||
// 4. Backwards compatibility behavior (controlled by isBackwardsCompatible):
|
||||
// - When false: after and before must have exactly the same fields
|
||||
// - When true: after may have additional fields that don't exist in before
|
||||
// (e.g., new features added in a newer version)
|
||||
// Example:
|
||||
// before has {name: "x", version: "1.0"}
|
||||
// after has {name: "x", version: "1.0", newFeature: "enabled"}
|
||||
// This comparison passes when isBackwardsCompatible=true
|
||||
// 5. Fields in before must always be present in after (regardless of backwards
|
||||
// compatibility mode).
|
||||
// 6. List type fields with a null value are equivalent to:
|
||||
// 6.1. null values
|
||||
// 6.2. empty values ([])
|
||||
// 6.2. a missing field
|
||||
//
|
||||
// A BuildPlan File is valid when:
|
||||
// 1. Two or more identical objects exist in the same file. They must be
|
||||
// treated as unique objects when comparing BuildPlan Files
|
||||
// 2. Two objects may have the same value for the metadata.name field.
|
||||
// 3. The kind field of all objects in the file stream is "BuildPlan"
|
||||
func (c *Comparer) BuildPlans(one, two string, isBackwardsCompatible bool) error {
|
||||
// Read both files
|
||||
file1, err := os.Open(one)
|
||||
if err != nil {
|
||||
return errors.Format("opening first file: %w", err)
|
||||
}
|
||||
defer file1.Close()
|
||||
|
||||
file2, err := os.Open(two)
|
||||
if err != nil {
|
||||
return errors.Format("opening second file: %w", err)
|
||||
}
|
||||
defer file2.Close()
|
||||
|
||||
// Read all content from both files
|
||||
content1, err := io.ReadAll(file1)
|
||||
if err != nil {
|
||||
return errors.Format("reading first file: %w", err)
|
||||
}
|
||||
|
||||
content2, err := io.ReadAll(file2)
|
||||
if err != nil {
|
||||
return errors.Format("reading second file: %w", err)
|
||||
}
|
||||
|
||||
// Handle empty files case
|
||||
if len(content1) == 0 && len(content2) == 0 {
|
||||
return errors.NotImplemented()
|
||||
}
|
||||
|
||||
// Parse YAML streams (multiple documents)
|
||||
docs1, err := parseYAMLStream(content1)
|
||||
if err != nil {
|
||||
return errors.Format("parsing first file: %w", err)
|
||||
}
|
||||
|
||||
docs2, err := parseYAMLStream(content2)
|
||||
if err != nil {
|
||||
return errors.Format("parsing second file: %w", err)
|
||||
}
|
||||
|
||||
// Compare the document lists
|
||||
return c.compareDocumentLists(docs1, docs2, isBackwardsCompatible)
|
||||
}
|
||||
|
||||
// normalizeStructure processes a structure to handle null, empty, and missing fields
|
||||
// according to the BuildPlan spec requirement 6
|
||||
func (c *Comparer) normalizeStructure(v interface{}) interface{} {
|
||||
switch val := v.(type) {
|
||||
case map[string]interface{}:
|
||||
normalized := make(map[string]interface{})
|
||||
for k, v := range val {
|
||||
normalizedValue := c.normalizeStructure(v)
|
||||
// Only add fields that are not nil or empty slices
|
||||
if !c.isNullOrEmpty(normalizedValue) {
|
||||
normalized[k] = normalizedValue
|
||||
}
|
||||
}
|
||||
return normalized
|
||||
case []interface{}:
|
||||
// Handle empty slices as nil
|
||||
if len(val) == 0 {
|
||||
return nil
|
||||
}
|
||||
normalized := make([]interface{}, len(val))
|
||||
for i, v := range val {
|
||||
normalized[i] = c.normalizeStructure(v)
|
||||
}
|
||||
return normalized
|
||||
default:
|
||||
return v
|
||||
}
|
||||
}
|
||||
|
||||
// isNullOrEmpty checks if a value is nil or an empty slice
|
||||
func (c *Comparer) isNullOrEmpty(v interface{}) bool {
|
||||
if v == nil {
|
||||
return true
|
||||
}
|
||||
if slice, ok := v.([]interface{}); ok {
|
||||
return len(slice) == 0
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// filterToCommonFields filters v1 to only include fields that exist in v2
|
||||
// This is used for backwards compatibility to allow the "after" file to have extra fields
|
||||
// that don't exist in the "before" file
|
||||
func (c *Comparer) filterToCommonFields(v1, v2 interface{}) interface{} {
|
||||
switch m1 := v1.(type) {
|
||||
case map[string]interface{}:
|
||||
m2, ok := v2.(map[string]interface{})
|
||||
if !ok {
|
||||
return v1
|
||||
}
|
||||
filtered := make(map[string]interface{})
|
||||
for k, val1 := range m1 {
|
||||
if val2, exists := m2[k]; exists {
|
||||
filtered[k] = c.filterToCommonFields(val1, val2)
|
||||
}
|
||||
}
|
||||
return filtered
|
||||
|
||||
case []interface{}:
|
||||
slice2, ok := v2.([]interface{})
|
||||
if !ok {
|
||||
return v1
|
||||
}
|
||||
var filtered []interface{}
|
||||
for i, elem1 := range m1 {
|
||||
if i < len(slice2) {
|
||||
filtered = append(filtered, c.filterToCommonFields(elem1, slice2[i]))
|
||||
}
|
||||
}
|
||||
return filtered
|
||||
|
||||
default:
|
||||
return v1
|
||||
}
|
||||
}
|
||||
|
||||
// compareStructures compares two BuildPlan structures for semantic equivalence
|
||||
func (c *Comparer) compareStructures(bp1, bp2 map[string]interface{}, isBackwardsCompatible bool) error {
|
||||
// Normalize the structures to handle null, empty, and missing fields
|
||||
norm1 := c.normalizeStructure(bp1).(map[string]interface{})
|
||||
norm2 := c.normalizeStructure(bp2).(map[string]interface{})
|
||||
|
||||
// If backwards compatible, remove fields from norm2 that don't exist in norm1
|
||||
// This allows "after" to have extra fields that "before" doesn't have
|
||||
if isBackwardsCompatible {
|
||||
filtered := c.filterToCommonFields(norm2, norm1)
|
||||
if m, ok := filtered.(map[string]interface{}); ok {
|
||||
norm2 = m
|
||||
}
|
||||
}
|
||||
|
||||
// Create comparison options for go-cmp
|
||||
opts := []cmp.Option{
|
||||
cmpopts.EquateEmpty(),
|
||||
cmp.Transformer("sortSlices", func(s []interface{}) []interface{} {
|
||||
return c.sortSlice(s)
|
||||
}),
|
||||
}
|
||||
|
||||
// Deep order-independent comparison
|
||||
if cmp.Equal(norm1, norm2, opts...) {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Get the diff for the error message
|
||||
diff := cmp.Diff(norm1, norm2, opts...)
|
||||
|
||||
// Extract specific field differences from the diff
|
||||
fieldDiffs := c.extractFieldDifferences(diff)
|
||||
|
||||
// Return the extracted differences or the full diff
|
||||
if fieldDiffs != "" {
|
||||
return errors.New(fieldDiffs)
|
||||
}
|
||||
return errors.New(diff)
|
||||
}
|
||||
|
||||
// sortSlice sorts a slice based on comparable string representation
|
||||
func (c *Comparer) sortSlice(slice []interface{}) []interface{} {
|
||||
sorted := make([]interface{}, len(slice))
|
||||
copy(sorted, slice)
|
||||
|
||||
sort.Slice(sorted, func(i, j int) bool {
|
||||
iStr := c.toComparableString(sorted[i])
|
||||
jStr := c.toComparableString(sorted[j])
|
||||
return iStr < jStr
|
||||
})
|
||||
|
||||
return sorted
|
||||
}
|
||||
|
||||
// toComparableString converts a value to a comparable string
|
||||
func (c *Comparer) toComparableString(v interface{}) string {
|
||||
switch val := v.(type) {
|
||||
case map[string]interface{}:
|
||||
// Try to get identifying fields
|
||||
if artifact, ok := val["artifact"].(string); ok {
|
||||
return artifact
|
||||
}
|
||||
if name, ok := val["name"].(string); ok {
|
||||
return name
|
||||
}
|
||||
if metadata, ok := val["metadata"].(map[string]interface{}); ok {
|
||||
if name, ok := metadata["name"].(string); ok {
|
||||
return name
|
||||
}
|
||||
}
|
||||
// Fallback to YAML representation
|
||||
yamlBytes, _ := yaml.Marshal(val)
|
||||
return string(yamlBytes)
|
||||
|
||||
default:
|
||||
// Convert to YAML for comparison
|
||||
yamlBytes, _ := yaml.Marshal(v)
|
||||
return string(yamlBytes)
|
||||
}
|
||||
}
|
||||
|
||||
// parseYAMLStream parses a byte array containing one or more YAML documents
|
||||
func parseYAMLStream(content []byte) ([]map[string]interface{}, error) {
|
||||
var documents []map[string]interface{}
|
||||
decoder := yaml.NewDecoder(bytes.NewReader(content))
|
||||
|
||||
for {
|
||||
var doc map[string]interface{}
|
||||
err := decoder.Decode(&doc)
|
||||
if err == io.EOF {
|
||||
break
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if doc != nil {
|
||||
documents = append(documents, doc)
|
||||
}
|
||||
}
|
||||
|
||||
return documents, nil
|
||||
}
|
||||
|
||||
// compareDocumentLists compares two lists of YAML documents
|
||||
func (c *Comparer) compareDocumentLists(docs1, docs2 []map[string]interface{}, isBackwardsCompatible bool) error {
|
||||
if len(docs1) != len(docs2) {
|
||||
return errors.New("different number of documents")
|
||||
}
|
||||
|
||||
// Create a bipartite matching between documents
|
||||
used := make([]bool, len(docs2))
|
||||
|
||||
// First pass: try to find exact matches
|
||||
for _, doc1 := range docs1 {
|
||||
for j, doc2 := range docs2 {
|
||||
if used[j] {
|
||||
continue
|
||||
}
|
||||
|
||||
// Check if documents are exactly equal
|
||||
if c.documentsExactlyEqual(doc1, doc2) {
|
||||
used[j] = true
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Second pass: handle unmatched documents
|
||||
usedIdx := 0
|
||||
for i, doc1 := range docs1 {
|
||||
// Find if this document was matched in first pass
|
||||
matchFound := false
|
||||
for j, doc2 := range docs2 {
|
||||
if used[j] && c.documentsExactlyEqual(doc1, doc2) {
|
||||
matchFound = true
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if !matchFound {
|
||||
// Find the next unused document to compare against
|
||||
for usedIdx < len(docs2) && used[usedIdx] {
|
||||
usedIdx++
|
||||
}
|
||||
|
||||
if usedIdx < len(docs2) {
|
||||
// Compare structures
|
||||
if err := c.compareStructures(doc1, docs2[usedIdx], isBackwardsCompatible); err != nil {
|
||||
return errors.Format("document %d not equivalent: \n%w", i, err)
|
||||
}
|
||||
used[usedIdx] = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// documentsExactlyEqual checks if two documents are exactly equal
|
||||
func (c *Comparer) documentsExactlyEqual(doc1, doc2 map[string]interface{}) bool {
|
||||
// Create comparison options for go-cmp
|
||||
opts := []cmp.Option{
|
||||
cmpopts.EquateEmpty(),
|
||||
cmp.Transformer("sortSlices", func(s []interface{}) []interface{} {
|
||||
return c.sortSlice(s)
|
||||
}),
|
||||
}
|
||||
|
||||
return cmp.Equal(doc1, doc2, opts...)
|
||||
}
|
||||
|
||||
// extractFieldDifferences extracts specific field differences from a go-cmp diff
|
||||
func (c *Comparer) extractFieldDifferences(diff string) string {
|
||||
var differences []string
|
||||
lines := strings.Split(diff, "\n")
|
||||
|
||||
for _, line := range lines {
|
||||
// Look for lines that indicate field differences
|
||||
trimmed := strings.TrimSpace(line)
|
||||
|
||||
// Handle lines with - or + prefixes
|
||||
if strings.HasPrefix(trimmed, "-") || strings.HasPrefix(trimmed, "+") {
|
||||
// Skip formatting markers
|
||||
if strings.HasPrefix(trimmed, "---") || strings.HasPrefix(trimmed, "+++") {
|
||||
continue
|
||||
}
|
||||
|
||||
// Check if this is a field difference (contains a colon)
|
||||
if strings.Contains(trimmed, ":") {
|
||||
// Extract the field name and value
|
||||
parts := strings.SplitN(trimmed[1:], ":", 2)
|
||||
if len(parts) == 2 {
|
||||
fieldName := strings.TrimSpace(parts[0])
|
||||
value := strings.TrimSpace(parts[1])
|
||||
|
||||
// Clean up the field name (remove quotes if present)
|
||||
fieldName = strings.Trim(fieldName, "\"")
|
||||
value = strings.TrimSuffix(value, ",")
|
||||
|
||||
// Clean up value formatting
|
||||
if strings.HasPrefix(value, "string(") {
|
||||
value = strings.TrimPrefix(value, "string(")
|
||||
value = strings.TrimSuffix(value, ")")
|
||||
} else if strings.HasPrefix(value, "int(") {
|
||||
value = strings.TrimPrefix(value, "int(")
|
||||
value = strings.TrimSuffix(value, ")")
|
||||
}
|
||||
value = strings.Trim(value, "\"")
|
||||
|
||||
// Rebuild the difference line
|
||||
prefix := trimmed[:1]
|
||||
differences = append(differences, prefix+" "+fieldName+": "+value)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return strings.Join(differences, "\n")
|
||||
}
|
||||
88
internal/compare/compare_test.go
Normal file
88
internal/compare/compare_test.go
Normal file
@@ -0,0 +1,88 @@
|
||||
package compare
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
type testCase struct {
|
||||
ExitCode int `json:"exitCode"`
|
||||
Name string `json:"name,omitempty"`
|
||||
Msg string `json:"msg,omitempty"`
|
||||
File1 string `json:"file1"`
|
||||
File2 string `json:"file2"`
|
||||
ExpectedError string `json:"expectedError,omitempty"` // Deprecated: use ExpectedErrors
|
||||
ExpectedErrors []string `json:"expectedErrors,omitempty"`
|
||||
IsBackwardsCompatible *bool `json:"isBackwardsCompatible,omitempty"`
|
||||
}
|
||||
|
||||
func TestBuildPlans(t *testing.T) {
|
||||
fixturesDir := "testdata"
|
||||
entries, err := os.ReadDir(fixturesDir)
|
||||
if err != nil {
|
||||
t.Fatalf("could not read fixtures directory: %v", err)
|
||||
}
|
||||
|
||||
for _, entry := range entries {
|
||||
if !entry.IsDir() {
|
||||
continue
|
||||
}
|
||||
|
||||
dirName := entry.Name()
|
||||
t.Run(dirName, func(t *testing.T) {
|
||||
testDir := filepath.Join(fixturesDir, dirName)
|
||||
|
||||
// Read the testcase.json file
|
||||
testcaseData, err := os.ReadFile(filepath.Join(testDir, "testcase.json"))
|
||||
if err != nil {
|
||||
t.Fatalf("could not read testcase.json: %v", err)
|
||||
}
|
||||
|
||||
var tc testCase
|
||||
if err := json.Unmarshal(testcaseData, &tc); err != nil {
|
||||
t.Fatalf("could not parse testcase.json: %v", err)
|
||||
}
|
||||
|
||||
// Use the test name if provided, otherwise use directory name
|
||||
testName := dirName
|
||||
if tc.Name != "" {
|
||||
testName = tc.Name
|
||||
}
|
||||
|
||||
// Run the test with the appropriate name
|
||||
t.Run(testName, func(t *testing.T) {
|
||||
// Build the full file paths
|
||||
file1Path := filepath.Join(testDir, tc.File1)
|
||||
file2Path := filepath.Join(testDir, tc.File2)
|
||||
|
||||
// Create a new comparer and run the comparison
|
||||
c := New()
|
||||
// Use isBackwardsCompatible from test case if provided, default to false
|
||||
isBackwardsCompatible := false
|
||||
if tc.IsBackwardsCompatible != nil {
|
||||
isBackwardsCompatible = *tc.IsBackwardsCompatible
|
||||
}
|
||||
err := c.BuildPlans(file1Path, file2Path, isBackwardsCompatible)
|
||||
|
||||
// Check the result based on expected exit code
|
||||
if tc.ExitCode == 0 {
|
||||
assert.NoError(t, err, tc.Msg)
|
||||
} else {
|
||||
assert.Error(t, err, tc.Msg)
|
||||
// Support both old expectedError and new expectedErrors
|
||||
if tc.ExpectedError != "" {
|
||||
assert.ErrorContains(t, err, tc.ExpectedError, tc.Msg)
|
||||
}
|
||||
// Check each expected error substring
|
||||
for _, expectedErr := range tc.ExpectedErrors {
|
||||
assert.ErrorContains(t, err, expectedErr, tc.Msg)
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
810
internal/compare/testdata/annotations/after.yaml
vendored
Normal file
810
internal/compare/testdata/annotations/after.yaml
vendored
Normal file
@@ -0,0 +1,810 @@
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: kargo-stages
|
||||
labels:
|
||||
holos.run/component.name: kargo-stages
|
||||
holos.run/project.name: httpbin
|
||||
holos.run/stack.name: httpbin
|
||||
annotations:
|
||||
app.holos.run/description: kargo-stages for project httpbin
|
||||
example.com/description: bar
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: resources.gen.yaml
|
||||
resources:
|
||||
Stage:
|
||||
dev:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: dev
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/dev-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/dev-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/dev-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-dev-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
direct: true
|
||||
prod-us-central:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-central
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-central-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-central-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-central-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-central-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-east:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-east
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-east-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-east-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-east-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-east-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-west:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-west
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-west-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-west-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-west-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-west-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
test:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: test
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/test-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/test-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/test-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-test-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- dev
|
||||
uat:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: uat
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/uat-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/uat-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/uat-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-uat-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- test
|
||||
Warehouse:
|
||||
httpbin:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Warehouse
|
||||
metadata:
|
||||
name: httpbin
|
||||
namespace: httpbin
|
||||
spec:
|
||||
interval: 5m0s
|
||||
subscriptions:
|
||||
- image:
|
||||
discoveryLimit: 5
|
||||
repoURL: quay.io/holos/mccutchen/go-httpbin
|
||||
semverConstraint: ^2.0.0
|
||||
strictSemvers: true
|
||||
transformers:
|
||||
- kind: Kustomize
|
||||
inputs:
|
||||
- resources.gen.yaml
|
||||
output: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
kustomize:
|
||||
kustomization:
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
labels:
|
||||
- includeSelectors: false
|
||||
pairs:
|
||||
argocd.argoproj.io/instance: httpbin-kargo-stages
|
||||
resources:
|
||||
- resources.gen.yaml
|
||||
- artifact: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
resources:
|
||||
Application:
|
||||
httpbin-kargo-stages:
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
labels: {}
|
||||
name: httpbin-kargo-stages
|
||||
namespace: argocd
|
||||
spec:
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
project: httpbin
|
||||
source:
|
||||
path: deploy/projects/httpbin/components/kargo-stages
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
targetRevision: main
|
||||
---
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: kargo-stages
|
||||
labels:
|
||||
holos.run/component.name: kargo-stages
|
||||
holos.run/project.name: httpbin
|
||||
holos.run/stack.name: httpbin
|
||||
annotations:
|
||||
example.com/description: bar
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: resources.gen.yaml
|
||||
resources:
|
||||
Stage:
|
||||
dev:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: dev
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/dev-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/dev-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/dev-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-dev-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
direct: true
|
||||
prod-us-central:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-central
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-central-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-central-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-central-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-central-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-east:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-east
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-east-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-east-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-east-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-east-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-west:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-west
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-west-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-west-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-west-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-west-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
test:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: test
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/test-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/test-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/test-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-test-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- dev
|
||||
uat:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: uat
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/uat-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/uat-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/uat-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-uat-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- test
|
||||
Warehouse:
|
||||
httpbin:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Warehouse
|
||||
metadata:
|
||||
name: httpbin
|
||||
namespace: httpbin
|
||||
spec:
|
||||
interval: 5m0s
|
||||
subscriptions:
|
||||
- image:
|
||||
discoveryLimit: 5
|
||||
repoURL: quay.io/holos/mccutchen/go-httpbin
|
||||
semverConstraint: ^2.0.0
|
||||
strictSemvers: true
|
||||
transformers:
|
||||
- kind: Kustomize
|
||||
inputs:
|
||||
- resources.gen.yaml
|
||||
output: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
kustomize:
|
||||
kustomization:
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
labels:
|
||||
- includeSelectors: false
|
||||
pairs:
|
||||
argocd.argoproj.io/instance: httpbin-kargo-stages
|
||||
resources:
|
||||
- resources.gen.yaml
|
||||
- artifact: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
resources:
|
||||
Application:
|
||||
httpbin-kargo-stages:
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
labels: {}
|
||||
name: httpbin-kargo-stages
|
||||
namespace: argocd
|
||||
spec:
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
project: httpbin
|
||||
source:
|
||||
path: deploy/projects/httpbin/components/kargo-stages
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
targetRevision: main
|
||||
810
internal/compare/testdata/annotations/before.yaml
vendored
Normal file
810
internal/compare/testdata/annotations/before.yaml
vendored
Normal file
@@ -0,0 +1,810 @@
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: kargo-stages
|
||||
labels:
|
||||
holos.run/component.name: kargo-stages
|
||||
holos.run/project.name: httpbin
|
||||
holos.run/stack.name: httpbin
|
||||
annotations:
|
||||
app.holos.run/description: kargo-stages for project httpbin
|
||||
example.com/description: foo
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: resources.gen.yaml
|
||||
resources:
|
||||
Stage:
|
||||
dev:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: dev
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/dev-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/dev-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/dev-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-dev-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
direct: true
|
||||
prod-us-central:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-central
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-central-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-central-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-central-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-central-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-east:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-east
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-east-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-east-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-east-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-east-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-west:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-west
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-west-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-west-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-west-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-west-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
test:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: test
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/test-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/test-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/test-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-test-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- dev
|
||||
uat:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: uat
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/uat-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/uat-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/uat-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-uat-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- test
|
||||
Warehouse:
|
||||
httpbin:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Warehouse
|
||||
metadata:
|
||||
name: httpbin
|
||||
namespace: httpbin
|
||||
spec:
|
||||
interval: 5m0s
|
||||
subscriptions:
|
||||
- image:
|
||||
discoveryLimit: 5
|
||||
repoURL: quay.io/holos/mccutchen/go-httpbin
|
||||
semverConstraint: ^2.0.0
|
||||
strictSemvers: true
|
||||
transformers:
|
||||
- kind: Kustomize
|
||||
inputs:
|
||||
- resources.gen.yaml
|
||||
output: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
kustomize:
|
||||
kustomization:
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
labels:
|
||||
- includeSelectors: false
|
||||
pairs:
|
||||
argocd.argoproj.io/instance: httpbin-kargo-stages
|
||||
resources:
|
||||
- resources.gen.yaml
|
||||
- artifact: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
resources:
|
||||
Application:
|
||||
httpbin-kargo-stages:
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
labels: {}
|
||||
name: httpbin-kargo-stages
|
||||
namespace: argocd
|
||||
spec:
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
project: httpbin
|
||||
source:
|
||||
path: deploy/projects/httpbin/components/kargo-stages
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
targetRevision: main
|
||||
---
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: kargo-stages
|
||||
labels:
|
||||
holos.run/component.name: kargo-stages
|
||||
holos.run/project.name: httpbin
|
||||
holos.run/stack.name: httpbin
|
||||
annotations:
|
||||
example.com/description: bar
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: resources.gen.yaml
|
||||
resources:
|
||||
Stage:
|
||||
dev:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: dev
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/dev-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/dev-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/dev-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-dev-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
direct: true
|
||||
prod-us-central:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-central
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-central-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-central-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-central-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-central-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-east:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-east
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-east-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-east-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-east-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-east-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-west:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-west
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-west-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-west-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-west-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-west-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
test:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: test
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/test-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/test-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/test-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-test-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- dev
|
||||
uat:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: uat
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/uat-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/uat-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/uat-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-uat-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- test
|
||||
Warehouse:
|
||||
httpbin:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Warehouse
|
||||
metadata:
|
||||
name: httpbin
|
||||
namespace: httpbin
|
||||
spec:
|
||||
interval: 5m0s
|
||||
subscriptions:
|
||||
- image:
|
||||
discoveryLimit: 5
|
||||
repoURL: quay.io/holos/mccutchen/go-httpbin
|
||||
semverConstraint: ^2.0.0
|
||||
strictSemvers: true
|
||||
transformers:
|
||||
- kind: Kustomize
|
||||
inputs:
|
||||
- resources.gen.yaml
|
||||
output: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
kustomize:
|
||||
kustomization:
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
labels:
|
||||
- includeSelectors: false
|
||||
pairs:
|
||||
argocd.argoproj.io/instance: httpbin-kargo-stages
|
||||
resources:
|
||||
- resources.gen.yaml
|
||||
- artifact: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
resources:
|
||||
Application:
|
||||
httpbin-kargo-stages:
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
labels: {}
|
||||
name: httpbin-kargo-stages
|
||||
namespace: argocd
|
||||
spec:
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
project: httpbin
|
||||
source:
|
||||
path: deploy/projects/httpbin/components/kargo-stages
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
targetRevision: main
|
||||
7
internal/compare/testdata/annotations/testcase.json
vendored
Normal file
7
internal/compare/testdata/annotations/testcase.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"exitCode": 1,
|
||||
"name": "DuplicatedAnnotationsInAfter",
|
||||
"msg": "should not match when the same object is duplicated in after and differs only by an arbitrary deeply nested field in before, in this case an annotation",
|
||||
"file1": "before.yaml",
|
||||
"file2": "after.yaml"
|
||||
}
|
||||
24
internal/compare/testdata/backwards-compatible/after.yaml
vendored
Normal file
24
internal/compare/testdata/backwards-compatible/after.yaml
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: component
|
||||
labels:
|
||||
holos.run/component.name: component
|
||||
holos.run/stack.name: demo
|
||||
annotations:
|
||||
holos.run/purpose: example
|
||||
holos.run/environment: prod
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: component.yaml
|
||||
generators:
|
||||
- kind: Kubernetes
|
||||
output: manifests.yaml
|
||||
resources:
|
||||
- name: deployment
|
||||
namespace: default
|
||||
transformers:
|
||||
- kind: SetLabels
|
||||
labels:
|
||||
app: demo
|
||||
17
internal/compare/testdata/backwards-compatible/before.yaml
vendored
Normal file
17
internal/compare/testdata/backwards-compatible/before.yaml
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: component
|
||||
labels:
|
||||
holos.run/component.name: component
|
||||
# Missing holos.run/stack.name
|
||||
# Missing annotations
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: component.yaml
|
||||
generators:
|
||||
- kind: Kubernetes
|
||||
output: manifests.yaml
|
||||
# Missing resources
|
||||
# Missing transformers
|
||||
9
internal/compare/testdata/backwards-compatible/testcase.json
vendored
Normal file
9
internal/compare/testdata/backwards-compatible/testcase.json
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"exitCode": 0,
|
||||
"name": "BuildPlan_4",
|
||||
"msg": "BuildPlan spec 4: after may have fields missing from before if isBackwardsCompatible is true - should pass when before has missing fields and isBackwardsCompatible is true",
|
||||
"file1": "before.yaml",
|
||||
"file2": "after.yaml",
|
||||
"expectedErrors": [],
|
||||
"isBackwardsCompatible": true
|
||||
}
|
||||
404
internal/compare/testdata/buildplan/after.yaml
vendored
Normal file
404
internal/compare/testdata/buildplan/after.yaml
vendored
Normal file
@@ -0,0 +1,404 @@
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: kargo-stages
|
||||
labels:
|
||||
holos.run/component.name: kargo-stages
|
||||
holos.run/project.name: httpbin
|
||||
holos.run/stack.name: httpbin
|
||||
annotations:
|
||||
app.holos.run/description: kargo-stages for project httpbin
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: resources.gen.yaml
|
||||
resources:
|
||||
Stage:
|
||||
dev:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: dev
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/dev-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/dev-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/dev-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-dev-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
direct: true
|
||||
prod-us-central:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-central
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-central-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-central-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-central-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-central-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-east:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-east
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-east-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-east-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-east-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-east-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-west:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-west
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-west-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-west-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-west-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-west-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
test:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: test
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/test-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/test-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/test-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-test-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- dev
|
||||
uat:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: uat
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/uat-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/uat-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/uat-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-uat-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- test
|
||||
Warehouse:
|
||||
httpbin:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Warehouse
|
||||
metadata:
|
||||
name: httpbin
|
||||
namespace: httpbin
|
||||
spec:
|
||||
interval: 5m0s
|
||||
subscriptions:
|
||||
- image:
|
||||
discoveryLimit: 5
|
||||
repoURL: quay.io/holos/mccutchen/go-httpbin
|
||||
semverConstraint: ^2.0.0
|
||||
strictSemvers: true
|
||||
transformers:
|
||||
- kind: Kustomize
|
||||
inputs:
|
||||
- resources.gen.yaml
|
||||
output: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
kustomize:
|
||||
kustomization:
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
labels:
|
||||
- includeSelectors: false
|
||||
pairs:
|
||||
argocd.argoproj.io/instance: httpbin-kargo-stages
|
||||
resources:
|
||||
- resources.gen.yaml
|
||||
- artifact: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
resources:
|
||||
Application:
|
||||
httpbin-kargo-stages:
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
labels: {}
|
||||
name: httpbin-kargo-stages
|
||||
namespace: argocd
|
||||
spec:
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
project: httpbin
|
||||
source:
|
||||
path: deploy/projects/httpbin/components/kargo-stages
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
targetRevision: main
|
||||
404
internal/compare/testdata/buildplan/before.yaml
vendored
Normal file
404
internal/compare/testdata/buildplan/before.yaml
vendored
Normal file
@@ -0,0 +1,404 @@
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: kargo-stages
|
||||
labels:
|
||||
holos.run/component.name: kargo-stages
|
||||
holos.run/project.name: httpbin
|
||||
holos.run/stack.name: httpbin
|
||||
annotations:
|
||||
app.holos.run/description: kargo-stages for project httpbin
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: resources.gen.yaml
|
||||
resources:
|
||||
Stage:
|
||||
dev:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: dev
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/dev-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/dev-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/dev-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-dev-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
direct: true
|
||||
prod-us-central:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-central
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-central-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-central-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-central-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-central-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-east:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-east
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-east-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-east-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-east-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-east-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-west:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-west
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-west-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-west-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-west-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-west-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
test:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: test
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/test-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/test-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/test-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-test-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- dev
|
||||
uat:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: uat
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/uat-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/uat-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/uat-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-uat-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- test
|
||||
Warehouse:
|
||||
httpbin:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Warehouse
|
||||
metadata:
|
||||
name: httpbin
|
||||
namespace: httpbin
|
||||
spec:
|
||||
interval: 5m0s
|
||||
subscriptions:
|
||||
- image:
|
||||
discoveryLimit: 5
|
||||
repoURL: quay.io/holos/mccutchen/go-httpbin
|
||||
semverConstraint: ^2.0.0
|
||||
strictSemvers: true
|
||||
transformers:
|
||||
- kind: Kustomize
|
||||
inputs:
|
||||
- resources.gen.yaml
|
||||
output: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
kustomize:
|
||||
kustomization:
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
labels:
|
||||
- includeSelectors: false
|
||||
pairs:
|
||||
argocd.argoproj.io/instance: httpbin-kargo-stages
|
||||
resources:
|
||||
- resources.gen.yaml
|
||||
- artifact: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
resources:
|
||||
Application:
|
||||
httpbin-kargo-stages:
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
labels: {}
|
||||
name: httpbin-kargo-stages
|
||||
namespace: argocd
|
||||
spec:
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
project: httpbin
|
||||
source:
|
||||
path: deploy/projects/httpbin/components/kargo-stages
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
targetRevision: main
|
||||
8
internal/compare/testdata/buildplan/testcase.json
vendored
Normal file
8
internal/compare/testdata/buildplan/testcase.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"exitCode": 0,
|
||||
"name": "FullBuildPlan",
|
||||
"msg": "should match full build plans",
|
||||
"file1": "before.yaml",
|
||||
"file2": "after.yaml",
|
||||
"expectedErrors": []
|
||||
}
|
||||
404
internal/compare/testdata/buildplan2/after.yaml
vendored
Normal file
404
internal/compare/testdata/buildplan2/after.yaml
vendored
Normal file
@@ -0,0 +1,404 @@
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: kargo-stages
|
||||
labels:
|
||||
holos.run/component.name: kargo-stages
|
||||
holos.run/project.name: httpbin
|
||||
holos.run/stack.name: httpbin
|
||||
annotations:
|
||||
app.holos.run/description: kargo-stages for project httpbin
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
resources:
|
||||
Application:
|
||||
httpbin-kargo-stages:
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
labels: {}
|
||||
name: httpbin-kargo-stages
|
||||
namespace: argocd
|
||||
spec:
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
project: httpbin
|
||||
source:
|
||||
path: deploy/projects/httpbin/components/kargo-stages
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
targetRevision: main
|
||||
- artifact: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: resources.gen.yaml
|
||||
resources:
|
||||
Stage:
|
||||
dev:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: dev
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/dev-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/dev-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/dev-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-dev-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
direct: true
|
||||
prod-us-central:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-central
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-central-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-central-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-central-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-central-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-east:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-east
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-east-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-east-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-east-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-east-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-west:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-west
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-west-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-west-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-west-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-west-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
test:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: test
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/test-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/test-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/test-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-test-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- dev
|
||||
uat:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: uat
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/uat-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/uat-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/uat-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-uat-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- test
|
||||
Warehouse:
|
||||
httpbin:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Warehouse
|
||||
metadata:
|
||||
name: httpbin
|
||||
namespace: httpbin
|
||||
spec:
|
||||
interval: 5m0s
|
||||
subscriptions:
|
||||
- image:
|
||||
discoveryLimit: 5
|
||||
repoURL: quay.io/holos/mccutchen/go-httpbin
|
||||
semverConstraint: ^2.0.0
|
||||
strictSemvers: true
|
||||
transformers:
|
||||
- kind: Kustomize
|
||||
inputs:
|
||||
- resources.gen.yaml
|
||||
output: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
kustomize:
|
||||
kustomization:
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
labels:
|
||||
- includeSelectors: false
|
||||
pairs:
|
||||
argocd.argoproj.io/instance: httpbin-kargo-stages
|
||||
resources:
|
||||
- resources.gen.yaml
|
||||
404
internal/compare/testdata/buildplan2/before.yaml
vendored
Normal file
404
internal/compare/testdata/buildplan2/before.yaml
vendored
Normal file
@@ -0,0 +1,404 @@
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: kargo-stages
|
||||
labels:
|
||||
holos.run/component.name: kargo-stages
|
||||
holos.run/project.name: httpbin
|
||||
holos.run/stack.name: httpbin
|
||||
annotations:
|
||||
app.holos.run/description: kargo-stages for project httpbin
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: resources.gen.yaml
|
||||
resources:
|
||||
Stage:
|
||||
dev:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: dev
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/dev-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/dev-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/dev-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-dev-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
direct: true
|
||||
prod-us-central:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-central
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-central-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-central-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-central-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-central-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-east:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-east
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-east-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-east-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-east-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-east-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-west:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-west
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-west-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-west-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-west-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-west-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
test:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: test
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/test-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/test-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/test-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-test-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- dev
|
||||
uat:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: uat
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/uat-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/uat-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/uat-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-uat-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- test
|
||||
Warehouse:
|
||||
httpbin:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Warehouse
|
||||
metadata:
|
||||
name: httpbin
|
||||
namespace: httpbin
|
||||
spec:
|
||||
interval: 5m0s
|
||||
subscriptions:
|
||||
- image:
|
||||
discoveryLimit: 5
|
||||
repoURL: quay.io/holos/mccutchen/go-httpbin
|
||||
semverConstraint: ^2.0.0
|
||||
strictSemvers: true
|
||||
transformers:
|
||||
- kind: Kustomize
|
||||
inputs:
|
||||
- resources.gen.yaml
|
||||
output: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
kustomize:
|
||||
kustomization:
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
labels:
|
||||
- includeSelectors: false
|
||||
pairs:
|
||||
argocd.argoproj.io/instance: httpbin-kargo-stages
|
||||
resources:
|
||||
- resources.gen.yaml
|
||||
- artifact: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
resources:
|
||||
Application:
|
||||
httpbin-kargo-stages:
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
labels: {}
|
||||
name: httpbin-kargo-stages
|
||||
namespace: argocd
|
||||
spec:
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
project: httpbin
|
||||
source:
|
||||
path: deploy/projects/httpbin/components/kargo-stages
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
targetRevision: main
|
||||
8
internal/compare/testdata/buildplan2/testcase.json
vendored
Normal file
8
internal/compare/testdata/buildplan2/testcase.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"exitCode": 0,
|
||||
"name": "BuildPlan_3.1",
|
||||
"msg": "BuildPlan spec 3.1: Objects in the spec.artifacts list may appear in any arbitrary order - should match when artifacts are reordered",
|
||||
"file1": "before.yaml",
|
||||
"file2": "after.yaml",
|
||||
"expectedErrors": []
|
||||
}
|
||||
404
internal/compare/testdata/buildplan3/after.yaml
vendored
Normal file
404
internal/compare/testdata/buildplan3/after.yaml
vendored
Normal file
@@ -0,0 +1,404 @@
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: kargo-stages
|
||||
labels:
|
||||
holos.run/component.name: kargo-stages
|
||||
holos.run/project.name: httpbin
|
||||
holos.run/stack.name: not-httpbin
|
||||
annotations:
|
||||
app.holos.run/description: kargo-stages for project httpbin
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
resources:
|
||||
Application:
|
||||
httpbin-kargo-stages:
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
labels: {}
|
||||
name: httpbin-kargo-stages
|
||||
namespace: argocd
|
||||
spec:
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
project: httpbin
|
||||
source:
|
||||
path: deploy/projects/httpbin/components/kargo-stages
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
targetRevision: main
|
||||
- artifact: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: resources.gen.yaml
|
||||
resources:
|
||||
Stage:
|
||||
dev:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: dev
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/dev-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/dev-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/dev-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-dev-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
direct: true
|
||||
prod-us-central:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-central
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-central-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-central-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-central-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-central-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-east:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-east
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-east-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-east-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-east-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-east-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-west:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-west
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-west-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-west-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-west-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-west-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
test:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: test
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/test-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/test-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/test-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-test-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- dev
|
||||
uat:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: uat
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/uat-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/uat-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/uat-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-uat-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- test
|
||||
Warehouse:
|
||||
httpbin:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Warehouse
|
||||
metadata:
|
||||
name: httpbin
|
||||
namespace: httpbin
|
||||
spec:
|
||||
interval: 5m0s
|
||||
subscriptions:
|
||||
- image:
|
||||
discoveryLimit: 5
|
||||
repoURL: quay.io/holos/mccutchen/go-httpbin
|
||||
semverConstraint: ^2.0.0
|
||||
strictSemvers: true
|
||||
transformers:
|
||||
- kind: Kustomize
|
||||
inputs:
|
||||
- resources.gen.yaml
|
||||
output: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
kustomize:
|
||||
kustomization:
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
labels:
|
||||
- includeSelectors: false
|
||||
pairs:
|
||||
argocd.argoproj.io/instance: httpbin-kargo-stages
|
||||
resources:
|
||||
- resources.gen.yaml
|
||||
404
internal/compare/testdata/buildplan3/before.yaml
vendored
Normal file
404
internal/compare/testdata/buildplan3/before.yaml
vendored
Normal file
@@ -0,0 +1,404 @@
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: kargo-stages
|
||||
labels:
|
||||
holos.run/component.name: kargo-stages
|
||||
holos.run/project.name: httpbin
|
||||
holos.run/stack.name: httpbin
|
||||
annotations:
|
||||
app.holos.run/description: kargo-stages for project httpbin
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: resources.gen.yaml
|
||||
resources:
|
||||
Stage:
|
||||
dev:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: dev
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/dev-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/dev-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/dev-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-dev-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
direct: true
|
||||
prod-us-central:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-central
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-central-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-central-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-central-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-central-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-east:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-east
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-east-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-east-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-east-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-east-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-west:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-west
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-west-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-west-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-west-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-west-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
test:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: test
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/test-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/test-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/test-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-test-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- dev
|
||||
uat:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: uat
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/uat-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/uat-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/uat-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-uat-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- test
|
||||
Warehouse:
|
||||
httpbin:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Warehouse
|
||||
metadata:
|
||||
name: httpbin
|
||||
namespace: httpbin
|
||||
spec:
|
||||
interval: 5m0s
|
||||
subscriptions:
|
||||
- image:
|
||||
discoveryLimit: 5
|
||||
repoURL: quay.io/holos/mccutchen/go-httpbin
|
||||
semverConstraint: ^2.0.0
|
||||
strictSemvers: true
|
||||
transformers:
|
||||
- kind: Kustomize
|
||||
inputs:
|
||||
- resources.gen.yaml
|
||||
output: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
kustomize:
|
||||
kustomization:
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
labels:
|
||||
- includeSelectors: false
|
||||
pairs:
|
||||
argocd.argoproj.io/instance: httpbin-kargo-stages
|
||||
resources:
|
||||
- resources.gen.yaml
|
||||
- artifact: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
resources:
|
||||
Application:
|
||||
httpbin-kargo-stages:
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
labels: {}
|
||||
name: httpbin-kargo-stages
|
||||
namespace: argocd
|
||||
spec:
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
project: httpbin
|
||||
source:
|
||||
path: deploy/projects/httpbin/components/kargo-stages
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
targetRevision: main
|
||||
8
internal/compare/testdata/buildplan3/testcase.json
vendored
Normal file
8
internal/compare/testdata/buildplan3/testcase.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"exitCode": 1,
|
||||
"name": "FullBuildPlanDifferentLabelValues",
|
||||
"msg": "should not match full build plans with out of order artifacts and different labels",
|
||||
"file1": "before.yaml",
|
||||
"file2": "after.yaml",
|
||||
"expectedErrors": ["holos.run/stack.name: not-httpbin"]
|
||||
}
|
||||
405
internal/compare/testdata/buildplan4/after.yaml
vendored
Normal file
405
internal/compare/testdata/buildplan4/after.yaml
vendored
Normal file
@@ -0,0 +1,405 @@
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: kargo-stages
|
||||
labels:
|
||||
holos.run/component.name: kargo-stages
|
||||
holos.run/project.name: httpbin
|
||||
holos.run/stack.name: httpbin
|
||||
extra: not-in-before
|
||||
annotations:
|
||||
app.holos.run/description: kargo-stages for project httpbin
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: resources.gen.yaml
|
||||
resources:
|
||||
Stage:
|
||||
dev:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: dev
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/dev-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/dev-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/dev-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-dev-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
direct: true
|
||||
prod-us-central:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-central
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-central-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-central-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-central-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-central-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-east:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-east
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-east-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-east-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-east-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-east-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-west:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-west
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-west-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-west-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-west-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-west-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
test:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: test
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/test-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/test-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/test-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-test-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- dev
|
||||
uat:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: uat
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/uat-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/uat-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/uat-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-uat-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- test
|
||||
Warehouse:
|
||||
httpbin:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Warehouse
|
||||
metadata:
|
||||
name: httpbin
|
||||
namespace: httpbin
|
||||
spec:
|
||||
interval: 5m0s
|
||||
subscriptions:
|
||||
- image:
|
||||
discoveryLimit: 5
|
||||
repoURL: quay.io/holos/mccutchen/go-httpbin
|
||||
semverConstraint: ^2.0.0
|
||||
strictSemvers: true
|
||||
transformers:
|
||||
- kind: Kustomize
|
||||
inputs:
|
||||
- resources.gen.yaml
|
||||
output: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
kustomize:
|
||||
kustomization:
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
labels:
|
||||
- includeSelectors: false
|
||||
pairs:
|
||||
argocd.argoproj.io/instance: httpbin-kargo-stages
|
||||
resources:
|
||||
- resources.gen.yaml
|
||||
- artifact: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
resources:
|
||||
Application:
|
||||
httpbin-kargo-stages:
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
labels: {}
|
||||
name: httpbin-kargo-stages
|
||||
namespace: argocd
|
||||
spec:
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
project: httpbin
|
||||
source:
|
||||
path: deploy/projects/httpbin/components/kargo-stages
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
targetRevision: main
|
||||
404
internal/compare/testdata/buildplan4/before.yaml
vendored
Normal file
404
internal/compare/testdata/buildplan4/before.yaml
vendored
Normal file
@@ -0,0 +1,404 @@
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: kargo-stages
|
||||
labels:
|
||||
holos.run/component.name: kargo-stages
|
||||
holos.run/project.name: httpbin
|
||||
holos.run/stack.name: httpbin
|
||||
annotations:
|
||||
app.holos.run/description: kargo-stages for project httpbin
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: resources.gen.yaml
|
||||
resources:
|
||||
Stage:
|
||||
dev:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: dev
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/dev-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/dev-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/dev-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-dev-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
direct: true
|
||||
prod-us-central:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-central
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-central-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-central-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-central-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-central-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-east:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-east
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-east-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-east-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-east-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-east-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-west:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-west
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-west-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-west-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-west-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-west-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
test:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: test
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/test-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/test-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/test-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-test-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- dev
|
||||
uat:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: uat
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/uat-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/uat-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/uat-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-uat-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- test
|
||||
Warehouse:
|
||||
httpbin:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Warehouse
|
||||
metadata:
|
||||
name: httpbin
|
||||
namespace: httpbin
|
||||
spec:
|
||||
interval: 5m0s
|
||||
subscriptions:
|
||||
- image:
|
||||
discoveryLimit: 5
|
||||
repoURL: quay.io/holos/mccutchen/go-httpbin
|
||||
semverConstraint: ^2.0.0
|
||||
strictSemvers: true
|
||||
transformers:
|
||||
- kind: Kustomize
|
||||
inputs:
|
||||
- resources.gen.yaml
|
||||
output: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
kustomize:
|
||||
kustomization:
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
labels:
|
||||
- includeSelectors: false
|
||||
pairs:
|
||||
argocd.argoproj.io/instance: httpbin-kargo-stages
|
||||
resources:
|
||||
- resources.gen.yaml
|
||||
- artifact: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
resources:
|
||||
Application:
|
||||
httpbin-kargo-stages:
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
labels: {}
|
||||
name: httpbin-kargo-stages
|
||||
namespace: argocd
|
||||
spec:
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
project: httpbin
|
||||
source:
|
||||
path: deploy/projects/httpbin/components/kargo-stages
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
targetRevision: main
|
||||
8
internal/compare/testdata/buildplan4/testcase.json
vendored
Normal file
8
internal/compare/testdata/buildplan4/testcase.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"exitCode": 1,
|
||||
"name": "BeforeLabelsAreSubsetOfAfter",
|
||||
"msg": "should not match when before labels are a subset of after labels",
|
||||
"file1": "before.yaml",
|
||||
"file2": "after.yaml",
|
||||
"expectedErrors": ["+ extra: not-in-before"]
|
||||
}
|
||||
5778
internal/compare/testdata/compiler/after.yaml
vendored
Normal file
5778
internal/compare/testdata/compiler/after.yaml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
5778
internal/compare/testdata/compiler/before.yaml
vendored
Normal file
5778
internal/compare/testdata/compiler/before.yaml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
internal/compare/testdata/compiler/testcase.json
vendored
Normal file
7
internal/compare/testdata/compiler/testcase.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"exitCode": 0,
|
||||
"name": "CompilerShouldMatch",
|
||||
"msg": "output of the v1alpha6 compiler should match the v1alpha5 output",
|
||||
"file1": "before.yaml",
|
||||
"file2": "after.yaml"
|
||||
}
|
||||
7
internal/compare/testdata/different-count/after.yaml
vendored
Normal file
7
internal/compare/testdata/different-count/after.yaml
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: component1
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: test.yaml
|
||||
15
internal/compare/testdata/different-count/before.yaml
vendored
Normal file
15
internal/compare/testdata/different-count/before.yaml
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: component1
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: test.yaml
|
||||
---
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: component2
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: test2.yaml
|
||||
8
internal/compare/testdata/different-count/testcase.json
vendored
Normal file
8
internal/compare/testdata/different-count/testcase.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"exitCode": 1,
|
||||
"name": "BuildPlanFile_1",
|
||||
"msg": "BuildPlan File spec 1: one and two have an equal number of BuildPlan objects - should fail when count differs",
|
||||
"file1": "before.yaml",
|
||||
"file2": "after.yaml",
|
||||
"expectedErrors": ["different number of documents"]
|
||||
}
|
||||
22
internal/compare/testdata/duplicate-objects/after.yaml
vendored
Normal file
22
internal/compare/testdata/duplicate-objects/after.yaml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: component
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: component.yaml
|
||||
generators:
|
||||
- kind: Kubernetes
|
||||
output: manifests.yaml
|
||||
---
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: component
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: component.yaml
|
||||
generators:
|
||||
- kind: Kubernetes
|
||||
output: manifests.yaml
|
||||
22
internal/compare/testdata/duplicate-objects/before.yaml
vendored
Normal file
22
internal/compare/testdata/duplicate-objects/before.yaml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: component
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: component.yaml
|
||||
generators:
|
||||
- kind: Kubernetes
|
||||
output: manifests.yaml
|
||||
---
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: component
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: component.yaml
|
||||
generators:
|
||||
- kind: Kubernetes
|
||||
output: manifests.yaml
|
||||
8
internal/compare/testdata/duplicate-objects/testcase.json
vendored
Normal file
8
internal/compare/testdata/duplicate-objects/testcase.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"exitCode": 0,
|
||||
"name": "BuildPlanValid_1",
|
||||
"msg": "BuildPlan File validity 1: Two or more identical objects exist in the same file. They must be treated as unique objects - should match when both files have identical objects",
|
||||
"file1": "before.yaml",
|
||||
"file2": "after.yaml",
|
||||
"expectedErrors": []
|
||||
}
|
||||
0
internal/compare/testdata/empty/1.yaml
vendored
Normal file
0
internal/compare/testdata/empty/1.yaml
vendored
Normal file
0
internal/compare/testdata/empty/2.yaml
vendored
Normal file
0
internal/compare/testdata/empty/2.yaml
vendored
Normal file
8
internal/compare/testdata/empty/testcase.json
vendored
Normal file
8
internal/compare/testdata/empty/testcase.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"exitCode": 1,
|
||||
"name": "EmptyFiles",
|
||||
"msg": "empty files should return not implemented error",
|
||||
"file1": "1.yaml",
|
||||
"file2": "2.yaml",
|
||||
"expectedErrors": ["not implemented"]
|
||||
}
|
||||
13
internal/compare/testdata/fields-must-exist/after.yaml
vendored
Normal file
13
internal/compare/testdata/fields-must-exist/after.yaml
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: component
|
||||
labels:
|
||||
holos.run/component.name: component
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: component.yaml
|
||||
generators:
|
||||
- kind: Kubernetes
|
||||
output: manifests.yaml
|
||||
14
internal/compare/testdata/fields-must-exist/before.yaml
vendored
Normal file
14
internal/compare/testdata/fields-must-exist/before.yaml
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: component
|
||||
labels:
|
||||
holos.run/component.name: component
|
||||
holos.run/stack.name: demo
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: component.yaml
|
||||
generators:
|
||||
- kind: Kubernetes
|
||||
output: manifests.yaml
|
||||
8
internal/compare/testdata/fields-must-exist/testcase.json
vendored
Normal file
8
internal/compare/testdata/fields-must-exist/testcase.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"exitCode": 1,
|
||||
"name": "BuildPlan_5",
|
||||
"msg": "BuildPlan spec 5: Fields in a must always be present in b - should fail when field exists in a but not in b",
|
||||
"file1": "before.yaml",
|
||||
"file2": "after.yaml",
|
||||
"expectedErrors": ["- holos.run/stack.name: demo"]
|
||||
}
|
||||
13
internal/compare/testdata/key-order/after.yaml
vendored
Normal file
13
internal/compare/testdata/key-order/after.yaml
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
labels:
|
||||
env: prod
|
||||
version: "1.0"
|
||||
app: myapp
|
||||
name: component
|
||||
spec:
|
||||
config:
|
||||
timeout: 30
|
||||
host: localhost
|
||||
port: 8080
|
||||
13
internal/compare/testdata/key-order/before.yaml
vendored
Normal file
13
internal/compare/testdata/key-order/before.yaml
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: component
|
||||
labels:
|
||||
app: myapp
|
||||
version: "1.0"
|
||||
env: prod
|
||||
spec:
|
||||
config:
|
||||
port: 8080
|
||||
host: localhost
|
||||
timeout: 30
|
||||
8
internal/compare/testdata/key-order/testcase.json
vendored
Normal file
8
internal/compare/testdata/key-order/testcase.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"exitCode": 0,
|
||||
"name": "BuildPlan_3.2",
|
||||
"msg": "BuildPlan spec 3.2: The ordering of keys does not matter - should match when only key order differs",
|
||||
"file1": "before.yaml",
|
||||
"file2": "after.yaml",
|
||||
"expectedErrors": []
|
||||
}
|
||||
406
internal/compare/testdata/labels/after.yaml
vendored
Normal file
406
internal/compare/testdata/labels/after.yaml
vendored
Normal file
@@ -0,0 +1,406 @@
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: kargo-stages
|
||||
labels:
|
||||
holos.run/component.name: kargo-stages
|
||||
holos.run/project.name: httpbin
|
||||
holos.run/stack.name: httpbin
|
||||
some-arbitrary-label: not-in-before
|
||||
another-arbitrary-label: also-not-in-before
|
||||
annotations:
|
||||
app.holos.run/description: kargo-stages for project httpbin
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: resources.gen.yaml
|
||||
resources:
|
||||
Stage:
|
||||
dev:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: dev
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/dev-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/dev-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/dev-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-dev-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
direct: true
|
||||
prod-us-central:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-central
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-central-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-central-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-central-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-central-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-east:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-east
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-east-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-east-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-east-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-east-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-west:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-west
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-west-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-west-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-west-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-west-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
test:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: test
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/test-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/test-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/test-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-test-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- dev
|
||||
uat:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: uat
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/uat-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/uat-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/uat-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-uat-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- test
|
||||
Warehouse:
|
||||
httpbin:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Warehouse
|
||||
metadata:
|
||||
name: httpbin
|
||||
namespace: httpbin
|
||||
spec:
|
||||
interval: 5m0s
|
||||
subscriptions:
|
||||
- image:
|
||||
discoveryLimit: 5
|
||||
repoURL: quay.io/holos/mccutchen/go-httpbin
|
||||
semverConstraint: ^2.0.0
|
||||
strictSemvers: true
|
||||
transformers:
|
||||
- kind: Kustomize
|
||||
inputs:
|
||||
- resources.gen.yaml
|
||||
output: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
kustomize:
|
||||
kustomization:
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
labels:
|
||||
- includeSelectors: false
|
||||
pairs:
|
||||
argocd.argoproj.io/instance: httpbin-kargo-stages
|
||||
resources:
|
||||
- resources.gen.yaml
|
||||
- artifact: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
resources:
|
||||
Application:
|
||||
httpbin-kargo-stages:
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
labels: {}
|
||||
name: httpbin-kargo-stages
|
||||
namespace: argocd
|
||||
spec:
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
project: httpbin
|
||||
source:
|
||||
path: deploy/projects/httpbin/components/kargo-stages
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
targetRevision: main
|
||||
404
internal/compare/testdata/labels/before.yaml
vendored
Normal file
404
internal/compare/testdata/labels/before.yaml
vendored
Normal file
@@ -0,0 +1,404 @@
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: kargo-stages
|
||||
labels:
|
||||
holos.run/component.name: kargo-stages
|
||||
holos.run/project.name: httpbin
|
||||
holos.run/stack.name: httpbin
|
||||
annotations:
|
||||
app.holos.run/description: kargo-stages for project httpbin
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: resources.gen.yaml
|
||||
resources:
|
||||
Stage:
|
||||
dev:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: dev
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/dev-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/dev-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/dev-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-dev-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
direct: true
|
||||
prod-us-central:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-central
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-central-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-central-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-central-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-central-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-east:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-east
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-east-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-east-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-east-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-east-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-west:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-west
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-west-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-west-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-west-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-west-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
test:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: test
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/test-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/test-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/test-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-test-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- dev
|
||||
uat:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: uat
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/uat-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/uat-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/uat-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-uat-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- test
|
||||
Warehouse:
|
||||
httpbin:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Warehouse
|
||||
metadata:
|
||||
name: httpbin
|
||||
namespace: httpbin
|
||||
spec:
|
||||
interval: 5m0s
|
||||
subscriptions:
|
||||
- image:
|
||||
discoveryLimit: 5
|
||||
repoURL: quay.io/holos/mccutchen/go-httpbin
|
||||
semverConstraint: ^2.0.0
|
||||
strictSemvers: true
|
||||
transformers:
|
||||
- kind: Kustomize
|
||||
inputs:
|
||||
- resources.gen.yaml
|
||||
output: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
kustomize:
|
||||
kustomization:
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
labels:
|
||||
- includeSelectors: false
|
||||
pairs:
|
||||
argocd.argoproj.io/instance: httpbin-kargo-stages
|
||||
resources:
|
||||
- resources.gen.yaml
|
||||
- artifact: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
resources:
|
||||
Application:
|
||||
httpbin-kargo-stages:
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
labels: {}
|
||||
name: httpbin-kargo-stages
|
||||
namespace: argocd
|
||||
spec:
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
project: httpbin
|
||||
source:
|
||||
path: deploy/projects/httpbin/components/kargo-stages
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
targetRevision: main
|
||||
11
internal/compare/testdata/labels/testcase.json
vendored
Normal file
11
internal/compare/testdata/labels/testcase.json
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"exitCode": 1,
|
||||
"name": "ArbitraryLabels",
|
||||
"msg": "should not match when before labels are a subset of arbitrary after labels",
|
||||
"file1": "before.yaml",
|
||||
"file2": "after.yaml",
|
||||
"expectedErrors": [
|
||||
"+ some-arbitrary-label: not-in-before",
|
||||
"+ another-arbitrary-label: also-not-in-before"
|
||||
]
|
||||
}
|
||||
811
internal/compare/testdata/labels2/after.yaml
vendored
Normal file
811
internal/compare/testdata/labels2/after.yaml
vendored
Normal file
@@ -0,0 +1,811 @@
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: kargo-stages
|
||||
labels:
|
||||
holos.run/component.name: kargo-stages
|
||||
holos.run/project.name: httpbin
|
||||
holos.run/stack.name: httpbin
|
||||
seq: 2
|
||||
annotations:
|
||||
app.holos.run/description: kargo-stages for project httpbin
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: resources.gen.yaml
|
||||
resources:
|
||||
Stage:
|
||||
dev:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: dev
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/dev-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/dev-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/dev-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-dev-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
direct: true
|
||||
prod-us-central:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-central
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-central-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-central-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-central-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-central-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-east:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-east
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-east-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-east-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-east-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-east-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-west:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-west
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-west-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-west-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-west-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-west-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
test:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: test
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/test-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/test-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/test-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-test-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- dev
|
||||
uat:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: uat
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/uat-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/uat-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/uat-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-uat-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- test
|
||||
Warehouse:
|
||||
httpbin:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Warehouse
|
||||
metadata:
|
||||
name: httpbin
|
||||
namespace: httpbin
|
||||
spec:
|
||||
interval: 5m0s
|
||||
subscriptions:
|
||||
- image:
|
||||
discoveryLimit: 5
|
||||
repoURL: quay.io/holos/mccutchen/go-httpbin
|
||||
semverConstraint: ^2.0.0
|
||||
strictSemvers: true
|
||||
transformers:
|
||||
- kind: Kustomize
|
||||
inputs:
|
||||
- resources.gen.yaml
|
||||
output: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
kustomize:
|
||||
kustomization:
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
labels:
|
||||
- includeSelectors: false
|
||||
pairs:
|
||||
argocd.argoproj.io/instance: httpbin-kargo-stages
|
||||
resources:
|
||||
- resources.gen.yaml
|
||||
- artifact: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
resources:
|
||||
Application:
|
||||
httpbin-kargo-stages:
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
labels: {}
|
||||
name: httpbin-kargo-stages
|
||||
namespace: argocd
|
||||
spec:
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
project: httpbin
|
||||
source:
|
||||
path: deploy/projects/httpbin/components/kargo-stages
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
targetRevision: main
|
||||
---
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: kargo-stages
|
||||
labels:
|
||||
holos.run/component.name: kargo-stages
|
||||
holos.run/project.name: httpbin
|
||||
holos.run/stack.name: httpbin
|
||||
seq: 1
|
||||
annotations:
|
||||
app.holos.run/description: kargo-stages for project httpbin
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: resources.gen.yaml
|
||||
resources:
|
||||
Stage:
|
||||
dev:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: dev
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/dev-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/dev-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/dev-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-dev-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
direct: true
|
||||
prod-us-central:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-central
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-central-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-central-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-central-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-central-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-east:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-east
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-east-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-east-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-east-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-east-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-west:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-west
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-west-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-west-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-west-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-west-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
test:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: test
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/test-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/test-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/test-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-test-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- dev
|
||||
uat:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: uat
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/uat-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/uat-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/uat-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-uat-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- test
|
||||
Warehouse:
|
||||
httpbin:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Warehouse
|
||||
metadata:
|
||||
name: httpbin
|
||||
namespace: httpbin
|
||||
spec:
|
||||
interval: 5m0s
|
||||
subscriptions:
|
||||
- image:
|
||||
discoveryLimit: 5
|
||||
repoURL: quay.io/holos/mccutchen/go-httpbin
|
||||
semverConstraint: ^2.0.0
|
||||
strictSemvers: true
|
||||
transformers:
|
||||
- kind: Kustomize
|
||||
inputs:
|
||||
- resources.gen.yaml
|
||||
output: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
kustomize:
|
||||
kustomization:
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
labels:
|
||||
- includeSelectors: false
|
||||
pairs:
|
||||
argocd.argoproj.io/instance: httpbin-kargo-stages
|
||||
resources:
|
||||
- resources.gen.yaml
|
||||
- artifact: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
resources:
|
||||
Application:
|
||||
httpbin-kargo-stages:
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
labels: {}
|
||||
name: httpbin-kargo-stages
|
||||
namespace: argocd
|
||||
spec:
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
project: httpbin
|
||||
source:
|
||||
path: deploy/projects/httpbin/components/kargo-stages
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
targetRevision: main
|
||||
811
internal/compare/testdata/labels2/before.yaml
vendored
Normal file
811
internal/compare/testdata/labels2/before.yaml
vendored
Normal file
@@ -0,0 +1,811 @@
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: kargo-stages
|
||||
labels:
|
||||
holos.run/component.name: kargo-stages
|
||||
holos.run/project.name: httpbin
|
||||
holos.run/stack.name: httpbin
|
||||
seq: 1
|
||||
annotations:
|
||||
app.holos.run/description: kargo-stages for project httpbin
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: resources.gen.yaml
|
||||
resources:
|
||||
Stage:
|
||||
dev:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: dev
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/dev-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/dev-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/dev-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-dev-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
direct: true
|
||||
prod-us-central:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-central
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-central-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-central-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-central-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-central-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-east:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-east
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-east-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-east-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-east-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-east-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-west:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-west
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-west-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-west-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-west-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-west-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
test:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: test
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/test-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/test-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/test-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-test-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- dev
|
||||
uat:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: uat
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/uat-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/uat-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/uat-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-uat-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- test
|
||||
Warehouse:
|
||||
httpbin:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Warehouse
|
||||
metadata:
|
||||
name: httpbin
|
||||
namespace: httpbin
|
||||
spec:
|
||||
interval: 5m0s
|
||||
subscriptions:
|
||||
- image:
|
||||
discoveryLimit: 5
|
||||
repoURL: quay.io/holos/mccutchen/go-httpbin
|
||||
semverConstraint: ^2.0.0
|
||||
strictSemvers: true
|
||||
transformers:
|
||||
- kind: Kustomize
|
||||
inputs:
|
||||
- resources.gen.yaml
|
||||
output: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
kustomize:
|
||||
kustomization:
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
labels:
|
||||
- includeSelectors: false
|
||||
pairs:
|
||||
argocd.argoproj.io/instance: httpbin-kargo-stages
|
||||
resources:
|
||||
- resources.gen.yaml
|
||||
- artifact: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
resources:
|
||||
Application:
|
||||
httpbin-kargo-stages:
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
labels: {}
|
||||
name: httpbin-kargo-stages
|
||||
namespace: argocd
|
||||
spec:
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
project: httpbin
|
||||
source:
|
||||
path: deploy/projects/httpbin/components/kargo-stages
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
targetRevision: main
|
||||
---
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: kargo-stages
|
||||
labels:
|
||||
holos.run/component.name: kargo-stages
|
||||
holos.run/project.name: httpbin
|
||||
holos.run/stack.name: httpbin
|
||||
seq: 2
|
||||
annotations:
|
||||
app.holos.run/description: kargo-stages for project httpbin
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: resources.gen.yaml
|
||||
resources:
|
||||
Stage:
|
||||
dev:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: dev
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/dev-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/dev-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/dev-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-dev-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
direct: true
|
||||
prod-us-central:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-central
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-central-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-central-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-central-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-central-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-east:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-east
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-east-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-east-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-east-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-east-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-west:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-west
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-west-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-west-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-west-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-west-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
test:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: test
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/test-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/test-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/test-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-test-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- dev
|
||||
uat:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: uat
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/uat-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/uat-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/uat-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-uat-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- test
|
||||
Warehouse:
|
||||
httpbin:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Warehouse
|
||||
metadata:
|
||||
name: httpbin
|
||||
namespace: httpbin
|
||||
spec:
|
||||
interval: 5m0s
|
||||
subscriptions:
|
||||
- image:
|
||||
discoveryLimit: 5
|
||||
repoURL: quay.io/holos/mccutchen/go-httpbin
|
||||
semverConstraint: ^2.0.0
|
||||
strictSemvers: true
|
||||
transformers:
|
||||
- kind: Kustomize
|
||||
inputs:
|
||||
- resources.gen.yaml
|
||||
output: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
kustomize:
|
||||
kustomization:
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
labels:
|
||||
- includeSelectors: false
|
||||
pairs:
|
||||
argocd.argoproj.io/instance: httpbin-kargo-stages
|
||||
resources:
|
||||
- resources.gen.yaml
|
||||
- artifact: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
resources:
|
||||
Application:
|
||||
httpbin-kargo-stages:
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
labels: {}
|
||||
name: httpbin-kargo-stages
|
||||
namespace: argocd
|
||||
spec:
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
project: httpbin
|
||||
source:
|
||||
path: deploy/projects/httpbin/components/kargo-stages
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
targetRevision: main
|
||||
8
internal/compare/testdata/labels2/testcase.json
vendored
Normal file
8
internal/compare/testdata/labels2/testcase.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"exitCode": 0,
|
||||
"name": "IdenticalObjectsToleration",
|
||||
"msg": "Toleration 1: multiple identical BuildPlans may exist and must be treated as unique - should match when identical objects exist",
|
||||
"file1": "before.yaml",
|
||||
"file2": "after.yaml",
|
||||
"expectedErrors": []
|
||||
}
|
||||
811
internal/compare/testdata/labels3/after.yaml
vendored
Normal file
811
internal/compare/testdata/labels3/after.yaml
vendored
Normal file
@@ -0,0 +1,811 @@
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: kargo-stages
|
||||
labels:
|
||||
holos.run/component.name: kargo-stages
|
||||
holos.run/project.name: httpbin
|
||||
holos.run/stack.name: httpbin
|
||||
seq: 1
|
||||
annotations:
|
||||
app.holos.run/description: kargo-stages for project httpbin
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: resources.gen.yaml
|
||||
resources:
|
||||
Stage:
|
||||
dev:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: dev
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/dev-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/dev-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/dev-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-dev-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
direct: true
|
||||
prod-us-central:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-central
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-central-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-central-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-central-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-central-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-east:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-east
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-east-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-east-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-east-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-east-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-west:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-west
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-west-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-west-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-west-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-west-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
test:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: test
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/test-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/test-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/test-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-test-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- dev
|
||||
uat:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: uat
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/uat-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/uat-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/uat-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-uat-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- test
|
||||
Warehouse:
|
||||
httpbin:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Warehouse
|
||||
metadata:
|
||||
name: httpbin
|
||||
namespace: httpbin
|
||||
spec:
|
||||
interval: 5m0s
|
||||
subscriptions:
|
||||
- image:
|
||||
discoveryLimit: 5
|
||||
repoURL: quay.io/holos/mccutchen/go-httpbin
|
||||
semverConstraint: ^2.0.0
|
||||
strictSemvers: true
|
||||
transformers:
|
||||
- kind: Kustomize
|
||||
inputs:
|
||||
- resources.gen.yaml
|
||||
output: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
kustomize:
|
||||
kustomization:
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
labels:
|
||||
- includeSelectors: false
|
||||
pairs:
|
||||
argocd.argoproj.io/instance: httpbin-kargo-stages
|
||||
resources:
|
||||
- resources.gen.yaml
|
||||
- artifact: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
resources:
|
||||
Application:
|
||||
httpbin-kargo-stages:
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
labels: {}
|
||||
name: httpbin-kargo-stages
|
||||
namespace: argocd
|
||||
spec:
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
project: httpbin
|
||||
source:
|
||||
path: deploy/projects/httpbin/components/kargo-stages
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
targetRevision: main
|
||||
---
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: kargo-stages
|
||||
labels:
|
||||
holos.run/component.name: kargo-stages
|
||||
holos.run/project.name: httpbin
|
||||
holos.run/stack.name: httpbin
|
||||
seq: 1
|
||||
annotations:
|
||||
app.holos.run/description: kargo-stages for project httpbin
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: resources.gen.yaml
|
||||
resources:
|
||||
Stage:
|
||||
dev:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: dev
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/dev-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/dev-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/dev-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-dev-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
direct: true
|
||||
prod-us-central:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-central
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-central-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-central-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-central-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-central-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-east:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-east
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-east-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-east-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-east-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-east-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-west:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-west
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-west-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-west-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-west-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-west-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
test:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: test
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/test-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/test-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/test-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-test-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- dev
|
||||
uat:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: uat
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/uat-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/uat-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/uat-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-uat-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- test
|
||||
Warehouse:
|
||||
httpbin:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Warehouse
|
||||
metadata:
|
||||
name: httpbin
|
||||
namespace: httpbin
|
||||
spec:
|
||||
interval: 5m0s
|
||||
subscriptions:
|
||||
- image:
|
||||
discoveryLimit: 5
|
||||
repoURL: quay.io/holos/mccutchen/go-httpbin
|
||||
semverConstraint: ^2.0.0
|
||||
strictSemvers: true
|
||||
transformers:
|
||||
- kind: Kustomize
|
||||
inputs:
|
||||
- resources.gen.yaml
|
||||
output: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
kustomize:
|
||||
kustomization:
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
labels:
|
||||
- includeSelectors: false
|
||||
pairs:
|
||||
argocd.argoproj.io/instance: httpbin-kargo-stages
|
||||
resources:
|
||||
- resources.gen.yaml
|
||||
- artifact: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
resources:
|
||||
Application:
|
||||
httpbin-kargo-stages:
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
labels: {}
|
||||
name: httpbin-kargo-stages
|
||||
namespace: argocd
|
||||
spec:
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
project: httpbin
|
||||
source:
|
||||
path: deploy/projects/httpbin/components/kargo-stages
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
targetRevision: main
|
||||
811
internal/compare/testdata/labels3/before.yaml
vendored
Normal file
811
internal/compare/testdata/labels3/before.yaml
vendored
Normal file
@@ -0,0 +1,811 @@
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: kargo-stages
|
||||
labels:
|
||||
holos.run/component.name: kargo-stages
|
||||
holos.run/project.name: httpbin
|
||||
holos.run/stack.name: httpbin
|
||||
seq: 1
|
||||
annotations:
|
||||
app.holos.run/description: kargo-stages for project httpbin
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: resources.gen.yaml
|
||||
resources:
|
||||
Stage:
|
||||
dev:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: dev
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/dev-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/dev-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/dev-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-dev-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
direct: true
|
||||
prod-us-central:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-central
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-central-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-central-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-central-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-central-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-east:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-east
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-east-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-east-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-east-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-east-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-west:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-west
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-west-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-west-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-west-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-west-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
test:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: test
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/test-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/test-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/test-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-test-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- dev
|
||||
uat:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: uat
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/uat-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/uat-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/uat-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-uat-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- test
|
||||
Warehouse:
|
||||
httpbin:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Warehouse
|
||||
metadata:
|
||||
name: httpbin
|
||||
namespace: httpbin
|
||||
spec:
|
||||
interval: 5m0s
|
||||
subscriptions:
|
||||
- image:
|
||||
discoveryLimit: 5
|
||||
repoURL: quay.io/holos/mccutchen/go-httpbin
|
||||
semverConstraint: ^2.0.0
|
||||
strictSemvers: true
|
||||
transformers:
|
||||
- kind: Kustomize
|
||||
inputs:
|
||||
- resources.gen.yaml
|
||||
output: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
kustomize:
|
||||
kustomization:
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
labels:
|
||||
- includeSelectors: false
|
||||
pairs:
|
||||
argocd.argoproj.io/instance: httpbin-kargo-stages
|
||||
resources:
|
||||
- resources.gen.yaml
|
||||
- artifact: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
resources:
|
||||
Application:
|
||||
httpbin-kargo-stages:
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
labels: {}
|
||||
name: httpbin-kargo-stages
|
||||
namespace: argocd
|
||||
spec:
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
project: httpbin
|
||||
source:
|
||||
path: deploy/projects/httpbin/components/kargo-stages
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
targetRevision: main
|
||||
---
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: kargo-stages
|
||||
labels:
|
||||
holos.run/component.name: kargo-stages
|
||||
holos.run/project.name: httpbin
|
||||
holos.run/stack.name: httpbin
|
||||
seq: 2
|
||||
annotations:
|
||||
app.holos.run/description: kargo-stages for project httpbin
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: resources.gen.yaml
|
||||
resources:
|
||||
Stage:
|
||||
dev:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: dev
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/dev-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/dev-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/dev-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/dev-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-dev-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
direct: true
|
||||
prod-us-central:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-central
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-central-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-central-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-central-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-central-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-central-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-east:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-east
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-east-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-east-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-east-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-east-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-east-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
prod-us-west:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: prod-us-west
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/prod-us-west-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/prod-us-west-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/prod-us-west-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/prod-us-west-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-prod-us-west-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- uat
|
||||
test:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: test
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/test-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/test-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/test-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/test-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-test-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- dev
|
||||
uat:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Stage
|
||||
metadata:
|
||||
name: uat
|
||||
namespace: httpbin
|
||||
spec:
|
||||
promotionTemplate:
|
||||
spec:
|
||||
steps:
|
||||
- config:
|
||||
checkout:
|
||||
- branch: main
|
||||
path: ./src
|
||||
- branch: project/httpbin/component/uat-httpbin
|
||||
create: true
|
||||
path: ./out
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: git-clone
|
||||
- config:
|
||||
path: ./out
|
||||
uses: git-clear
|
||||
- as: update-image
|
||||
config:
|
||||
images:
|
||||
- image: quay.io/holos/mccutchen/go-httpbin
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-set-image
|
||||
- config:
|
||||
outPath: ./out/uat-httpbin.gen.yaml
|
||||
path: ./src/deploy/projects/httpbin/components/uat-httpbin
|
||||
uses: kustomize-build
|
||||
- as: commit
|
||||
config:
|
||||
messageFromSteps:
|
||||
- update-image
|
||||
path: ./out
|
||||
uses: git-commit
|
||||
- config:
|
||||
path: ./out
|
||||
targetBranch: project/httpbin/component/uat-httpbin
|
||||
uses: git-push
|
||||
- config:
|
||||
apps:
|
||||
- name: httpbin-uat-httpbin
|
||||
sources:
|
||||
- desiredCommitFromStep: commit
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
uses: argocd-update
|
||||
requestedFreight:
|
||||
- origin:
|
||||
kind: Warehouse
|
||||
name: httpbin
|
||||
sources:
|
||||
stages:
|
||||
- test
|
||||
Warehouse:
|
||||
httpbin:
|
||||
apiVersion: kargo.akuity.io/v1alpha1
|
||||
kind: Warehouse
|
||||
metadata:
|
||||
name: httpbin
|
||||
namespace: httpbin
|
||||
spec:
|
||||
interval: 5m0s
|
||||
subscriptions:
|
||||
- image:
|
||||
discoveryLimit: 5
|
||||
repoURL: quay.io/holos/mccutchen/go-httpbin
|
||||
semverConstraint: ^2.0.0
|
||||
strictSemvers: true
|
||||
transformers:
|
||||
- kind: Kustomize
|
||||
inputs:
|
||||
- resources.gen.yaml
|
||||
output: projects/httpbin/components/kargo-stages/kargo-stages.gen.yaml
|
||||
kustomize:
|
||||
kustomization:
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
labels:
|
||||
- includeSelectors: false
|
||||
pairs:
|
||||
argocd.argoproj.io/instance: httpbin-kargo-stages
|
||||
resources:
|
||||
- resources.gen.yaml
|
||||
- artifact: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: projects/httpbin/gitops/kargo-stages.application.gen.yaml
|
||||
resources:
|
||||
Application:
|
||||
httpbin-kargo-stages:
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
labels: {}
|
||||
name: httpbin-kargo-stages
|
||||
namespace: argocd
|
||||
spec:
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
project: httpbin
|
||||
source:
|
||||
path: deploy/projects/httpbin/components/kargo-stages
|
||||
repoURL: https://github.com/holos-run/kargo-demo.git
|
||||
targetRevision: main
|
||||
11
internal/compare/testdata/labels3/testcase.json
vendored
Normal file
11
internal/compare/testdata/labels3/testcase.json
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"exitCode": 1,
|
||||
"name": "MultipleIdenticalObjectsOutOfOrderAllLabels",
|
||||
"msg": "should not match when the same object is duplicated in after and differs only by an arbitrary deeply nested field in before",
|
||||
"file1": "before.yaml",
|
||||
"file2": "after.yaml",
|
||||
"expectedErrors": [
|
||||
"- seq: 2",
|
||||
"+ seq: 1"
|
||||
]
|
||||
}
|
||||
2
internal/compare/testdata/minimal/after.yaml
vendored
Normal file
2
internal/compare/testdata/minimal/after.yaml
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
version: v1alpha5
|
||||
kind: BuildPlan
|
||||
2
internal/compare/testdata/minimal/before.yaml
vendored
Normal file
2
internal/compare/testdata/minimal/before.yaml
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
version: v1alpha5
|
||||
kind: BuildPlan
|
||||
8
internal/compare/testdata/minimal/testcase.json
vendored
Normal file
8
internal/compare/testdata/minimal/testcase.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"exitCode": 0,
|
||||
"name": "MinimalBuildPlans",
|
||||
"msg": "minimal BuildPlans with same version and kind should match",
|
||||
"file1": "before.yaml",
|
||||
"file2": "after.yaml",
|
||||
"expectedErrors": []
|
||||
}
|
||||
7
internal/compare/testdata/missing-field/after.yaml
vendored
Normal file
7
internal/compare/testdata/missing-field/after.yaml
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: component
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: test.yaml
|
||||
9
internal/compare/testdata/missing-field/before.yaml
vendored
Normal file
9
internal/compare/testdata/missing-field/before.yaml
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: component
|
||||
labels:
|
||||
test: value
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: test.yaml
|
||||
8
internal/compare/testdata/missing-field/testcase.json
vendored
Normal file
8
internal/compare/testdata/missing-field/testcase.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"exitCode": 1,
|
||||
"name": "MissingFieldInTwo",
|
||||
"msg": "BuildPlan spec requirement 1&2: all field values must be equivalent - should fail when field exists in one but not two",
|
||||
"file1": "before.yaml",
|
||||
"file2": "after.yaml",
|
||||
"expectedErrors": ["- labels:"]
|
||||
}
|
||||
19
internal/compare/testdata/nested-diff/after.yaml
vendored
Normal file
19
internal/compare/testdata/nested-diff/after.yaml
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: component
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: test.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: test.yaml
|
||||
resources:
|
||||
Deployment:
|
||||
myapp:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: myapp
|
||||
spec:
|
||||
replicas: 5
|
||||
19
internal/compare/testdata/nested-diff/before.yaml
vendored
Normal file
19
internal/compare/testdata/nested-diff/before.yaml
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: component
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: test.yaml
|
||||
generators:
|
||||
- kind: Resources
|
||||
output: test.yaml
|
||||
resources:
|
||||
Deployment:
|
||||
myapp:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: myapp
|
||||
spec:
|
||||
replicas: 3
|
||||
8
internal/compare/testdata/nested-diff/testcase.json
vendored
Normal file
8
internal/compare/testdata/nested-diff/testcase.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"exitCode": 1,
|
||||
"name": "BuildPlan_3_Nested",
|
||||
"msg": "BuildPlan spec 3: Field f is equivalent when a.f exactly equals b.f, including nested objects recursively - should fail when nested values differ",
|
||||
"file1": "before.yaml",
|
||||
"file2": "after.yaml",
|
||||
"expectedErrors": ["int(3)", "int(5)"]
|
||||
}
|
||||
24
internal/compare/testdata/not-backwards-compatible/after.yaml
vendored
Normal file
24
internal/compare/testdata/not-backwards-compatible/after.yaml
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: component
|
||||
labels:
|
||||
holos.run/component.name: component
|
||||
holos.run/stack.name: demo
|
||||
annotations:
|
||||
holos.run/purpose: example
|
||||
holos.run/environment: prod
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: component.yaml
|
||||
generators:
|
||||
- kind: Kubernetes
|
||||
output: manifests.yaml
|
||||
resources:
|
||||
- name: deployment
|
||||
namespace: default
|
||||
transformers:
|
||||
- kind: SetLabels
|
||||
labels:
|
||||
app: demo
|
||||
17
internal/compare/testdata/not-backwards-compatible/before.yaml
vendored
Normal file
17
internal/compare/testdata/not-backwards-compatible/before.yaml
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: component
|
||||
labels:
|
||||
holos.run/component.name: component
|
||||
# Missing holos.run/stack.name
|
||||
# Missing annotations
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: component.yaml
|
||||
generators:
|
||||
- kind: Kubernetes
|
||||
output: manifests.yaml
|
||||
# Missing resources
|
||||
# Missing transformers
|
||||
15
internal/compare/testdata/not-backwards-compatible/testcase.json
vendored
Normal file
15
internal/compare/testdata/not-backwards-compatible/testcase.json
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"exitCode": 1,
|
||||
"name": "BuildPlan_4_NotBackwards",
|
||||
"msg": "BuildPlan spec 4: after and before must have exactly the same fields when isBackwardsCompatible is false - should fail when after has additional fields",
|
||||
"file1": "before.yaml",
|
||||
"file2": "after.yaml",
|
||||
"expectedErrors": [
|
||||
"+ annotations: map[string]any{\"holos.run/environment\": string(\"prod\"), \"holos.run/purpose\": string(\"example\")}",
|
||||
"+ holos.run/stack.name: demo",
|
||||
"+ resources: []any{map[string]any{\"name\": string(\"deployment\"), \"namespace\": string(\"default\")}}",
|
||||
"+ transformers: []any{",
|
||||
"+ map[string]any{\"kind: SetLabels\"), \"labels\": map[string]any{\"app\": string(\"demo\")}}"
|
||||
],
|
||||
"isBackwardsCompatible": false
|
||||
}
|
||||
13
internal/compare/testdata/null-empty/after.yaml
vendored
Normal file
13
internal/compare/testdata/null-empty/after.yaml
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: component
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: component.yaml
|
||||
generators:
|
||||
- kind: Kubernetes
|
||||
output: manifests.yaml
|
||||
resources: []
|
||||
transformers: []
|
||||
13
internal/compare/testdata/null-empty/before.yaml
vendored
Normal file
13
internal/compare/testdata/null-empty/before.yaml
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: component
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: component.yaml
|
||||
generators:
|
||||
- kind: Kubernetes
|
||||
output: manifests.yaml
|
||||
resources: null
|
||||
transformers: null
|
||||
8
internal/compare/testdata/null-empty/testcase.json
vendored
Normal file
8
internal/compare/testdata/null-empty/testcase.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"exitCode": 0,
|
||||
"name": "BuildPlan_6.2",
|
||||
"msg": "BuildPlan spec 6.2: List type fields with a null value are equivalent to empty values ([]) - should match when one is null and other is empty array",
|
||||
"file1": "before.yaml",
|
||||
"file2": "after.yaml",
|
||||
"expectedErrors": []
|
||||
}
|
||||
13
internal/compare/testdata/null-list/after.yaml
vendored
Normal file
13
internal/compare/testdata/null-list/after.yaml
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: component
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: component.yaml
|
||||
generators:
|
||||
- kind: Kubernetes
|
||||
output: manifests.yaml
|
||||
resources: null
|
||||
transformers: null
|
||||
13
internal/compare/testdata/null-list/before.yaml
vendored
Normal file
13
internal/compare/testdata/null-list/before.yaml
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: component
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: component.yaml
|
||||
generators:
|
||||
- kind: Kubernetes
|
||||
output: manifests.yaml
|
||||
resources: null
|
||||
transformers: null
|
||||
8
internal/compare/testdata/null-list/testcase.json
vendored
Normal file
8
internal/compare/testdata/null-list/testcase.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"exitCode": 0,
|
||||
"name": "BuildPlan_6.1",
|
||||
"msg": "BuildPlan spec 6.1: List type fields with a null value are equivalent to null values - should match when both are null",
|
||||
"file1": "before.yaml",
|
||||
"file2": "after.yaml",
|
||||
"expectedErrors": []
|
||||
}
|
||||
11
internal/compare/testdata/null-missing/after.yaml
vendored
Normal file
11
internal/compare/testdata/null-missing/after.yaml
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: component
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: component.yaml
|
||||
generators:
|
||||
- kind: Kubernetes
|
||||
output: manifests.yaml
|
||||
13
internal/compare/testdata/null-missing/before.yaml
vendored
Normal file
13
internal/compare/testdata/null-missing/before.yaml
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: component
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: component.yaml
|
||||
generators:
|
||||
- kind: Kubernetes
|
||||
output: manifests.yaml
|
||||
resources: null
|
||||
transformers: null
|
||||
8
internal/compare/testdata/null-missing/testcase.json
vendored
Normal file
8
internal/compare/testdata/null-missing/testcase.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"exitCode": 0,
|
||||
"name": "BuildPlan_6.3",
|
||||
"msg": "BuildPlan spec 6.3: List type fields with a null value are equivalent to a missing field - should match when one is null and other is missing",
|
||||
"file1": "before.yaml",
|
||||
"file2": "after.yaml",
|
||||
"expectedErrors": []
|
||||
}
|
||||
26
internal/compare/testdata/same-names/after.yaml
vendored
Normal file
26
internal/compare/testdata/same-names/after.yaml
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: component
|
||||
labels:
|
||||
holos.run/stack.name: stack-b
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: component-b.yaml
|
||||
generators:
|
||||
- kind: Kubernetes
|
||||
output: manifests.yaml
|
||||
---
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: component
|
||||
labels:
|
||||
holos.run/stack.name: stack-a
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: component-a.yaml
|
||||
generators:
|
||||
- kind: Kubernetes
|
||||
output: manifests.yaml
|
||||
26
internal/compare/testdata/same-names/before.yaml
vendored
Normal file
26
internal/compare/testdata/same-names/before.yaml
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: component
|
||||
labels:
|
||||
holos.run/stack.name: stack-a
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: component-a.yaml
|
||||
generators:
|
||||
- kind: Kubernetes
|
||||
output: manifests.yaml
|
||||
---
|
||||
kind: BuildPlan
|
||||
apiVersion: v1alpha5
|
||||
metadata:
|
||||
name: component
|
||||
labels:
|
||||
holos.run/stack.name: stack-b
|
||||
spec:
|
||||
artifacts:
|
||||
- artifact: component-b.yaml
|
||||
generators:
|
||||
- kind: Kubernetes
|
||||
output: manifests.yaml
|
||||
8
internal/compare/testdata/same-names/testcase.json
vendored
Normal file
8
internal/compare/testdata/same-names/testcase.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"exitCode": 0,
|
||||
"name": "BuildPlanValid_2",
|
||||
"msg": "BuildPlan File validity 2: Two objects may have the same value for the metadata.name field - should match when objects have same names but different content",
|
||||
"file1": "before.yaml",
|
||||
"file2": "after.yaml",
|
||||
"expectedErrors": []
|
||||
}
|
||||
5
internal/compare/testdata/streams/after.yaml
vendored
Normal file
5
internal/compare/testdata/streams/after.yaml
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
version: v1alpha5
|
||||
kind: BuildPlan
|
||||
---
|
||||
version: v1alpha6
|
||||
kind: BuildPlan
|
||||
5
internal/compare/testdata/streams/before.yaml
vendored
Normal file
5
internal/compare/testdata/streams/before.yaml
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
version: v1alpha5
|
||||
kind: BuildPlan
|
||||
---
|
||||
version: v1alpha6
|
||||
kind: BuildPlan
|
||||
8
internal/compare/testdata/streams/testcase.json
vendored
Normal file
8
internal/compare/testdata/streams/testcase.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"exitCode": 0,
|
||||
"name": "SameOrderBuildPlans",
|
||||
"msg": "File spec requirements 1&2: each BuildPlan must match exactly once - should match when in same order",
|
||||
"file1": "before.yaml",
|
||||
"file2": "after.yaml",
|
||||
"expectedErrors": []
|
||||
}
|
||||
5
internal/compare/testdata/streams2/after.yaml
vendored
Normal file
5
internal/compare/testdata/streams2/after.yaml
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
version: v1alpha6
|
||||
kind: BuildPlan
|
||||
---
|
||||
version: v1alpha5
|
||||
kind: BuildPlan
|
||||
5
internal/compare/testdata/streams2/before.yaml
vendored
Normal file
5
internal/compare/testdata/streams2/before.yaml
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
version: v1alpha5
|
||||
kind: BuildPlan
|
||||
---
|
||||
version: v1alpha6
|
||||
kind: BuildPlan
|
||||
8
internal/compare/testdata/streams2/testcase.json
vendored
Normal file
8
internal/compare/testdata/streams2/testcase.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"exitCode": 0,
|
||||
"name": "OutOfOrderBuildPlans",
|
||||
"msg": "File spec requirement 2: each BuildPlan must be equivalent to exactly one unique BuildPlan - should match when out of order",
|
||||
"file1": "before.yaml",
|
||||
"file2": "after.yaml",
|
||||
"expectedErrors": []
|
||||
}
|
||||
15
internal/compare/testdata/streams3/after.yaml
vendored
Normal file
15
internal/compare/testdata/streams3/after.yaml
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
version: v1alpha5
|
||||
kind: BuildPlan
|
||||
metadata:
|
||||
name: duplicated
|
||||
labels:
|
||||
label3: value3
|
||||
label4: value4
|
||||
---
|
||||
version: v1alpha5
|
||||
kind: BuildPlan
|
||||
metadata:
|
||||
name: duplicated
|
||||
labels:
|
||||
label1: value1
|
||||
label2: value2
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user