From cd199b604512896c0d0bd48b89e3bb796faa834f Mon Sep 17 00:00:00 2001 From: Sven Dolderer Date: Fri, 29 Nov 2024 12:10:17 +0100 Subject: [PATCH] removed deprecated actions from zap wrapper release #3665 --- .../workflows/release-wrapper-checkmarx.yml | 2 +- .../workflows/release-wrapper-owaspzap.yml | 67 ++++++++----------- 2 files changed, 29 insertions(+), 40 deletions(-) diff --git a/.github/workflows/release-wrapper-checkmarx.yml b/.github/workflows/release-wrapper-checkmarx.yml index 515c57aa8..0ee9e5564 100644 --- a/.github/workflows/release-wrapper-checkmarx.yml +++ b/.github/workflows/release-wrapper-checkmarx.yml @@ -130,7 +130,7 @@ jobs: # ****************************************** # Checkmarx Wrapper release # ****************************************** - - name: Prepare Checkmarx Wrapper ${{ inputs.pds-tools-version }} release artifacts + - name: Prepare Checkmarx Wrapper ${{ inputs.checkmarx-wrapper-version }} release artifacts shell: bash run: | cd sechub-wrapper-checkmarx/build/libs/ diff --git a/.github/workflows/release-wrapper-owaspzap.yml b/.github/workflows/release-wrapper-owaspzap.yml index a686be2f6..ebbb00fb3 100644 --- a/.github/workflows/release-wrapper-owaspzap.yml +++ b/.github/workflows/release-wrapper-owaspzap.yml @@ -37,6 +37,9 @@ jobs: # ---------------------- # Setup + Caching # ---------------------- + - name: Install required packages + run: sudo apt-get -y install hub + - name: Set up JDK 17 uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b with: @@ -125,50 +128,36 @@ jobs: - name: Assert releasable run: ./gradlew assertReleaseable - - name: Create OWASP-ZAP Wrapper release - id: create_owaspzap-wrapper_release - uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token - with: - tag_name: v${{ inputs.owaspzap-wrapper-version }}-owaspzap-wrapper - commitish: master - release_name: OWASP-ZAP Wrapper Version ${{ inputs.owaspzap-wrapper-version }} - body: | - Changes in this Release - - Some minor changes on OWASP-ZAP Wrapper implementation - - For more details please look at [Milestone ${{inputs.owaspzap-wrapper-milestone-number}}]( https://github.com/mercedes-benz/sechub/milestone/${{inputs.owaspzap-wrapper-milestone-number}}?closed=1) - draft: true - prerelease: false - - # ----------------------------------------- - # Upload release artifacts - # ----------------------------------------- - - name: Create files and sha256 checksum for OWASP-ZAP Wrapper jar + # ****************************************** + # OWASP-ZAP Wrapper release + # ****************************************** + - name: Prepare OWASP-ZAP Wrapper ${{ inputs.pds-tools-version }} release artifacts + shell: bash run: | cd sechub-wrapper-owasp-zap/build/libs/ - sha256sum sechub-pds-wrapperowaspzap-${{ inputs.owaspzap-wrapper-version }}.jar > sechub-pds-wrapperowaspzap-${{ inputs.owaspzap-wrapper-version }}.jar.sha256sum + sha256sum sechub-wrapper-owasp-zap-${{ inputs.owaspzap-wrapper-version }}.jar > sechub-wrapper-owasp-zap-${{ inputs.owaspzap-wrapper-version }}.jar.sha256sum - - name: Upload asset sechub-pds-wrapperowaspzap-${{ inputs.owaspzap-wrapper-version }}.jar - uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_owaspzap-wrapper_release.outputs.upload_url }} - asset_path: sechub-wrapper-owasp-zap/build/libs/sechub-pds-wrapperowaspzap-${{ inputs.owaspzap-wrapper-version }}.jar - asset_name: sechub-pds-wrapperowaspzap-${{ inputs.owaspzap-wrapper-version }}.jar - asset_content_type: application/zip - - - name: Upload asset sechub-pds-wrapperowaspzap-${{ inputs.owaspzap-wrapper-version }}.jar.sha256sum - uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 + - name: Create OWASP-ZAP Wrapper ${{ inputs.owaspzap-wrapper-version }} release draft + shell: bash + run: | + assets=() + echo "# Adding release artifacts" + cd sechub-wrapper-owasp-zap/build/libs/ + for asset in * ; do + filename=`basename "$asset"` + echo "# - $filename" + assets+=("-a" "${asset}#${filename}") + done + # Define release data + tag_name="v${{ inputs.owaspzap-wrapper-version }}-owaspzap-wrapper" + release_title="OWASP-ZAP Wrapper Version ${{ inputs.owaspzap-wrapper-version }}" + release_message="Changes in this Release + - Some minor changes on OWASP-ZAP Wrapper implementation" + release_footer="For more details please look at [Milestone ${{inputs.owaspzap-wrapper-milestone-number}}]( https://github.com/mercedes-benz/sechub/milestone/${{inputs.owaspzap-wrapper-milestone-number}}?closed=1)" + echo "# Create release draft \"$release_title\" on github" + hub release create --draft "${assets[@]}" -m "$release_title" -m "$release_message" -m "$release_footer" "$tag_name" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_owaspzap-wrapper_release.outputs.upload_url }} - asset_path: sechub-wrapper-owasp-zap/build/libs/sechub-pds-wrapperowaspzap-${{ inputs.owaspzap-wrapper-version }}.jar.sha256sum - asset_name: sechub-pds-wrapperowaspzap-${{ inputs.owaspzap-wrapper-version }}.jar.sha256sum - asset_content_type: text/plain # ----------------------------------------- # Create release issue