Skip to content

Commit 618cc11

Browse files
CSPL-3688: Update Prerelease Workflow (#1502)
* add more automation to pre-release workflow * update version and replaced version in bundle files * update dockerfile sok version, not enterprise version * fix typo
1 parent 3eea678 commit 618cc11

File tree

1 file changed

+41
-1
lines changed

1 file changed

+41
-1
lines changed

.github/workflows/pre-release-workflow.yml

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,14 @@ jobs:
141141
exclude: "ChangeLog.md"
142142
include: "**.md"
143143
144+
- name: Update Splunk Operator Version in Dockerfile
145+
if: github.event.inputs.old_operator_version != github.event.inputs.new_operator_version
146+
uses: jacobtomlinson/gha-find-replace@v3
147+
with:
148+
find: "${{ github.event.inputs.old_operator_version }}"
149+
replace: "${{ github.event.inputs.new_operator_version }}"
150+
include: "Dockerfile"
151+
144152
- name: Update Splunk Enterprise Image in operator.yaml
145153
if: github.event.inputs.old_enterprise_version != github.event.inputs.new_enterprise_version
146154
uses: jacobtomlinson/gha-find-replace@v3
@@ -195,10 +203,42 @@ jobs:
195203
mv splunk-enterprise-${{ github.event.inputs.new_operator_version }}.tgz docs/
196204
helm repo index --url https://splunk.github.io/splunk-operator/ docs/
197205
198-
- name: Reset go.mod and go.sum before creating Pull Request
206+
- name: Set spec fields to {} in bundle
207+
uses: jacobtomlinson/gha-find-replace@v3
208+
with:
209+
find: "\"spec\": null"
210+
replace: "\"spec\": {}"
211+
include: "bundle/manifests/splunk-operator.clusterserviceversion.yaml"
212+
213+
- name: Update Splunk Operator Release Version in bundle
214+
uses: jacobtomlinson/gha-find-replace@v3
215+
with:
216+
find: "${{ github.event.inputs.old_operator_version }}"
217+
replace: "${{ github.event.inputs.new_operator_version }}"
218+
exclude: "index.yaml"
219+
include: "**.yaml"
220+
221+
- name: Update Replaced Splunk Operator Version in bundle
222+
uses: jacobtomlinson/gha-find-replace@v3
223+
with:
224+
find: "replaces:.*"
225+
replace: "replaces: splunk-operator.v${{ github.event.inputs.old_operator_version }}"
226+
exclude: "index.yaml"
227+
include: "**.yaml"
228+
229+
- name: Reset Splunk Enterprise Image in kustomization.yaml
230+
uses: jacobtomlinson/gha-find-replace@v3
231+
with:
232+
find: "docker.io/splunk/splunk:${{ github.event.inputs.new_enterprise_version }}"
233+
replace: "SPLUNK_ENTERPRISE_IMAGE"
234+
include: "config/default/kustomization.yaml"
235+
236+
- name: Reset files before creating Pull Request
199237
run: |
200238
git checkout go.sum
201239
git checkout go.mod
240+
git checkout bundle.Dockerfile
241+
git checkout bundle/metadata/annotations.yaml
202242
git status
203243
204244
- name: Create Pull Request

0 commit comments

Comments
 (0)