1
0

files-external-smb-kerberos.yml 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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@a5ac7e51b41094c92402da3b24376905380afc29
  39. with:
  40. submodules: true
  41. - name: Checkout user_saml
  42. uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
  43. with:
  44. repository: nextcloud/user_saml
  45. path: apps/user_saml
  46. - name: Pull images
  47. run: |
  48. docker pull ghcr.io/icewind1991/samba-krb-test-dc
  49. docker pull ghcr.io/icewind1991/samba-krb-test-apache
  50. docker pull ghcr.io/icewind1991/samba-krb-test-client
  51. docker tag ghcr.io/icewind1991/samba-krb-test-dc icewind1991/samba-krb-test-dc
  52. docker tag ghcr.io/icewind1991/samba-krb-test-apache icewind1991/samba-krb-test-apache
  53. docker tag ghcr.io/icewind1991/samba-krb-test-client icewind1991/samba-krb-test-client
  54. - name: Setup AD-DC
  55. run: |
  56. DC_IP=$(apps/files_external/tests/sso-setup/start-dc.sh)
  57. sleep 1
  58. apps/files_external/tests/sso-setup/start-apache.sh $DC_IP $PWD
  59. echo "DC_IP=$DC_IP" >> $GITHUB_ENV
  60. - name: Set up Nextcloud
  61. run: |
  62. apps/files_external/tests/sso-setup/setup-sso-nc.sh
  63. - name: Test SSO
  64. run: |
  65. apps/files_external/tests/sso-setup/test-sso-smb.sh ${{ env.DC_IP }}
  66. - name: Show logs
  67. if: always()
  68. run: |
  69. FILEPATH=$(docker exec --user 33 apache ./occ log:file | grep "Log file:" | cut -d' ' -f3)
  70. echo "$FILEPATH:"
  71. docker exec --user 33 apache cat $FILEPATH
  72. sftp-summary:
  73. runs-on: ubuntu-latest-low
  74. needs: [changes, files-external-smb-kerberos]
  75. if: always()
  76. steps:
  77. - name: Summary status
  78. run: if ${{ needs.changes.outputs.src != 'false' && needs.files-external-smb-kerberos.result != 'success' }}; then exit 1; fi