Skip to content

Commit

Permalink
feat: add updatecli configs for agent stack (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
obs-gh-alexlew authored Aug 29, 2024
1 parent eaf1265 commit 0222702
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 0 deletions.
32 changes: 32 additions & 0 deletions updatecli/internal/09_agent_major.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Bump Agent Chart Major Version
sources:
currentAgentChartVersion:
kind: helmchart
spec:
url: https://observeinc.github.io/helm-charts
name: agent
versionfilter:
kind: "latest"
conditions:
chartChanged:
name: "Check if charts/agent/ has changes"
kind: shell
spec:
command: git diff --quiet --name-only origin/main...HEAD -- charts/agent/ && git diff --quiet --name-only -- charts/agent/ && exit 1 || exit 0
disablesourceinput: true
breakingChanges:
name: "Check if commit message is a breaking change"
kind: shell
spec:
command: git log -1 --no-merges --pretty=%s | tail -n 1 | grep "BREAKING CHANGE"
disablesourceinput: true
targets:
updateAgentChartMajor:
name: "Bump Major Version"
kind: yaml
sourceid: currentAgentChartVersion
transformers:
- semverinc: "major"
spec:
file: "charts/agent/Chart.yaml"
key: "$.version"
38 changes: 38 additions & 0 deletions updatecli/internal/09_agent_minor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Bump Agent Chart Minor Version
sources:
currentAgentChartVersion:
kind: helmchart
spec:
url: https://observeinc.github.io/helm-charts
name: agent
versionfilter:
kind: "latest"
conditions:
chartChanged:
name: "Check if charts/agent/ has changes"
kind: shell
spec:
command: git diff --quiet --name-only origin/main...HEAD -- charts/agent/ && git diff --quiet --name-only -- charts/agent/ && exit 1 || exit 0
disablesourceinput: true
nonBreakingChanges:
name: "Check if commit is non-breaking"
kind: shell
spec:
command: git log -1 --no-merges --pretty=%s | tail -n 1 | grep -v "BREAKING CHANGE"
disablesourceinput: true
isAFeatCommit:
name: "Check if commit is a feature"
kind: shell
spec:
command: git log -1 --no-merges --pretty=%s | tail -n 1 | grep "feat"
disablesourceinput: true
targets:
updateAgentChartMinor:
name: "Bump Minor Version"
kind: yaml
sourceid: currentAgentChartVersion
transformers:
- semverinc: "minor"
spec:
file: "charts/agent/Chart.yaml"
key: "$.version"
38 changes: 38 additions & 0 deletions updatecli/internal/09_agent_patch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Bump Agent Chart Patch Version
sources:
currentAgentChartVersion:
kind: helmchart
spec:
url: https://observeinc.github.io/helm-charts
name: agent
versionfilter:
kind: "latest"
conditions:
chartChanged:
name: "Check if charts/agent/ has changes"
kind: shell
spec:
command: git diff --quiet --name-only origin/main...HEAD -- charts/agent/ && git diff --quiet --name-only -- charts/agent/ && exit 1 || exit 0
disablesourceinput: true
nonBreakingChanges:
name: "Check if commit is non-breaking"
kind: shell
spec:
command: git log -1 --no-merges --pretty=%s | tail -n 1 | grep -v "BREAKING CHANGE"
disablesourceinput: true
isAFixCommit:
name: "Check if commit is a fix"
kind: shell
spec:
command: git log -1 --no-merges --pretty=%s | tail -n 1 | grep "fix"
disablesourceinput: true
targets:
updateAgentChartPatch:
name: "Bump Patch Version"
kind: yaml
sourceid: currentAgentChartVersion
transformers:
- semverinc: "patch"
spec:
file: "charts/agent/Chart.yaml"
key: "$.version"

0 comments on commit 0222702

Please sign in to comment.