-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes bump elastic stack workflow (#1862)
Fix some issues found after running the workflow: - Enable execution by changing from diff to apply. - Each target is executed in a different updatecli run, so they create different PRs with more meaningful titles. - --experimental flag is required to use commitusingapi option. - Updated updatecli-action to latest version.
- Loading branch information
Showing
5 changed files
with
159 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
name: Bump 7.x test version | ||
pipelineid: 'bump-elastic-stack-7x-version' | ||
|
||
actions: | ||
default: | ||
title: '[updatecli] Update 7.x snapshot to {{ source "latest7xSnapshot" }}' | ||
kind: github/pullrequest | ||
scmid: default | ||
spec: | ||
labels: | ||
- automation | ||
- dependency | ||
|
||
scms: | ||
default: | ||
kind: github | ||
spec: | ||
owner: '{{ .scm.owner }}' | ||
repository: '{{ .scm.repository }}' | ||
user: '{{ requiredEnv "GITHUB_ACTOR" }}' | ||
token: '{{ requiredEnv "GITHUB_TOKEN" }}' | ||
commitusingapi: true | ||
branch: main | ||
|
||
sources: | ||
latest7xSnapshot: | ||
name: Get latest 7.x snapshot build | ||
kind: json | ||
spec: | ||
file: https://storage.googleapis.com/artifacts-api/snapshots/7.17.json | ||
key: .build_id | ||
|
||
targets: | ||
update-7x-version: | ||
name: '[updatecli] Update 7.x snapshot to {{ source "latest7xSnapshot" }}' | ||
kind: file | ||
sourceid: latest7xSnapshot | ||
scmid: default | ||
spec: | ||
file: Makefile | ||
matchpattern: '(./scripts/test-stack-command.sh) 7\.17\.[^\s]*' | ||
replacepattern: '$1 {{ source "latest7xSnapshot" }}-SNAPSHOT' |
43 changes: 43 additions & 0 deletions
43
.github/workflows/updatecli.d/bump-latest-snapshot-version.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
name: Bump latest elastic-stack test version | ||
pipelineid: 'bump-latest-elastic-stack-version' | ||
|
||
actions: | ||
default: | ||
title: '[updatecli] Update latest snapshot to {{ source "latestSnapshot" }}' | ||
kind: github/pullrequest | ||
scmid: default | ||
spec: | ||
labels: | ||
- automation | ||
- dependency | ||
|
||
scms: | ||
default: | ||
kind: github | ||
spec: | ||
owner: '{{ .scm.owner }}' | ||
repository: '{{ .scm.repository }}' | ||
user: '{{ requiredEnv "GITHUB_ACTOR" }}' | ||
token: '{{ requiredEnv "GITHUB_TOKEN" }}' | ||
commitusingapi: true | ||
branch: main | ||
|
||
sources: | ||
latestSnapshot: | ||
name: Get latest snapshot build | ||
kind: json | ||
spec: | ||
file: https://storage.googleapis.com/artifacts-api/snapshots/main.json | ||
key: .build_id | ||
|
||
targets: | ||
update-snapshot: | ||
name: '[updatecli] Update latest snapshot to {{ source "latestSnapshot" }}' | ||
kind: file | ||
sourceid: latestSnapshot | ||
scmid: default | ||
spec: | ||
file: Makefile | ||
matchpattern: '(./scripts/test-stack-command.sh) 8\.[^\s]+-SNAPSHOT' | ||
replacepattern: '$1 {{ source "latestSnapshot" }}-SNAPSHOT' |
43 changes: 43 additions & 0 deletions
43
.github/workflows/updatecli.d/bump-package-registry-version.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
name: Bump Package Registry version | ||
pipelineid: 'bump-package-registry-version' | ||
|
||
actions: | ||
default: | ||
title: '[updatecli] Update Package Registry base image to {{ source "latestRegistryVersion" }}' | ||
kind: github/pullrequest | ||
scmid: default | ||
spec: | ||
labels: | ||
- automation | ||
- dependency | ||
|
||
scms: | ||
default: | ||
kind: github | ||
spec: | ||
owner: '{{ .scm.owner }}' | ||
repository: '{{ .scm.repository }}' | ||
user: '{{ requiredEnv "GITHUB_ACTOR" }}' | ||
token: '{{ requiredEnv "GITHUB_TOKEN" }}' | ||
commitusingapi: true | ||
branch: main | ||
|
||
sources: | ||
latestRegistryVersion: | ||
name: Get latest Package Registry version | ||
kind: json | ||
spec: | ||
file: https://api.github.com/repos/elastic/package-registry/releases/latest | ||
key: .tag_name | ||
|
||
targets: | ||
update-package-registry-base-image: | ||
name: '[updatecli] Update Package Registry base image to {{ source "latestRegistryVersion" }}' | ||
kind: file | ||
sourceid: latestRegistryVersion | ||
scmid: default | ||
spec: | ||
file: internal/stack/resources.go | ||
matchpattern: '"(docker.elastic.co/package-registry/package-registry):v[0-9\.]+"' | ||
replacepattern: '"$1:{{ source "latestRegistryVersion" }}"' |