|
57 | 57 | run: |
|
58 | 58 | echo "${{ secrets.GPG_PRIVATE_KEY }}" > gpg.asc
|
59 | 59 | echo "${{ secrets.GPG_PASSPHRASE }}" | gpg --batch --yes --passphrase-fd 0 --import gpg.asc
|
| 60 | + - name: Project Version |
| 61 | + id: project-version |
| 62 | + run: | |
| 63 | + current_version=`./mvnw help:evaluate -Dexpression="project.version" -q -DforceStdout` |
| 64 | + version=${current_version%%-*} |
| 65 | + echo "version=$version" >> $GITHUB_OUTPUT |
60 | 66 | - name: Build Eclipse Distro
|
61 | 67 | env:
|
62 | 68 | # MAVEN_OPTS: -Dmaven.wagon.httpconnectionManager.ttlSeconds=40 -Dmaven.wagon.http.retryHandler.count=10 -Daether.connector.http.connectionMaxTtl=40 -Dhttp.keepAlive=false -Dhttpclient.retry-max=30 -Dorg.eclipse.ecf.provider.filetransfer.httpclient.retrieve.readTimeout=1800000 -Dorg.eclipse.ecf.provider.filetransfer.httpclient4.retrieve.readTimeout=1800000 -Dorg.eclipse.ecf.provider.filetransfer.retrieve.readTimeout=1800000 -Dorg.eclipse.ecf.provider.filetransfer.retrieve.retryAttempts=30 -Dorg.eclipse.equinox.p2.transport.ecf.retry=10
|
@@ -140,6 +146,7 @@ jobs:
|
140 | 146 | id: ${{ inputs.eclipse_profile }}-${{ inputs.build_type }}-${{ github.run_id }}
|
141 | 147 | dist_path: ${{ steps.s3-paths.outputs.dist_path }}
|
142 | 148 | p2_path: ${{ steps.s3-paths.outputs.p2_path }}
|
| 149 | + version: ${{ steps.project-version.outputs.version }} |
143 | 150 |
|
144 | 151 |
|
145 | 152 | sign-win-distros:
|
@@ -310,6 +317,72 @@ jobs:
|
310 | 317 | cloudflare_zone_id: ${{ secrets.CLOUDFLARE_ZONE_ID }}
|
311 | 318 | cloudflare_cache_token: ${{ secrets.CLOUDFLARE_CACHE_TOKEN }}
|
312 | 319 |
|
| 320 | + gchat-message: |
| 321 | + needs: [ eclipse-distro-build, sign-win-distros, sign-osx-distros ] |
| 322 | + if: ${{ inputs.build_type == 'release' }} |
| 323 | + name: Send GChat message |
| 324 | + runs-on: ubuntu-latest |
| 325 | + steps: |
| 326 | + - name: Google Chat Notification |
| 327 | + run: | |
| 328 | + echo "P2 Update Site: ${DOWNLOAD_URL_ROOT}/${{ needs.eclipse-distro-build.outputs.p2_path }}" |
| 329 | + downloads_html="sts4-distro-downloads-${{ inputs.eclipse_profile }}.txt" |
| 330 | + rm -f ./downloads_html |
| 331 | + s3_url=s3://${AWS_S3_BUCKET}/${{ needs.eclipse-distro-build.outputs.dist_path }} |
| 332 | + files=`aws s3 cp ${s3_url} . --recursive --exclude "*" --include "spring-tool-suite-4*.zip" --include "spring-tool-suite-4*.dmg" --include "spring-tool-suite-4*.self-extracting.jar" --include "spring-tool-suite-4*.tar.gz" --exclude "*/*" --dryrun` |
| 333 | + s3_url_prefix="s3://${AWS_S3_BUCKET}" |
| 334 | + s3_url_prefix_length=${#s3_url_prefix} |
| 335 | + for file in $files |
| 336 | + do |
| 337 | + if [[ "$file" =~ ^"${s3_url_prefix}" ]]; then |
| 338 | + download_url=${DOWNLOAD_URL_ROOT}${file:$s3_url_prefix_length} |
| 339 | + filename=${file:${#s3_url}+1} |
| 340 | + echo $download_url |
| 341 | + echo $filename |
| 342 | + echo "<li><a href=${download_url}>${filename}</a></li>" >> $downloads_html |
| 343 | + fi |
| 344 | + done |
| 345 | + distro_links=`cat ./$downloads_html` |
| 346 | + rm -f ./$downloads_html |
| 347 | + |
| 348 | + build_type=${{ inputs.build_type }} |
| 349 | + build_type=${build_type^} |
| 350 | + eclipse_profile=${{ inputs.eclipse_profile }} |
| 351 | + eclipse_version=${eclipse_profile:1:1}.${eclipse_profile:2} |
| 352 | +
|
| 353 | + curl --location --request POST '${{ secrets.TOOLS_TEAM_GCHAT_WEBHOOK_URL }}' \ |
| 354 | + --header 'Content-Type: application/json' \ |
| 355 | + --data-raw "{ |
| 356 | + \"cards\": [ |
| 357 | + { |
| 358 | + \"header\": { |
| 359 | + \"title\": \"STS ${{ needs.eclipse-distro-build.outputs.version }} ${build_type}\", |
| 360 | + \"subtitle\": \"Eclipse ${eclipse_version}\", |
| 361 | + \"imageUrl\": \"https://avatars.githubusercontent.com/u/317776?s=48&v=4\", |
| 362 | + }, |
| 363 | + \"sections\": [ |
| 364 | + { |
| 365 | + \"widgets\": [ |
| 366 | + { |
| 367 | + \"keyValue\": { |
| 368 | + \"topLabel\": \"P2 Update Site\", |
| 369 | + \"content\": \"<a href=${DOWNLOAD_URL_ROOT}/${{ needs.eclipse-distro-build.outputs.p2_path }}>${DOWNLOAD_URL_ROOT}/${{ needs.eclipse-distro-build.outputs.p2_path }}</a>\" |
| 370 | + } |
| 371 | + }, |
| 372 | + { |
| 373 | + \"keyValue\": { |
| 374 | + \"topLabel\": \"Distributions\", |
| 375 | + \"content\": \"${distro_links}\", |
| 376 | + \"contentMultiline\": true |
| 377 | + } |
| 378 | + } |
| 379 | + ] |
| 380 | + } |
| 381 | + ] |
| 382 | + } |
| 383 | + ] |
| 384 | + }" |
| 385 | +
|
313 | 386 | cleanup:
|
314 | 387 | needs: [ eclipse-distro-build, sign-win-distros, sign-osx-distros ]
|
315 | 388 | if: ${{ always() }}
|
|
0 commit comments