publish-smoke-test-servlet-images.yml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. name: Publish Servlet images for smoke tests
  2. on:
  3. push:
  4. paths:
  5. - 'smoke-tests/images/servlet/**'
  6. - '.github/workflows/publish-smoke-test-servlet-images.yml'
  7. branches:
  8. - main
  9. workflow_dispatch:
  10. jobs:
  11. publish:
  12. runs-on: ${{ matrix.os }}
  13. defaults:
  14. run:
  15. shell: bash # this is needed for TAG construction below on Windows
  16. strategy:
  17. matrix:
  18. os:
  19. - windows-2019
  20. - ubuntu-latest
  21. smoke-test-server:
  22. - jetty
  23. - liberty
  24. - payara
  25. - tomcat
  26. - tomee
  27. - websphere
  28. - wildfly
  29. exclude:
  30. - os: windows-2019
  31. smoke-test-server: websphere
  32. fail-fast: false
  33. steps:
  34. - name: Support long paths
  35. run: git config --system core.longpaths true
  36. if: matrix.os == 'windows-2019'
  37. - uses: actions/checkout@v3
  38. - name: Set up JDK for running Gradle
  39. uses: actions/setup-java@v3
  40. with:
  41. distribution: temurin
  42. java-version: 17
  43. - name: Login to GitHub package registry
  44. uses: docker/login-action@v2
  45. with:
  46. registry: ghcr.io
  47. username: ${{ github.repository_owner }}
  48. password: ${{ secrets.GITHUB_TOKEN }}
  49. - name: Set tag
  50. run: echo "TAG=$(date '+%Y%m%d').$GITHUB_RUN_ID" >> $GITHUB_ENV
  51. - name: Set up Gradle cache
  52. uses: gradle/gradle-build-action@v2
  53. with:
  54. # only push cache for one matrix option per OS since github action cache space is limited
  55. cache-read-only: ${{ matrix.smoke-test-suite != 'tomcat' }}
  56. - name: Build Linux docker images
  57. if: matrix.os != 'windows-2019'
  58. run: ./gradlew :smoke-tests:images:servlet:buildLinuxTestImages pushMatrix -PextraTag=${{ env.TAG }} -PsmokeTestServer=${{ matrix.smoke-test-server }}
  59. - name: Build Windows docker images
  60. if: matrix.os == 'windows-2019'
  61. run: ./gradlew :smoke-tests:images:servlet:buildWindowsTestImages pushMatrix -PextraTag=${{ env.TAG }} -PsmokeTestServer=${{ matrix.smoke-test-server }}
  62. open-issue-on-failure:
  63. needs:
  64. - publish
  65. if: failure()
  66. uses: ./.github/workflows/reusable-open-issue-on-failure.yml