Skip to content

Commit

Permalink
removed deprecated actions from zap wrapper release #3665
Browse files Browse the repository at this point in the history
  • Loading branch information
sven-dmlr committed Nov 29, 2024
1 parent 82149e4 commit cd199b6
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-wrapper-checkmarx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
67 changes: 28 additions & 39 deletions .github/workflows/release-wrapper-owaspzap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit cd199b6

Please sign in to comment.