Skip to content

Commit

Permalink
Make upload to s3 optional (#384)
Browse files Browse the repository at this point in the history
  • Loading branch information
yenienserrano committed Oct 29, 2024
1 parent 9b080f7 commit e7b2b16
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
18 changes: 17 additions & 1 deletion .github/workflows/build_wazuh_dashboard_with_plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ on:
description: 'Set production nomenclature'
required: true
default: false
upload:
description: "Upload ?"
type: boolean
default: true
checksum:
type: boolean
description: 'Generate package checksum'
Expand Down Expand Up @@ -85,6 +89,9 @@ on:
type: boolean
required: true
default: false
upload:
type: boolean
default: true
checksum:
type: boolean
required: true
Expand Down Expand Up @@ -232,22 +239,31 @@ jobs:
bash ./test-packages.sh \
-p ${{env.PACKAGE_NAME}}
- uses: actions/upload-artifact@v3
if: success()
with:
name: ${{ env.PACKAGE_NAME }}
path: ${{ env.CURRENT_DIR }}/dev-tools/build-packages/output/${{ inputs.system }}/${{env.PACKAGE_NAME}}
retention-days: 30

- name: Set up AWS CLI
if: ${{ inputs.upload }}
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 package
if: ${{ inputs.upload }}
run: |
echo "Uploading package"
aws s3 cp ${{ env.CURRENT_DIR }}/dev-tools/build-packages/output/${{ inputs.system }}/${{env.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/${{env.PACKAGE_NAME}}"
echo "S3 URI: ${s3uri}"
- name: Upload SHA512
if: ${{ inputs.checksum }}
if: ${{ inputs.upload && inputs.checksum }}
run: |
echo "Uploading checksum"
aws s3 cp ${{ env.CURRENT_DIR }}/dev-tools/build-packages/output/${{ inputs.system }}/${{env.PACKAGE_NAME}}.sha512 s3://packages-dev.internal.wazuh.com/development/wazuh/4.x/main/packages/
Expand Down
2 changes: 1 addition & 1 deletion config/opensearch_dashboards.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ server.ssl.enabled: true
server.ssl.key: "/etc/wazuh-dashboard/certs/dashboard-key.pem"
server.ssl.certificate: "/etc/wazuh-dashboard/certs/dashboard.pem"
opensearch.ssl.certificateAuthorities: ["/etc/wazuh-dashboard/certs/root-ca.pem"]
uiSettings.overrides.defaultRoute: /app/wz-home
uiSettings.overrides.defaultRoute: /app/home

0 comments on commit e7b2b16

Please sign in to comment.