Skip to content

Commit dadc205

Browse files
authored
fix(pgo): fix the git diff and change the e2e tests (#83)
* test: pgo * fix diff * Update updatecli/policies/apm-managed-service/pgo/testdata/values.yaml
1 parent da73cb7 commit dadc205

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed
File renamed without changes.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 0.2.0
4+
5+
* Support new files diff
6+
37
## 0.1.0
48

59
* Init policy

updatecli/policies/apm-managed-service/pgo/Policy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ url: "https://github.com/elastic/oblt-updatecli-policies/"
55
changelog: "https://github.com/elastic/oblt-updatecli-policies/tree/main/updatecli/policies/apm-managed-service/pgo/CHANGELOG.md"
66
documentation: "https://github.com/elastic/oblt-updatecli-policies/tree/main/updatecli/policies/apm-managed-service/pgo/README.md"
77
source: "https://github.com/elastic/oblt-updatecli-policies/tree/main/updatecli/policies/apm-managed-service/pgo/"
8-
version: 0.1.0
8+
version: 0.2.0
99
vendor: Elastic Project
1010

1111
licenses:

updatecli/policies/apm-managed-service/pgo/testdata/values.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ scm:
66
branch: main
77
commitusingapi: true
88

9-
# use one existing file until the pgo file is in the repository.
10-
pgo_file: pgo.log
9+
pgo_file: default.pgo
1110
pgo_target_path: ./tests/apm-managed-service/pgo
12-
pgo_source_repo: observability-robots-playground
11+
pgo_source_repo: apm-managed-service
12+
pgo_source_path: ./pgo/apm-ingest-service

updatecli/policies/apm-managed-service/pgo/updatecli.d/default.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ targets:
4545
spec:
4646
# git diff helps to print what it changed, If it is empty, then updatecli report a success with no changes applied.
4747
# See https://www.updatecli.io/docs/plugins/resource/shell/#_shell_target
48-
command: 'tar -xzf {{ requiredEnv "GITHUB_WORKSPACE" }}/pgo.tgz && git --no-pager diff'
48+
command: 'tar -xzf {{ requiredEnv "GITHUB_WORKSPACE" }}/pgo.tgz && git add -N {{ .pgo_file }} && git --no-pager diff'
4949
workdir: "{{ .pgo_target_path }}"
5050
#{{ if or (.scm.enabled) (env "GITHUB_REPOSITORY") }}
5151
scmid: default

0 commit comments

Comments
 (0)