diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b9e25f249556c0ff7c0948070f05afb1dfc93856..02e515841da0725944eafe1da8d63b39ee1e16bf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,46 +1,22 @@ --- -image: adarnimrod/ci-images:docker +include: + - project: shore/ci-templates + file: templates/pre-commit.yml + - project: shore/ci-templates + file: templates/docker.yml stages: - test - build - - run - -pre-commit: - stage: test - image: adarnimrod/ci-images:pre-commit - variables: - XDG_CACHE_HOME: "$CI_PROJECT_DIR/.cache" - # Disabled until https://github.com/pre-commit/pre-commit/issues/1387 is - # resolved. - SKIP: "hadolint,docker-compose" - script: - - pre-commit run --all-files - cache: - paths: - - .cache/ + - deploy build: - stage: build - tags: ["host01.shore.co.il"] + extends: .compose-build + tags: [host01.shore.co.il] variables: - # COMPOSE_DOCKER_CLI_BUILD: "1" - # DOCKER_BUILDKIT: "1" - script: - - docker-compose build --no-cache --pull - - docker-compose pull --quiet + DOCKER_BUILDKIT: "" + COMPOSE_DOCKER_CLI_BUILD: "" run: - stage: run - tags: ["host01.shore.co.il"] - when: manual - script: - - docker-compose up --detach --remove-orphans - # yamllint disable rule:line-length - - | - for i in $(seq 12) - do - docker container inspect --format '{{ .State.Health.Status }}' $(docker-compose ps -q) | grep -v '^healthy$' || break - sleep 10 - done - ! docker container inspect --format '{{ .State.Health.Status }}' $(docker-compose ps -q) | grep -v '^healthy$' + extends: .compose-run + tags: [host01.shore.co.il] diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 593c19f554b57e842dfb7e459f64bc3e9356ee35..684cbe0bc67d6e2fed6c5e60c4faf1963e21ca4b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,37 +1,50 @@ -# vim:ff=unix ts=2 sw=2 ai expandtab --- repos: - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v2.3.0 + - repo: https://github.com/pre-commit/pre-commit-hooks.git + rev: v3.4.0 hooks: - id: check-added-large-files - id: check-executables-have-shebangs - id: check-merge-conflict - - id: detect-private-key + - id: check-symlinks - id: trailing-whitespace exclude: \.diff$ + + - repo: https://github.com/Yelp/detect-secrets + rev: v0.14.3 + hooks: + - id: detect-secrets + exclude: \.diff$ + - repo: https://github.com/adrienverge/yamllint - rev: v1.17.0 + rev: v1.25.0 hooks: - id: yamllint + - repo: https://github.com/amperser/proselint/ - rev: 0.10.1 + rev: 0.10.2 hooks: - id: proselint types: [plain-text] exclude: LICENSE - - repo: https://git.shore.co.il/nimrod/shell-pre-commit.git/ + + - repo: https://github.com/executablebooks/mdformat.git + rev: 0.5.3 + hooks: + - id: mdformat + + - repo: https://git.shore.co.il/nimrod/shell-pre-commit.git rev: v0.6.0 hooks: - id: shell-lint + + - repo: https://github.com/shellcheck-py/shellcheck-py.git + rev: v0.7.1.1 + hooks: - id: shellcheck + - repo: https://git.shore.co.il/nimrod/docker-pre-commit.git/ rev: v0.3.0 hooks: - id: hadolint - id: docker-compose - - repo: https://github.com/Yelp/detect-secrets - rev: v0.13.0 - hooks: - - id: detect-secrets - exclude: \.diff$ diff --git a/README.md b/README.md index b49c1d5db93d8ccec9383cc3ee30d2d37a99f1d4..a336289a9ba2ba8825a8dd8c4971a6e95129f00b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # LDAP Docker +[](https://git.shore.co.il/shore/ldap-docker/-/commits/master) + > A dockerized OpenLDAP with LDAP Account Manager. ## Requirements @@ -13,7 +15,7 @@ This software is licensed under the MIT license (see `LICENSE.txt`). ## Author Information -Nimrod Adar, [contact me](mailto:nimrod@shore.co.il) or visit my [website]( -https://www.shore.co.il/). Patches are welcome via [`git send-email`]( -http://git-scm.com/book/en/v2/Git-Commands-Email). The repository is located -at: <https://www.shore.co.il/git/>. +Nimrod Adar, [contact me](mailto:nimrod@shore.co.il) or visit my +[website](https://www.shore.co.il/). Patches are welcome via +[`git send-email`](http://git-scm.com/book/en/v2/Git-Commands-Email). The repository +is located at: <https://git.shore.co.il/expore/>. diff --git a/crond/README.md b/crond/README.md index 4076d73bf343aff0a1efb681c3611f180c006970..a55d08c89589ce13615b2a5e21cc9a788901460a 100644 --- a/crond/README.md +++ b/crond/README.md @@ -15,7 +15,7 @@ This software is licensed under the MIT license (see `LICENSE.txt`). ## Author Information -Nimrod Adar, [contact me](mailto:nimrod@shore.co.il) or visit my [website]( -https://www.shore.co.il/). Patches are welcome via [`git send-email`]( -http://git-scm.com/book/en/v2/Git-Commands-Email). The repository is located -at: <https://www.shore.co.il/git/>. +Nimrod Adar, [contact me](mailto:nimrod@shore.co.il) or visit my +[website](https://www.shore.co.il/). Patches are welcome via +[`git send-email`](http://git-scm.com/book/en/v2/Git-Commands-Email). The repository +is located at: <https://git.shore.co.il/expore/>. diff --git a/ldap-account-manager/README.md b/ldap-account-manager/README.md index 7d55bf161a8021faeba7addcd29d291e0b0df976..23ca940c9e10f46f7f968e3cdeb42958f784649f 100644 --- a/ldap-account-manager/README.md +++ b/ldap-account-manager/README.md @@ -5,7 +5,7 @@ ## Environment variables Name | Description | Default value ---- | --- | --- +\-\-\- | \-\-\- | \-\-\- `LAM_PASSWORD` | Password for administering LAM | `lam` `LDAP_URI` | URI of the LDAP service | `ldapi:///` `LDAP_ADMIN_DN` | DN of the admin account @@ -17,7 +17,7 @@ This software is licensed under the MIT license (see `LICENSE.txt`). ## Author Information -Nimrod Adar, [contact me](mailto:nimrod@shore.co.il) or visit my [website]( -https://www.shore.co.il/). Patches are welcome via [`git send-email`]( -http://git-scm.com/book/en/v2/Git-Commands-Email). The repository is located -at: <https://www.shore.co.il/git/>. +Nimrod Adar, [contact me](mailto:nimrod@shore.co.il) or visit my +[website](https://www.shore.co.il/). Patches are welcome via +[`git send-email`](http://git-scm.com/book/en/v2/Git-Commands-Email). The repository +is located at: <https://git.shore.co.il/expore/>. diff --git a/nss-pam-ldapd/README.md b/nss-pam-ldapd/README.md index 45b0fbe779a0be0be6a609570e72a5f4ac396e7f..96da7830c8677c6b5f5623c0d91670febe636fb0 100644 --- a/nss-pam-ldapd/README.md +++ b/nss-pam-ldapd/README.md @@ -11,7 +11,7 @@ daemon. To use this container, execute a different process (like `su` or ## Environment variables Name | Default value ---- | --- +\-\-\- | \-\-\- `LDAP_URIS` | `ldapi:///` `LDAP_AUTH_TYPE` | `none` `LDAP_BINDDN` @@ -26,7 +26,7 @@ This software is licensed under the MIT license (see `LICENSE.txt`). ## Author Information -Nimrod Adar, [contact me](mailto:nimrod@shore.co.il) or visit my [website]( -https://www.shore.co.il/). Patches are welcome via [`git send-email`]( -http://git-scm.com/book/en/v2/Git-Commands-Email). The repository is located -at: <https://www.shore.co.il/git/>. +Nimrod Adar, [contact me](mailto:nimrod@shore.co.il) or visit my +[website](https://www.shore.co.il/). Patches are welcome via +[`git send-email`](http://git-scm.com/book/en/v2/Git-Commands-Email). The repository +is located at: <https://git.shore.co.il/expore/>. diff --git a/slapd/README.md b/slapd/README.md index 6beca9eece3b881a04e141f4b9e28c5160afafd0..d06652f2c8e1531d4a35e62b392f7ff7dae4aa56 100644 --- a/slapd/README.md +++ b/slapd/README.md @@ -10,7 +10,7 @@ The container exposes TCP ports 389 (LDAP) and 636 (LDAPS) as well as the ## Environment variables Name | Description | Default value ---- | --- | --- +\-\-\- | \-\-\- | \-\-\- `LDAP_URLS` | List of URLs to serve. | `ldap:/// ldapi:/// ldaps:///` `LDAP_ROOTPASS` | Root password. `LDAP_DOMAIN` | Domain. @@ -43,7 +43,7 @@ This software is licensed under the MIT license (see `LICENSE.txt`). ## Author Information -Nimrod Adar, [contact me](mailto:nimrod@shore.co.il) or visit my [website]( -https://www.shore.co.il/). Patches are welcome via [`git send-email`]( -http://git-scm.com/book/en/v2/Git-Commands-Email). The repository is located -at: <https://www.shore.co.il/git/>. +Nimrod Adar, [contact me](mailto:nimrod@shore.co.il) or visit my +[website](https://www.shore.co.il/). Patches are welcome via +[`git send-email`](http://git-scm.com/book/en/v2/Git-Commands-Email). The repository +is located at: <https://git.shore.co.il/expore/>.