Skip to content

Commit

Permalink
Added S3 URI output to package generation upload (#249)
Browse files Browse the repository at this point in the history
* Added S3 URI output

* Added ID input and S3 URI output

* Improved workflow run name

* Added name statement

* Added name statement

* Removed file

* Added ID input description

* Update build.yml

---------

Co-authored-by: Álex Ruiz <[email protected]>
  • Loading branch information
rauldpm and AlexRuiz7 committed Nov 8, 2024
1 parent 590b232 commit 1e29c2e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 78 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
run-name: Build ${{ inputs.distribution }} Wazuh Indexer on ${{ inputs.architecture }} | ${{ inputs.id }}
name: Build packages (on demand)

# This workflow runs when any of the following occur:
Expand Down Expand Up @@ -30,6 +31,10 @@ on:
description: "Checksum ?"
type: boolean
default: false
id:
description: "ID used to identify the workflow uniquely."
type: string
required: false
workflow_call:
inputs:
revision:
Expand All @@ -56,6 +61,9 @@ on:
description: "Checksum ?"
type: boolean
default: false
id:
type: string
required: false
secrets:
CI_INTERNAL_DEVELOPMENT_BUCKET_USER_ACCESS_KEY:
required: true
Expand Down Expand Up @@ -185,10 +193,14 @@ jobs:
src="artifacts/dist/${{ steps.package.outputs.name }}"
dest="s3://packages-dev.internal.wazuh.com/development/wazuh/4.x/main/packages/"
aws s3 cp "$src" "$dest"
s3uri="${dest}${{ steps.package.outputs.name }}"
echo "S3 URI: ${s3uri}"
- name: Upload checksum to S3
if: ${{ inputs.upload && inputs.checksum }}
run: |
src="artifacts/dist/${{ steps.package.outputs.name }}.sha512"
dest="s3://packages-dev.internal.wazuh.com/development/wazuh/4.x/main/packages/"
aws s3 cp "$src" "$dest"
s3uri="${dest}${{ steps.package.outputs.name }}.sha512"
echo "S3 sha512 URI: ${s3uri}"
78 changes: 0 additions & 78 deletions .github/workflows/build_single.yml

This file was deleted.

0 comments on commit 1e29c2e

Please sign in to comment.