diff --git a/.github/workflows/Puppet_module_builder.yml b/.github/workflows/Puppet_module_builder.yml index 1de6c4c5..43add8a5 100644 --- a/.github/workflows/Puppet_module_builder.yml +++ b/.github/workflows/Puppet_module_builder.yml @@ -16,6 +16,11 @@ on: description: "Checksum ?" type: boolean default: false + wazuh_puppet_reference: + description: "wazuh-puppet reference" + type: string + default: "4.10.1" + required: false id: description: "ID used to identify the workflow uniquely." type: string @@ -34,6 +39,11 @@ on: description: "Checksum ?" type: boolean default: false + wazuh_puppet_reference: + description: "wazuh-puppet reference" + type: string + default: "4.10.1" + required: false id: type: string required: false @@ -47,10 +57,12 @@ env: jobs: build_module: - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 steps: - name: Checkout code uses: actions/checkout@v4 + with: + ref: ${{ inputs.wazuh_puppet_reference }} - name: View parameters run: echo "${{ toJson(inputs) }}" @@ -66,8 +78,8 @@ jobs: - name: Install dependencies run: | - curl -O https://apt.puppet.com/puppet-tools-release-noble.deb - sudo dpkg -i puppet-tools-release-noble.deb + curl -O https://apt.puppet.com/puppet-tools-release-jammy.deb + sudo dpkg -i puppet-tools-release-jammy.deb sudo apt-get update sudo apt-get install pdk pdk set config user.analytics.disabled false --type boolean --force @@ -75,7 +87,7 @@ jobs: - name: Modify name for stage build if: ${{ inputs.is_stage == false }} run: | - pip install sde --break-system-packages + pip install sde PUPPET_MODULE_VERSION="${PUPPET_MODULE_VERSION}-${{ env.COMMIT_SHORT_SHA}}" sde version $PUPPET_MODULE_VERSION ${{ github.workspace }}/metadata.json echo "PUPPET_MODULE_VERSION=$PUPPET_MODULE_VERSION" >> "$GITHUB_ENV" @@ -117,10 +129,15 @@ jobs: - name: Upload Puppet module to S3 if: ${{ inputs.upload == true }} - run: aws s3 cp ${{ github.workspace }}/output/${{ env.PUPPET_MODULE_NAME }} s3://${{ secrets.AWS_S3_BUCKET }}/${{ env.S3_PATH }} + run: | + aws s3 cp ${{ github.workspace }}/output/${{ env.PUPPET_MODULE_NAME }} s3://${{ vars.AWS_S3_BUCKET }}/${{ env.S3_PATH }} + s3uri="s3://${{ vars.AWS_S3_BUCKET }}/${{ env.S3_PATH }}/${{ env.PUPPET_MODULE_NAME }}" + echo "S3 URI: ${s3uri}" - name: Create checksum file and upload if: ${{ inputs.checksum == true && inputs.upload == true }} run: | - aws s3 cp ${{ github.workspace }}/output/${{ env.PUPPET_MODULE_NAME }}.sha512 s3://${{ secrets.AWS_S3_BUCKET }}/${{ env.S3_PATH }} + aws s3 cp ${{ github.workspace }}/output/${{ env.PUPPET_MODULE_NAME }}.sha512 s3://${{ vars.AWS_S3_BUCKET }}/${{ env.S3_PATH }} + s3uri="s3://${{ vars.AWS_S3_BUCKET }}/${{ env.S3_PATH }}/${{ env.PUPPET_MODULE_NAME }}.sha512" + echo "S3 sha512 URI: ${s3uri}" diff --git a/CHANGELOG.md b/CHANGELOG.md index 5cf1fedf..6863d452 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,11 +28,12 @@ All notable changes to this project will be documented in this file. ### Changed +- Add URI file after upload ([#1143](https://github.com/wazuh/wazuh-puppet/pull/1143)) \- (Puppet Module Builder) - Modfy Puppet module builder ([#1113](https://github.com/wazuh/wazuh-puppet/pull/1113)) \- (Puppet Module Builder) ### Fixed -- None +- Changed GitHub Runner OS version to Ubuntu 22.04. ([#1142](https://github.com/wazuh/wazuh-puppet/pull/1142)) ### Deleted