Repository navigation
Add triggers for stream connectors #389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+1,772
−325
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
66ccecc
start trigger project
tanguyvda a346486
update all stream connectors with sc_trigger
tanguyvda 4a9748f
add func to load execute trigger file
tanguyvda e60e4c9
add first trigger in sc_flush
tanguyvda 59a98d7
fix bugs
tanguyvda 3f48e9b
add generic sc_storage triggers
tanguyvda ac59098
add sc_flush functions
tanguyvda 4ee19ac
add triggers for every stream connector and finally fix formated typo
tanguyvda d8ddfd2
fix bad valid_category and valid_event_types string used in logs
tanguyvda 5f5a8dc
update existing docs
tanguyvda ddc6044
fix typo leading to undefined sc_trigger for sc_storage
tanguyvda 0600572
add documentations
tanguyvda 514b764
add expected_return_type verification when needed
tanguyvda ae4fd32
add full event table to on-event-add trigger
tanguyvda c855957
update CI to test stream connectors with the updated library, and del…
sdepassio 4b754fd
fixes, removing unneeded declarations and renaming varaibles
sdepassio 728e580
update doc after fixes, and add tests for sc_trigger in the ci librar…
sdepassio 423556f
Merge branch 'develop' into CTOR-2525_add_trigger_mechanism
tanguyvda File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,86 @@ | ||
| name: stream-connectors-ci | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
| cancel-in-progress: true | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| pull_request: | ||
| paths: | ||
| - '.github/workflows/stream-connectors-ci.yml' | ||
| - '.github/workflows/stream-connectors-lib.yml' | ||
| - 'packaging/connectors-lib/**' | ||
| - 'modules/centreon-stream-connectors-lib/**' | ||
| - '.github/workflows/stream-connectors.yml' | ||
| - 'centreon-certified/**' | ||
| - 'packaging/connectors/**' | ||
| push: | ||
| branches: | ||
| - develop | ||
| - master | ||
| paths: | ||
| - '.github/workflows/stream-connectors-ci.yml' | ||
| - '.github/workflows/stream-connectors-lib.yml' | ||
| - 'packaging/connectors-lib/**' | ||
| - 'modules/centreon-stream-connectors-lib/**' | ||
| - '.github/workflows/stream-connectors.yml' | ||
| - 'centreon-certified/**' | ||
| - 'packaging/connectors/**' | ||
|
|
||
| jobs: | ||
| dependency-scan: | ||
| uses: centreon/security-tools/.github/workflows/dependency-analysis.yml@main | ||
|
|
||
| detect-changes: | ||
| needs: [dependency-scan] | ||
| runs-on: ubuntu-24.04 | ||
| outputs: | ||
| # a manual run builds and tests both the library and the stream connectors | ||
| lib: ${{ github.event_name == 'workflow_dispatch' && 'true' || steps.filter.outputs.lib }} | ||
|
tanguyvda marked this conversation as resolved.
|
||
| connectors: ${{ github.event_name == 'workflow_dispatch' && 'true' || steps.filter.outputs.connectors }} | ||
| steps: | ||
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
|
|
||
| - if: ${{ github.event_name != 'workflow_dispatch' }} | ||
| uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1 | ||
| id: filter | ||
| with: | ||
| base: ${{ github.ref }} | ||
| filters: | | ||
| lib: | ||
| - .github/workflows/stream-connectors-ci.yml | ||
| - .github/workflows/stream-connectors-lib.yml | ||
| - packaging/connectors-lib/** | ||
| - modules/centreon-stream-connectors-lib/** | ||
| connectors: | ||
| - .github/workflows/stream-connectors-ci.yml | ||
| - .github/workflows/stream-connectors.yml | ||
| - centreon-certified/** | ||
| - packaging/connectors/** | ||
|
|
||
| stream-connectors-lib: | ||
| needs: [detect-changes] | ||
| if: ${{ needs.detect-changes.outputs.lib == 'true' }} | ||
| uses: ./.github/workflows/stream-connectors-lib.yml | ||
| secrets: inherit | ||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
| pull-requests: read | ||
|
|
||
| # when the library has been rebuilt in this run, the stream connectors are tested | ||
| # against those freshly built packages instead of the ones from the repositories. | ||
| # A library change tests all the stream connectors, but only the changed ones are delivered | ||
| stream-connectors: | ||
| needs: [detect-changes, stream-connectors-lib] | ||
| if: ${{ !cancelled() && (needs.detect-changes.outputs.connectors == 'true' || needs.detect-changes.outputs.lib == 'true') && needs.stream-connectors-lib.result != 'failure' }} | ||
|
tanguyvda marked this conversation as resolved.
|
||
| uses: ./.github/workflows/stream-connectors.yml | ||
| with: | ||
| use_local_lib: ${{ needs.stream-connectors-lib.result == 'success' }} | ||
| test_all_connectors: ${{ needs.detect-changes.outputs.lib == 'true' }} | ||
| secrets: inherit | ||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
| pull-requests: read | ||
This file contains hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.