Skip to content

Commit

Permalink
Update build_wazuh_dashboard_with_plugins.yml
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Yenien Serrano <[email protected]>
  • Loading branch information
yenienserrano authored Dec 6, 2024
1 parent 6ef5647 commit 9ae039e
Showing 1 changed file with 42 additions and 35 deletions.
77 changes: 42 additions & 35 deletions .github/workflows/build_wazuh_dashboard_with_plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,24 +158,24 @@ jobs:
exit 1
fi
- name: Set up AWS CLI
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.CI_INTERNAL_DEVELOPMENT_BUCKET_USER_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.CI_INTERNAL_DEVELOPMENT_BUCKET_USER_SECRET_KEY }}
aws-region: ${{ secrets.CI_AWS_REGION }}
# - name: Set up AWS CLI
# uses: aws-actions/configure-aws-credentials@v4
# with:
# aws-access-key-id: ${{ secrets.CI_INTERNAL_DEVELOPMENT_BUCKET_USER_ACCESS_KEY }}
# aws-secret-access-key: ${{ secrets.CI_INTERNAL_DEVELOPMENT_BUCKET_USER_SECRET_KEY }}
# aws-region: ${{ secrets.CI_AWS_REGION }}

- name: Verify if package is already built
run: |
set +e
echo "Verifying package"
PACKAGE_NAME=${{ needs.setup-variables.outputs.PACKAGE_NAME }}
exists=$(aws s3 ls s3://packages-dev.internal.wazuh.com/development/wazuh/4.x/main/packages/$PACKAGE_NAME)
if [ -n "$exists" ]; then
echo "Package already exists"
exit 1
fi
set -e
# - name: Verify if package is already built
# run: |
# set +e
# echo "Verifying package"
# PACKAGE_NAME=${{ needs.setup-variables.outputs.PACKAGE_NAME }}
# exists=$(aws s3 ls s3://packages-dev.internal.wazuh.com/development/wazuh/4.x/main/packages/$PACKAGE_NAME)
# if [ -n "$exists" ]; then
# echo "Package already exists"
# exit 1
# fi
# set -e

build-base:
needs: [validate-job]
Expand Down Expand Up @@ -256,24 +256,31 @@ jobs:
bash ./test-packages.sh \
-p ${{needs.setup-variables.outputs.PACKAGE_NAME}}
- name: Set up AWS CLI
uses: aws-actions/configure-aws-credentials@v4
- uses: actions/upload-artifact@v3
if: success()
with:
aws-access-key-id: ${{ secrets.CI_INTERNAL_DEVELOPMENT_BUCKET_USER_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.CI_INTERNAL_DEVELOPMENT_BUCKET_USER_SECRET_KEY }}
aws-region: ${{ secrets.CI_AWS_REGION }}
name: ${{ needs.setup-variables.outputs.PACKAGE_NAME }}
path: ${{ needs.setup-variables.outputs.CURRENT_DIR }}/dev-tools/build-packages/output/${{ inputs.system }}/${{needs.setup-variables.outputs.PACKAGE_NAME}}
retention-days: 30

- 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/
s3uri="s3://packages-dev.internal.wazuh.com/development/wazuh/4.x/main/packages/${{needs.setup-variables.outputs.PACKAGE_NAME}}"
echo "S3 URI: ${s3uri}"
# - name: Set up AWS CLI
# uses: aws-actions/configure-aws-credentials@v4
# with:
# aws-access-key-id: ${{ secrets.CI_INTERNAL_DEVELOPMENT_BUCKET_USER_ACCESS_KEY }}
# aws-secret-access-key: ${{ secrets.CI_INTERNAL_DEVELOPMENT_BUCKET_USER_SECRET_KEY }}
# aws-region: ${{ secrets.CI_AWS_REGION }}

- 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/
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}"
# - 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/
# 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/
# 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}"

0 comments on commit 9ae039e

Please sign in to comment.