files-external-smb-kerberos.yml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. name: Samba Kerberos SSO
  2. on:
  3. pull_request:
  4. schedule:
  5. - cron: "5 2 * * *"
  6. concurrency:
  7. group: files-external-smb-kerberos-${{ github.head_ref || github.run_id }}
  8. cancel-in-progress: true
  9. jobs:
  10. changes:
  11. runs-on: ubuntu-latest-low
  12. outputs:
  13. src: ${{ steps.changes.outputs.src}}
  14. steps:
  15. - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
  16. id: changes
  17. continue-on-error: true
  18. with:
  19. filters: |
  20. src:
  21. - '.github/workflows/**'
  22. - '3rdparty/**'
  23. - 'apps/files_external/**'
  24. - 'vendor/**'
  25. - 'vendor-bin/**'
  26. - 'composer.json'
  27. - 'composer.lock'
  28. - '**.php'
  29. files-external-smb-kerberos:
  30. runs-on: ubuntu-22.04
  31. needs: changes
  32. if: ${{ github.repository_owner != 'nextcloud-gmbh' && needs.changes.outputs.src != 'false' }}
  33. name: smb-kerberos-sso
  34. steps:
  35. - name: Checkout server
  36. uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
  37. with:
  38. submodules: true
  39. - name: Checkout user_saml
  40. uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
  41. with:
  42. repository: nextcloud/user_saml
  43. path: apps/user_saml
  44. - name: Pull images
  45. run: |
  46. docker pull ghcr.io/icewind1991/samba-krb-test-dc
  47. docker pull ghcr.io/icewind1991/samba-krb-test-apache
  48. docker pull ghcr.io/icewind1991/samba-krb-test-client
  49. docker tag ghcr.io/icewind1991/samba-krb-test-dc icewind1991/samba-krb-test-dc
  50. docker tag ghcr.io/icewind1991/samba-krb-test-apache icewind1991/samba-krb-test-apache
  51. docker tag ghcr.io/icewind1991/samba-krb-test-client icewind1991/samba-krb-test-client
  52. - name: Setup AD-DC
  53. run: |
  54. DC_IP=$(apps/files_external/tests/sso-setup/start-dc.sh)
  55. sleep 1
  56. apps/files_external/tests/sso-setup/start-apache.sh $DC_IP $PWD
  57. echo "DC_IP=$DC_IP" >> $GITHUB_ENV
  58. - name: Set up Nextcloud
  59. run: |
  60. apps/files_external/tests/sso-setup/setup-sso-nc.sh
  61. - name: Test SSO
  62. run: |
  63. apps/files_external/tests/sso-setup/test-sso-smb.sh ${{ env.DC_IP }}
  64. - name: Show logs
  65. if: always()
  66. run: |
  67. FILEPATH=$(docker exec --user 33 apache ./occ log:file | grep "Log file:" | cut -d' ' -f3)
  68. echo "$FILEPATH:"
  69. docker exec --user 33 apache cat $FILEPATH
  70. sftp-summary:
  71. runs-on: ubuntu-latest-low
  72. needs: [changes, files-external-smb-kerberos]
  73. if: always()
  74. steps:
  75. - name: Summary status
  76. run: if ${{ needs.changes.outputs.src != 'false' && needs.files-external-smb-kerberos.result != 'success' }}; then exit 1; fi