|
| 1 | +--- |
| 2 | +name: Bump elastic-stack versions |
| 3 | +pipelineid: 'bump-elastic-stack-version' |
| 4 | + |
| 5 | +actions: |
| 6 | + default: |
| 7 | + title: '[updatecli] update elastic stack version for testing {{ source "latestVersion" }}' |
| 8 | + kind: github/pullrequest |
| 9 | + scmid: default |
| 10 | + spec: |
| 11 | + labels: |
| 12 | + - automation |
| 13 | + - dependency |
| 14 | + |
| 15 | +scms: |
| 16 | + default: |
| 17 | + kind: github |
| 18 | + spec: |
| 19 | + owner: '{{ .scm.owner }}' |
| 20 | + repository: '{{ .scm.repository }}' |
| 21 | + user: '{{ requiredEnv "GITHUB_ACTOR" }}' |
| 22 | + token: '{{ requiredEnv "GITHUB_TOKEN" }}' |
| 23 | + commitusingapi: true |
| 24 | + |
| 25 | +sources: |
| 26 | + latestSnapshot: |
| 27 | + name: Get latest snapshot build |
| 28 | + kind: json |
| 29 | + spec: |
| 30 | + file: https://storage.googleapis.com/artifacts-api/snapshots/main.json |
| 31 | + key: .build_id |
| 32 | + latest7xSnapshot: |
| 33 | + name: Get latest 7.x snapshot build |
| 34 | + kind: json |
| 35 | + spec: |
| 36 | + file: https://storage.googleapis.com/artifacts-api/snapshots/7.17.json |
| 37 | + key: .build_id |
| 38 | + latest8xVersion: |
| 39 | + name: Get latest 8.x version |
| 40 | + kind: file |
| 41 | + transformers: |
| 42 | + # Get only the version to avoid spaces and newlines. |
| 43 | + - findsubmatch: |
| 44 | + pattern: '([0-9\.]+)' |
| 45 | + captureindex: 1 |
| 46 | + spec: |
| 47 | + file: https://storage.googleapis.com/artifacts-api/releases/current/8 |
| 48 | + latestRegistryVersion: |
| 49 | + name: Get latest Package Registry version |
| 50 | + kind: json |
| 51 | + spec: |
| 52 | + file: https://api.github.com/repos/elastic/package-registry/releases/latest |
| 53 | + key: .tag_name |
| 54 | + |
| 55 | +targets: |
| 56 | + update-snapshot: |
| 57 | + name: "Update snapshot" |
| 58 | + kind: file |
| 59 | + sourceid: latestSnapshot |
| 60 | + scmid: default |
| 61 | + spec: |
| 62 | + file: Makefile |
| 63 | + matchpattern: '(./scripts/test-stack-command.sh) 8\.[^\s]+-SNAPSHOT' |
| 64 | + replacepattern: '$1 {{ source "latestSnapshot" }}-SNAPSHOT' |
| 65 | + update-7x-version: |
| 66 | + name: "Update 7.x version" |
| 67 | + kind: file |
| 68 | + sourceid: latest7xSnapshot |
| 69 | + scmid: default |
| 70 | + spec: |
| 71 | + file: Makefile |
| 72 | + matchpattern: '(./scripts/test-stack-command.sh) 7\.17\.[^\s]*' |
| 73 | + replacepattern: '$1 {{ source "latest7xSnapshot" }}-SNAPSHOT' |
| 74 | + update-default-version: |
| 75 | + name: "Update default version" |
| 76 | + kind: file |
| 77 | + sourceid: latest8xVersion |
| 78 | + scmid: default |
| 79 | + spec: |
| 80 | + file: internal/install/stack_version.go |
| 81 | + matchpattern: '(DefaultStackVersion =) "[^"]+"' |
| 82 | + replacepattern: '$1 "{{ source "latest8xVersion" }}"' |
| 83 | + update-package-registry-base-image: |
| 84 | + name: "Update Package Registry base image" |
| 85 | + kind: file |
| 86 | + sourceid: latestRegistryVersion |
| 87 | + scmid: default |
| 88 | + spec: |
| 89 | + file: internal/stack/resources.go |
| 90 | + matchpattern: '"(docker.elastic.co/package-registry/package-registry):v[0-9\.]+"' |
| 91 | + replacepattern: '"$1:{{ source "latestRegistryVersion" }}"' |
0 commit comments