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

Merge 4.10.2 into master #7202

Merged
merged 8 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Unzip command not found in package generation action (#7180)
* Add install unzip command

* Fix unzip command

* Escalate root user privileges

* Fix unzip command path

* Unzip in dockefile

* Change for loop

* Change for loop

* add ls -la

* Change test plugins path

* change ls

* change folder name

* Comment the unzip process

* Clean code

* Format artifact name with slash

* Implement githubReference

* Test set -e

* Remove set -e test
  • Loading branch information
asteriscos authored and Desvelao committed Dec 16, 2024
commit 0a82897dce265915f0085307e801a81d1fa63f7c
2 changes: 1 addition & 1 deletion .github/workflows/dev-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ jobs:
if: ${{ inputs.artifact_name && inputs.artifact_path }}
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.artifact_name }}_${{ env.version }}-${{ env.revision }}_${{ env.githubReference }}.zip
name: ${{ inputs.artifact_name }}_${{ matrix.plugins.container_path }}_${{ env.version }}-${{ env.revision }}_${{ env.githubReference }}.zip
path: ${{ matrix.plugins.path }}/${{ inputs.artifact_path }}
if-no-files-found: 'error'
overwrite: true
Expand Down
22 changes: 18 additions & 4 deletions .github/workflows/manual-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,28 @@ jobs:
echo "revision=$(jq -r '.revision' $(pwd)/wazuh/plugins/main/package.json)" >> $GITHUB_ENV
echo "versionPlatform=$(jq -r '.pluginPlatform.version' $(pwd)/wazuh/plugins/main/package.json)" >> $GITHUB_ENV

- name: Step 03 - Download the plugin's source code
- name: Step 03 - Download the main plugin's artifact
uses: actions/download-artifact@v4
with:
name: wazuh-dashboard-plugins_${{ env.version }}-${{ env.revision }}_${{ env.githubReference }}.zip
path: ${{ env.currentDir }}/wazuh/scripts/test-packages/wazuh-dashboard-plugins_${{ env.version }}-${{ env.revision }}_${{ env.githubReference }}.zip
name: wazuh-dashboard-plugins_wazuh_${{ env.version }}-${{ env.revision }}_${{ env.githubReference }}.zip
path: ${{ env.currentDir }}/wazuh/scripts/test-packages/plugins/wazuh-dashboard-plugins_wazuh_${{ env.version }}-${{ env.revision }}_${{ env.githubReference }}.zip
overwrite: true

- name: Step 04 - Build the Docker image
- name: Step 04 - Download the core plugin's artifact
uses: actions/download-artifact@v4
with:
name: wazuh-dashboard-plugins_wazuh-core_${{ env.version }}-${{ env.revision }}_${{ env.githubReference }}.zip
path: ${{ env.currentDir }}/wazuh/scripts/test-packages/plugins/wazuh-dashboard-plugins_wazuh-core_${{ env.version }}-${{ env.revision }}_${{ env.githubReference }}.zip
overwrite: true

- name: Step 05 - Download the check-updates plugin's artifact
uses: actions/download-artifact@v4
with:
name: wazuh-dashboard-plugins_wazuh-check-updates_${{ env.version }}-${{ env.revision }}_${{ env.githubReference }}.zip
path: ${{ env.currentDir }}/wazuh/scripts/test-packages/plugins/wazuh-dashboard-plugins_wazuh-check-updates_${{ env.version }}-${{ env.revision }}_${{ env.githubReference }}.zip
overwrite: true

- name: Step 06 - Build the Docker image
run: |
echo "current=${{ env.currentDir }}"
cd ./wazuh/scripts/test-packages
Expand Down
8 changes: 5 additions & 3 deletions scripts/test-packages/install-plugins.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
plugins=$(ls /tmp)
echo $plugins
set -e

plugins=$(ls /tmp)
for plugin in $plugins; do
echo $plugin
/usr/share/opensearch-dashboards/bin/opensearch-dashboards-plugin install file:///tmp/$plugin
/usr/share/opensearch-dashboards/bin/opensearch-dashboards-plugin install file:///tmp/$plugin/$(ls /tmp/$plugin)
done
echo "All plugins installed successfully"
1 change: 0 additions & 1 deletion scripts/test-packages/osd-test-packages.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ ADD ./${PACKAGE_NAME} /tmp/
COPY --chown=opensearch-dashboards ./install-plugins.sh /
RUN chmod +x /install-plugins.sh
RUN /install-plugins.sh