Skip to content

Commit

Permalink
Add logic to upload to s3
Browse files Browse the repository at this point in the history
  • Loading branch information
Tostti committed Mar 6, 2024
1 parent c8fa56a commit 9897826
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion .github/workflows/build_wazuh_dashboard_with_plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:
required: true
default: ''
DISTRIBUTION:
description: 'Distribution to build (deb | rpm | tar | all-platforms)'
description: 'Distribution to build (deb | rpm | all-platforms)'
required: true
default: ''

Expand Down Expand Up @@ -163,6 +163,20 @@ jobs:
path: ${{ env.CURRENT_DIR }}/dev-tools/build-packages/deb/output/wazuh-dashboard_${{ env.VERSION }}-${{ env.REVISION }}_amd64.deb
retention-days: 30

- name: Set up AWS CLI
uses: aws-actions/configure-aws-credentials@v1
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: us-east-1

- name: Upload deb to S3
if: success()
run: |
aws s3 cp ${{ env.CURRENT_DIR }}/dev-tools/build-packages/deb/output/wazuh-dashboard_${{ env.VERSION }}-${{ env.REVISION }}_amd64.deb s3://packages-dev.internal.wazuh.com/development/wazuh/4.x/main/packages/
build-rpm-package:
needs: [Build-base-package]
Expand Down Expand Up @@ -211,6 +225,19 @@ jobs:
path: ${{ env.CURRENT_DIR }}/dev-tools/build-packages/rpm/output/wazuh-dashboard-${{ env.VERSION }}-${{ env.REVISION }}.x86_64.rpm
retention-days: 30

- name: Set up AWS CLI
uses: aws-actions/configure-aws-credentials@v1
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: us-east-1

- name: Upload rpm to S3
if: success()
run: |
aws s3 cp ${{ env.CURRENT_DIR }}/dev-tools/build-packages/rpm/output/wazuh-dashboard-${{ env.VERSION }}-${{ env.REVISION }}.x86_64.rpm s3://packages-dev.internal.wazuh.com/development/wazuh/4.x/main/packages/
test-package-deb:
needs: [build-deb-package]
Expand Down

0 comments on commit 9897826

Please sign in to comment.