files-external-smb-kerberos.yml 3.0 KB

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