Skip to content

Commit 329c01e

Browse files
fix: publish conditions (#339)
Fix the issue where automated releases where not created due to incorrect conditions for pre-publish job. Tests: PR scenario: https://github.com/splunk/test-addonfactory-repo/actions/runs/11027730555 release scenario: https://github.com/splunk/test-addonfactory-repo/actions/runs/11028553116 custom version release: https://github.com/splunk/test-addonfactory-repo/actions/runs/11047251558 --------- Co-authored-by: kdoroszko-splunk <kdoroszko@splunk.com>
1 parent 2bea7c1 commit 329c01e

File tree

3 files changed

+31
-6
lines changed

3 files changed

+31
-6
lines changed

.github/pull_request_template.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
### Description
2+
3+
(PR description goes here)
4+
5+
### Checklist
6+
7+
- [ ] `README.md` has been updated or is not required
8+
- [ ] push trigger tests
9+
- [ ] manual release test
10+
- [ ] automated releaes test
11+
- [ ] pull request trigger tests
12+
- [ ] schedule trigger tests
13+
- [ ] workflow errors/warnings reviewed and addressed
14+
15+
### Testing done
16+
(for each selected checkbox, the corresponding test results link should be listed here)

.github/workflows/reusable-build-test-release.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2333,7 +2333,7 @@ jobs:
23332333
summary-scripted*
23342334
23352335
pre-publish:
2336-
if: ${{ !cancelled() && needs.validate-custom-version.result == 'success' }}
2336+
if: ${{ !cancelled() }}
23372337
# The following line will rename 'pre-publish' to 'pre-publish-not_main_pr' when PR is created towards main branch
23382338
# It is necessary to avoid confusion caused by githubactions considering pre-publish for both push to develop branch
23392339
# and pull_request to main branch events.
@@ -2376,11 +2376,8 @@ jobs:
23762376
exit 1
23772377
23782378
publish:
2379-
if: |
2380-
(!cancelled() && needs.pre-publish.result == 'success' && github.event_name != 'pull_request' && github.event_name != 'schedule') ||
2381-
(!cancelled() && needs.pre-publish.result == 'success' && github.event.inputs.custom-version != '' && needs.validate-custom-version.result == 'success')
2379+
if: ${{ !cancelled() && needs.pre-publish.result == 'success' && (github.event_name == 'push' || needs.validate-custom-version.result == 'success') }}
23822380
name: ${{ github.event.inputs.custom-version == '' && 'publish' || 'publish-custom-version' }}
2383-
23842381
needs:
23852382
- pre-publish
23862383
- validate-custom-version

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,25 @@ Workflow defines jobs which perform security code scanning, execute different ty
1717
* If bugfix release is needed:
1818
* make a change
1919
* test it
20+
* pull-request scenario
21+
* push scenario
22+
* release scenario (test-addonfactory-repository)
2023
* create a PR to the `main` branch
2124
* get all the approvals from the team
2225
* merge it using "squash commit" option
2326
* backport the change back to the `develop` branch
2427
* new version of the workflow is going to be released (v4.17.0 (before) -> v4.17.1 (after)) and it will automatically applied to all the repositories
2528

26-
# Troubleshooting for different workflow stages in GitHub Actions
29+
# Workflow jobs
30+
31+
## Inputs
32+
* marker - list of markers used to paralelize modinput tests
33+
* ui_marker - list of markers used to paralelize ui tests
34+
* custom-version - version used for release on manual workflow trigger
35+
* execute-tests-on-push-to-release - enable tests on release branch - default false
36+
* k8s-enfironment - k8s environment for testing
37+
* k8s-manifests-branch - k8s-manifests branch for testing
38+
* scripted-inputs-os-list - list of OSes used for scripted inputs tests
2739

2840
## General troubleshooting
2941

0 commit comments

Comments
 (0)