From bebfd328f93bdd22b4513759ee9d4103b9976984 Mon Sep 17 00:00:00 2001 From: Ian Yenien Serrano <63758389+yenienserrano@users.noreply.github.com> Date: Tue, 29 Oct 2024 17:41:55 +0100 Subject: [PATCH] Make upload to s3 optional (#384) --- .../build_wazuh_dashboard_with_plugins.yml | 18 +++++++++++++++++- config/opensearch_dashboards.prod.yml | 2 +- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_wazuh_dashboard_with_plugins.yml b/.github/workflows/build_wazuh_dashboard_with_plugins.yml index 187b8858aa1b..445ef160eab8 100644 --- a/.github/workflows/build_wazuh_dashboard_with_plugins.yml +++ b/.github/workflows/build_wazuh_dashboard_with_plugins.yml @@ -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' @@ -85,6 +89,9 @@ on: type: boolean required: true default: false + upload: + type: boolean + default: true checksum: type: boolean required: true @@ -232,7 +239,15 @@ 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 }} @@ -240,6 +255,7 @@ jobs: 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/ @@ -247,7 +263,7 @@ jobs: 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/ diff --git a/config/opensearch_dashboards.prod.yml b/config/opensearch_dashboards.prod.yml index dc49b17f74d0..650b0bc3d0bf 100644 --- a/config/opensearch_dashboards.prod.yml +++ b/config/opensearch_dashboards.prod.yml @@ -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