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

Review the action of building packages arm #439

Merged
merged 14 commits into from
Dec 16, 2024
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit Hold shift + click to select a range
d6e437d
Update WAZUH_DASHBOARD_SLIM filename based on architecture in build w…
guidomodarelli Dec 9, 2024
9b0ca41
Comment out AWS CLI setup and package verification steps in the build…
guidomodarelli Dec 9, 2024
506dd39
Fix copy command in build workflow to remove unnecessary 'ls' command…
guidomodarelli Dec 9, 2024
ca6ff89
Add debugging 'ls' command to check dev-tools directory in Wazuh Dash…
guidomodarelli Dec 9, 2024
5e28337
Update 'ls' command in build workflow to point to the correct output …
guidomodarelli Dec 10, 2024
6e9ada4
Add support for aarch64 architecture option in build-packages script …
guidomodarelli Dec 10, 2024
01906e3
Remove aarch64 option from build-packages script, streamlining archit…
guidomodarelli Dec 10, 2024
e6f94ec
Enhance build workflow by including ARCHITECTURE_FLAG for handling ar…
guidomodarelli Dec 10, 2024
42a9f38
Refactor build workflow to remove ARCHITECTURE_FLAG, simplifying pack…
guidomodarelli Dec 10, 2024
dbcc902
Add artifact upload step in build workflow for package outputs, impro…
guidomodarelli Dec 10, 2024
e79e3fd
Revert "Add artifact upload step in build workflow for package output…
guidomodarelli Dec 12, 2024
b218461
Revert "Comment out AWS CLI setup and package verification steps in t…
guidomodarelli Dec 12, 2024
89e0186
Merge branch '4.10.2' into bug/438-review-the-action-of-building-pack…
Tostti Dec 16, 2024
6f7fdda
Fix S3 upload paths in Wazuh dashboard build workflow to ensure corre…
guidomodarelli Dec 16, 2024
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
17 changes: 12 additions & 5 deletions .github/workflows/build_wazuh_dashboard_with_plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ jobs:
WAZUH_PLUGINS_CORE: ${{ steps.setup-variables.outputs.WAZUH_PLUGINS_CORE }}
WAZUH_PLUGINS_CHECK_UPDATES: ${{ steps.setup-variables.outputs.WAZUH_PLUGINS_CHECK_UPDATES }}
PACKAGE_NAME: ${{ steps.setup-variables.outputs.PACKAGE_NAME }}
ARCHITECTURE_FLAG: ${{ steps.setup-variables.outputs.ARCHITECTURE_FLAG }}
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down Expand Up @@ -142,6 +143,11 @@ jobs:
PACKAGE_NAME=wazuh-dashboard_${VERSION}-${{ inputs.revision }}_${{ inputs.architecture }}_${COMMIT_SHA}.rpm
fi
fi
if [[ "${{ inputs.architecture }}" == "x86_64" || "${{ inputs.architecture }}" == "amd64" ]]; then
ARCHITECTURE_FLAG=""
else
ARCHITECTURE_FLAG=--arm
fi
echo "CURRENT_DIR=$CURRENT_DIR" >> $GITHUB_OUTPUT
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
echo "REVISION=$REVISION" >> $GITHUB_OUTPUT
Expand All @@ -153,6 +159,7 @@ jobs:
echo "WAZUH_PLUGINS_CORE=$WAZUH_PLUGINS_CORE" >> $GITHUB_OUTPUT
echo "WAZUH_PLUGINS_CHECK_UPDATES=$WAZUH_PLUGINS_CHECK_UPDATES" >> $GITHUB_OUTPUT
echo "PACKAGE_NAME=$PACKAGE_NAME" >> $GITHUB_OUTPUT
echo "ARCHITECTURE_FLAG=$ARCHITECTURE_FLAG" >> $GITHUB_OUTPUT

validate-job:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -252,7 +259,7 @@ jobs:
cd ${{ needs.setup-variables.outputs.CURRENT_DIR }}/dev-tools/build-packages
bash ./build-packages.sh \
-v ${{ needs.setup-variables.outputs.VERSION }} \
-r ${{ inputs.revision }} \
-r ${{ inputs.revision }} ${{ needs.setup-variables.outputs.ARCHITECTURE_FLAG }} \
-a file://${{needs.setup-variables.outputs.CURRENT_DIR}}/artifacts/wazuh-package.zip \
-s file://${{needs.setup-variables.outputs.CURRENT_DIR}}/artifacts/security-package.zip \
-b file://${{needs.setup-variables.outputs.CURRENT_DIR}}/artifacts/dashboard-package.zip \
Expand All @@ -261,8 +268,8 @@ jobs:
- name: Test package
run: |
cd ${{ needs.setup-variables.outputs.CURRENT_DIR }}/dev-tools/test-packages
ls -la ${{ needs.setup-variables.outputs.CURRENT_DIR }}/dev-tools/build-packages/output/${{ inputs.system }}
cp ${{ needs.setup-variables.outputs.CURRENT_DIR }}/dev-tools/build-packages/output/${{ inputs.system }}/${{needs.setup-variables.outputs.PACKAGE_NAME}} ${{ needs.setup-variables.outputs.CURRENT_DIR }}/dev-tools/test-packages/${{ inputs.system }}
ls -laR ${{ needs.setup-variables.outputs.CURRENT_DIR }}/dev-tools/build-packages/output
cp ${{ needs.setup-variables.outputs.CURRENT_DIR }}/dev-tools/build-packages/output/${{needs.setup-variables.outputs.PACKAGE_NAME}} ${{ needs.setup-variables.outputs.CURRENT_DIR }}/dev-tools/test-packages/${{ inputs.system }}
bash ./test-packages.sh \
-p ${{needs.setup-variables.outputs.PACKAGE_NAME}}

Expand All @@ -276,14 +283,14 @@ jobs:
- name: Upload package
run: |
echo "Uploading package"
aws s3 cp ${{ needs.setup-variables.outputs.CURRENT_DIR }}/dev-tools/build-packages/output/${{ inputs.system }}/${{needs.setup-variables.outputs.PACKAGE_NAME}} s3://packages-dev.internal.wazuh.com/development/wazuh/4.x/main/packages/
aws s3 cp ${{ needs.setup-variables.outputs.CURRENT_DIR }}/dev-tools/build-packages/output/${{needs.setup-variables.outputs.PACKAGE_NAME}} s3://packages-dev.internal.wazuh.com/development/wazuh/4.x/main/packages/
s3uri="s3://packages-dev.internal.wazuh.com/development/wazuh/4.x/main/packages/${{needs.setup-variables.outputs.PACKAGE_NAME}}"
echo "S3 URI: ${s3uri}"

- name: Upload SHA512
if: ${{ inputs.checksum }}
run: |
echo "Uploading checksum"
aws s3 cp ${{ needs.setup-variables.outputs.CURRENT_DIR }}/dev-tools/build-packages/output/${{ inputs.system }}/${{needs.setup-variables.outputs.PACKAGE_NAME}}.sha512 s3://packages-dev.internal.wazuh.com/development/wazuh/4.x/main/packages/
aws s3 cp ${{ needs.setup-variables.outputs.CURRENT_DIR }}/dev-tools/build-packages/output/${{needs.setup-variables.outputs.PACKAGE_NAME}}.sha512 s3://packages-dev.internal.wazuh.com/development/wazuh/4.x/main/packages/
s3uri="s3://packages-dev.internal.wazuh.com/development/wazuh/4.x/main/packages/${{needs.setup-variables.outputs.PACKAGE_NAME}}.sha512"
echo "S3 sha512 URI: ${s3uri}"
Loading