File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed
Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change 1919 required : false
2020 type : string
2121 default : " "
22+ extra-services :
23+ description : " A list of coma separated services. Available services: openldap."
24+ required : false
25+ type : string
26+ default : " "
2227
2328jobs :
2429 ci :
3843 MYSQL_DATABASE : " glpi"
3944 options : >-
4045 --shm-size=1g
46+ openldap :
47+ # Workaround to only add the service if a given variable is set.
48+ # See: https://github.com/actions/runner/issues/822
49+ image : " ${{ contains(inputs.extra-services, 'openldap') && 'osixia/openldap:latest' || '' }}"
50+ env :
51+ LDAP_ORGANISATION : " GLPI"
52+ LDAP_DOMAIN : " glpi.org"
53+ LDAP_ADMIN_USERNAME : " admin"
54+ LDAP_ADMIN_PASSWORD : " admin"
4155 defaults :
4256 run :
4357 # By default, execute commands using the `www-data` user to prevent rights issues on GLPI generated files.
@@ -95,6 +109,14 @@ jobs:
95109 if : ${{ !cancelled() && hashFiles(format('{0}/package.json', inputs.plugin-key)) != '' }}
96110 run : |
97111 npm install --no-save
112+ # We now need to load the ldif data in the openldap server.
113+ # TODO: bake the .ldif directly in a custom image so we don't need to do this.
114+ - name : " Import LDIF"
115+ if : ${{ contains(inputs.extra-services, 'openldap') }}
116+ run : |
117+ ldapadd -x -D "cn=admin,dc=glpi,dc=org" -w admin \
118+ -f ../../tests/LDAP/ldif/10-users.ldif \
119+ -H ldap://openldap:389
98120 - name : " PHP Parallel Lint"
99121 run : |
100122 echo -e "\033[0;33mExecuting PHP Parallel Lint...\033[0m"
Original file line number Diff line number Diff line change 4646
4747 # Optional initialization script that can be used, for instance, to install additional system dependencies.
4848 init-script : " ./.github/workflows/init-script.sh"
49+
50+ # Optional extra services (possible values: "openldap").
51+ extra-services : " openldap"
4952` ` `
5053
5154The available ` glpi-version`/`php-version` combinations corresponds to the `ghcr.io/glpi-project/githubactions-glpi-apache` images tags
You can’t perform that action at this time.
0 commit comments