Loading .gitlab-ci.yml 0 → 100644 +31 −0 Original line number Diff line number Diff line image: docker:stable variables: DOCKER_HOST: "tcp://docker:2375/" DOCKER_DRIVER: "overlay2" DOCKER_TLS_CERTDIR: "" CONTACT_REGISTRY: "yes" services: - docker:dind before_script: - docker info - docker login -u gitlab-ci-token -p "$CI_JOB_TOKEN" "$CI_REGISTRY" - apk update && apk add bash build: except: [master] variables: REPO: ${CI_REGISTRY_IMAGE}/build:${CI_PIPELINE_ID} script: - docker build . --tag=${REPO} - docker push ${REPO} build:master: only: [master] except: [] extends: [build] after_script: - docker tag ${REPO} ${CI_REGISTRY_IMAGE}:latest - docker push ${CI_REGISTRY_IMAGE}:latest .gitlint 0 → 100644 +7 −0 Original line number Diff line number Diff line [general] ignore=body-trailing-whitespace,body-is-missing [author-valid-email] regex=.*@[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9](\.[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9])+ # vim: ft=cfg .pre-commit-config.yaml 0 → 100644 +33 −0 Original line number Diff line number Diff line repos: - repo: meta hooks: - id: check-hooks-apply - repo: https://github.com/pre-commit/pre-commit-hooks rev: v2.3.0 hooks: - id: check-added-large-files - id: check-byte-order-marker - id: check-case-conflict - id: check-merge-conflict - id: check-yaml - id: end-of-file-fixer - id: trailing-whitespace exclude_types: [markdown] - repo: https://gitlab.com/devopshq/gitlab-ci-linter rev: v1.0.1 hooks: - id: gitlab-ci-linter args: ['--server', 'https://code.kodo.org.uk'] - repo: https://github.com/pryorda/dockerfilelint-precommit-hooks rev: v0.1.0 hooks: - id: dockerfilelint - repo: https://github.com/jorisroovers/gitlint rev: v0.13.1 hooks: - id: gitlint Dockerfile 0 → 100644 +11 −0 Original line number Diff line number Diff line # syntax = docker/dockerfile:1.0-experimental FROM debian:buster-slim as collect COPY collect-binaries.bash /bin/collect-binaries RUN collect-binaries /bin/bash FROM scratch ENV PATH=/scripts:/bin COPY --from=collect /stage / COPY collect-binaries.bash /scripts/collect-binaries ENTRYPOINT ["/bin/bash"] README.md 0 → 100644 +38 −0 Original line number Diff line number Diff line [![pipeline-status][]][master-commit] docker-build-helpers ==================== Helper scripts for building Docker images. Install ------- The easiest way to add these scripts to a build stage is to copy from the supplied Docker image: ```dockerfile COPY --from=docker.kodo.org.uk/kodo.org.uk/docker-build-helpers:latest /scripts /bin RUN collect-binaries [...] ``` Usage ----- To view the help text for a particular script, run it with Docker; for example the `collect-binaries` script: ```shell docker run --rm docker.kodo.org.uk/kodo.org.uk/docker-build-helpers collect-binaries --help ``` --- [pipeline-status]: https://code.kodo.org.uk/kodo.org.uk/docker-build-helpers/badges/master/pipeline.svg [master-commit]: https://code.kodo.org.uk/kodo.org.uk/docker-build-helpers/-/commits/master Loading
.gitlab-ci.yml 0 → 100644 +31 −0 Original line number Diff line number Diff line image: docker:stable variables: DOCKER_HOST: "tcp://docker:2375/" DOCKER_DRIVER: "overlay2" DOCKER_TLS_CERTDIR: "" CONTACT_REGISTRY: "yes" services: - docker:dind before_script: - docker info - docker login -u gitlab-ci-token -p "$CI_JOB_TOKEN" "$CI_REGISTRY" - apk update && apk add bash build: except: [master] variables: REPO: ${CI_REGISTRY_IMAGE}/build:${CI_PIPELINE_ID} script: - docker build . --tag=${REPO} - docker push ${REPO} build:master: only: [master] except: [] extends: [build] after_script: - docker tag ${REPO} ${CI_REGISTRY_IMAGE}:latest - docker push ${CI_REGISTRY_IMAGE}:latest
.gitlint 0 → 100644 +7 −0 Original line number Diff line number Diff line [general] ignore=body-trailing-whitespace,body-is-missing [author-valid-email] regex=.*@[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9](\.[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9])+ # vim: ft=cfg
.pre-commit-config.yaml 0 → 100644 +33 −0 Original line number Diff line number Diff line repos: - repo: meta hooks: - id: check-hooks-apply - repo: https://github.com/pre-commit/pre-commit-hooks rev: v2.3.0 hooks: - id: check-added-large-files - id: check-byte-order-marker - id: check-case-conflict - id: check-merge-conflict - id: check-yaml - id: end-of-file-fixer - id: trailing-whitespace exclude_types: [markdown] - repo: https://gitlab.com/devopshq/gitlab-ci-linter rev: v1.0.1 hooks: - id: gitlab-ci-linter args: ['--server', 'https://code.kodo.org.uk'] - repo: https://github.com/pryorda/dockerfilelint-precommit-hooks rev: v0.1.0 hooks: - id: dockerfilelint - repo: https://github.com/jorisroovers/gitlint rev: v0.13.1 hooks: - id: gitlint
Dockerfile 0 → 100644 +11 −0 Original line number Diff line number Diff line # syntax = docker/dockerfile:1.0-experimental FROM debian:buster-slim as collect COPY collect-binaries.bash /bin/collect-binaries RUN collect-binaries /bin/bash FROM scratch ENV PATH=/scripts:/bin COPY --from=collect /stage / COPY collect-binaries.bash /scripts/collect-binaries ENTRYPOINT ["/bin/bash"]
README.md 0 → 100644 +38 −0 Original line number Diff line number Diff line [![pipeline-status][]][master-commit] docker-build-helpers ==================== Helper scripts for building Docker images. Install ------- The easiest way to add these scripts to a build stage is to copy from the supplied Docker image: ```dockerfile COPY --from=docker.kodo.org.uk/kodo.org.uk/docker-build-helpers:latest /scripts /bin RUN collect-binaries [...] ``` Usage ----- To view the help text for a particular script, run it with Docker; for example the `collect-binaries` script: ```shell docker run --rm docker.kodo.org.uk/kodo.org.uk/docker-build-helpers collect-binaries --help ``` --- [pipeline-status]: https://code.kodo.org.uk/kodo.org.uk/docker-build-helpers/badges/master/pipeline.svg [master-commit]: https://code.kodo.org.uk/kodo.org.uk/docker-build-helpers/-/commits/master