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

Make upload to s3 optional #384

Merged
merged 2 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
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
Loading