aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/smb-kerberos.yml
blob: b0e286f1ccd3deb33544e13d17eb9b832bc517ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Samba Kerberos SSO
on:
  push:
    branches:
      - master
      - stable*
    paths:
      - 'apps/files_external/**'
      - '.github/workflows/smb-kerberos.yml'
  pull_request:
    paths:
      - 'apps/files_external/**'
      - '.github/workflows/smb-kerberos.yml'

jobs:
  smb-kerberos-tests:
    runs-on: ubuntu-latest

    if: ${{ github.repository_owner != 'nextcloud-gmbh' }}

    name: smb-kerberos-sso

    steps:
      - name: Checkout server
        uses: actions/checkout@v3
        with:
          submodules: true
      - name: Pull images
        run: |
          docker pull ghcr.io/icewind1991/samba-krb-test-dc
          docker pull ghcr.io/icewind1991/samba-krb-test-apache
          docker pull ghcr.io/icewind1991/samba-krb-test-client
          docker tag ghcr.io/icewind1991/samba-krb-test-dc icewind1991/samba-krb-test-dc
          docker tag ghcr.io/icewind1991/samba-krb-test-apache icewind1991/samba-krb-test-apache
          docker tag ghcr.io/icewind1991/samba-krb-test-client icewind1991/samba-krb-test-client
      - name: Setup AD-DC
        run: |
          DC_IP=$(apps/files_external/tests/sso-setup/start-dc.sh)
          apps/files_external/tests/sso-setup/start-apache.sh $DC_IP $PWD
          echo "DC_IP=$DC_IP" >> $GITHUB_ENV
      - name: Set up Nextcloud
        run: |
          apps/files_external/tests/sso-setup/setup-sso-nc.sh
      - name: Test SSO
        run: |
          apps/files_external/tests/sso-setup/test-sso-smb.sh ${{ env.DC_IP }}
      - name: Show logs
        if: failure()
        run: |
          FILEPATH=$(docker exec --user 33 apache ./occ log:file | grep "Log file:" | cut -d' ' -f3)
          echo "$FILEPATH:"
          docker exec --user 33 apache cat $FILEPATH