Skip to content
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

Update build workflow to build indexer plugins #360

Merged
merged 28 commits into from
Aug 28, 2024

Conversation

AlexRuiz7
Copy link
Member

Description

This PR extends the capabilities of the build.yml workflow to build and assemble the wazuh-indexer plugins into the final distribution package.

Issues Resolved

Closes wazuh/wazuh-indexer-plugins#13

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Failing checks are inspected and point to the corresponding known issue(s) (See: Troubleshooting Failing Builds)
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)
  • Public documentation issue/PR created

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

artifacts
benchmarks
build
build.gradle
buildSrc
CHANGELOG.md
client
codecov.yml
CODE_OF_CONDUCT.md
CONTRIBUTING.md
DEVELOPER_GUIDE.md
dev-tools
distribution
docker
docs
doc-tools
ecs
gradle
gradle.properties
gradlew
gradlew.bat
integrations
libs
licenses
LICENSE.txt
MAINTAINERS.md
modules
NOTICE.txt
packaging_scripts
plugins
protobuf-java-NOTICE.txt
qa
README.md
release-notes
RELEASING.md
rest-api-spec
sandbox
SECURITY.md
server
settings.gradle
test
TESTING.md
Vagrantfile
VERSION
whitesource.config step
@AlexRuiz7 AlexRuiz7 self-assigned this Aug 21, 2024
@AlexRuiz7 AlexRuiz7 requested a review from a team as a code owner August 21, 2024 10:26
@AlexRuiz7 AlexRuiz7 linked an issue Aug 22, 2024 that may be closed by this pull request
3 tasks
@AlexRuiz7
Copy link
Member Author

Indexer plugins were built and installed correctly:

+ echo 'Installing Wazuh plugins'
+ local indexer_plugin_version=5.0.0.1
Installing Wazuh plugins
Plugin wazuh-indexer-setup not found in local maven repository. Searching on ./artifacts/plugins
/home/runner/work/wazuh-indexer/wazuh-indexer/artifacts/tmp/rpm
+ for plugin_name in "${wazuh_plugins[@]}"
+ local plugin_path=/home/runner/.m2/repository/org/wazuh/wazuh-indexer-setup-plugin/5.0.0.1/wazuh-indexer-setup-5.0.0.1.zip
+ '[' -z '' ']'
+ echo 'Plugin wazuh-indexer-setup not found in local maven repository. Searching on ./artifacts/plugins'
+ pwd
+ ls -lR ../../plugins
../../plugins:
total 12
-rw-r--r-- 1 runner docker 8269 Aug 23 12:31 wazuh-indexer-setup-5.0.0.1.zip
++ pwd
+ plugin_path=/home/runner/work/wazuh-indexer/wazuh-indexer/artifacts/tmp/rpm/../../plugins/wazuh-indexer-setup-5.0.0.1.zip
+ OPENSEARCH_PATH_CONF=./etc/wazuh-indexer
+ ./usr/share/wazuh-indexer/bin/opensearch-plugin install --batch --verbose file:/home/runner/work/wazuh-indexer/wazuh-indexer/artifacts/tmp/rpm/../../plugins/wazuh-indexer-setup-5.0.0.1.zip
-> Installing file:/home/runner/work/wazuh-indexer/wazuh-indexer/artifacts/tmp/rpm/../../plugins/wazuh-indexer-setup-5.0.0.1.zip
-> Downloading file:/home/runner/work/wazuh-indexer/wazuh-indexer/artifacts/tmp/rpm/../../plugins/wazuh-indexer-setup-5.0.0.1.zip
Retrieving zip from file:/home/runner/work/wazuh-indexer/wazuh-indexer/artifacts/tmp/rpm/../../plugins/wazuh-indexer-setup-5.0.0.1.zip
- Plugin information:
Name: wazuh-indexer-setup
Description: Wazuh Indexer setup plugin
Version: 5.0.0.1
OpenSearch Version: 2.15.0
Java Version: 11
Native Controller: false
Extended Plugins: []
 * Classname: org.wazuh.setup.WazuhIndexerSetupPlugin
Folder name: 
plugin has a policy file with no additional permissions

@AlexRuiz7 AlexRuiz7 merged commit 0bc3c43 into master Aug 28, 2024
5 checks passed
@AlexRuiz7 AlexRuiz7 deleted the feature/13-build-indexer-plugins branch August 28, 2024 15:27
AlexRuiz7 added a commit that referenced this pull request Sep 9, 2024
* Update build workflow to include Wazuh plugins

* Try new approach to build wazuh-indexer with plugins

* Remove old code

* Remove ADMINS.md
artifacts
benchmarks
build
build.gradle
buildSrc
CHANGELOG.md
client
codecov.yml
CODE_OF_CONDUCT.md
CONTRIBUTING.md
DEVELOPER_GUIDE.md
dev-tools
distribution
docker
docs
doc-tools
ecs
gradle
gradle.properties
gradlew
gradlew.bat
integrations
libs
licenses
LICENSE.txt
MAINTAINERS.md
modules
NOTICE.txt
packaging_scripts
plugins
protobuf-java-NOTICE.txt
qa
README.md
release-notes
RELEASING.md
rest-api-spec
sandbox
SECURITY.md
server
settings.gradle
test
TESTING.md
Vagrantfile
VERSION
whitesource.config step

* Sync mavel local path across jobs

* Fix versioning of wazuh-indexer-plugins

* Fix versioning of wazuh-indexer-plugins

* Pass version and revision to publishToMavenLocal

* Add version check test

* Format files

* Use upload-artifact and download-artifact to share the plugins' zips between jobs

* Add repo path

* Fix plugin name

* Roll back

* Remove exit 1

* Fix relative path to the plugins

* List plugins folder

* Fix relative path

* again

* Change relative path to absolute

* Clean code

* Update README.ms

* Apply naming convention

* Add breif steps to build wazuh-indexer with plugins

* Skip job to build plugins on no input

* Improve conditional

* Remove build-plugins job from build's job dependencies

* Roll back
AlexRuiz7 added a commit that referenced this pull request Nov 8, 2024
* Update build workflow to include Wazuh plugins

* Try new approach to build wazuh-indexer with plugins

* Remove old code

* Remove ADMINS.md
artifacts
benchmarks
build
build.gradle
buildSrc
CHANGELOG.md
client
codecov.yml
CODE_OF_CONDUCT.md
CONTRIBUTING.md
DEVELOPER_GUIDE.md
dev-tools
distribution
docker
docs
doc-tools
ecs
gradle
gradle.properties
gradlew
gradlew.bat
integrations
libs
licenses
LICENSE.txt
MAINTAINERS.md
modules
NOTICE.txt
packaging_scripts
plugins
protobuf-java-NOTICE.txt
qa
README.md
release-notes
RELEASING.md
rest-api-spec
sandbox
SECURITY.md
server
settings.gradle
test
TESTING.md
Vagrantfile
VERSION
whitesource.config step

* Sync mavel local path across jobs

* Fix versioning of wazuh-indexer-plugins

* Fix versioning of wazuh-indexer-plugins

* Pass version and revision to publishToMavenLocal

* Add version check test

* Format files

* Use upload-artifact and download-artifact to share the plugins' zips between jobs

* Add repo path

* Fix plugin name

* Roll back

* Remove exit 1

* Fix relative path to the plugins

* List plugins folder

* Fix relative path

* again

* Change relative path to absolute

* Clean code

* Update README.ms

* Apply naming convention

* Add breif steps to build wazuh-indexer with plugins

* Skip job to build plugins on no input

* Improve conditional

* Remove build-plugins job from build's job dependencies

* Roll back
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create workflow to build packages
1 participant