diff --git a/.env b/.env new file mode 100644 index 0000000000000000000000000000000000000000..dc8f90376b492d451f99e7b40a540bbc2a6c82f2 --- /dev/null +++ b/.env @@ -0,0 +1 @@ +COMPOSE_PROJECT_NAME=secondary_dns diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cadb99836011a4ee40ce5d21f0d3c4237e51893a..9bce4b2f4eba55bc7f73c63ed039150c58e9e13b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,46 +1,19 @@ --- -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: ["ns4.shore.co.il"] - variables: - COMPOSE_DOCKER_CLI_BUILD: "1" - DOCKER_BUILDKIT: "1" - script: - - docker-compose build --no-cache --pull - - docker-compose pull --quiet + extends: .compose-build + tags: [ns4.shore.co.il] run: - stage: run - tags: ["ns4.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: [ns4.shore.co.il] diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7e1749c21f327a3687ecfbf2cd47411dbf494f39..13d68fd1fc7fdca9e758d5db887f1b23ee812b77 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,34 +1,48 @@ -# 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 + + - repo: https://github.com/Yelp/detect-secrets + rev: v0.14.3 + hooks: + - id: detect-secrets + - 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.2 hooks: - id: proselint types: [plain-text] exclude: LICENSE - - repo: https://github.com/Yelp/detect-secrets - rev: v0.13.0 - hooks: - - id: detect-secrets - - repo: https://git.shore.co.il/nimrod/docker-pre-commit.git/ - rev: v0.3.0 + + - repo: https://github.com/executablebooks/mdformat.git + rev: 0.5.3 hooks: - - id: docker-compose - - id: hadolint - - repo: https://git.shore.co.il/nimrod/shell-pre-commit.git/ + - 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 diff --git a/README.md b/README.md index 039ae65b88e84222c7ca0f2ee8320ce8be8d4f19..0ebcbddb838e50cd44ff2b6d7f10d925f7605894 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Secondary DNS server +[](https://git.shore.co.il/shore/secondary-dns-docker/-/commits/master) + > Secondary DNS server Docker image. ## License @@ -8,7 +10,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://www.shore.co.il/git/>.