From 7ea5cbd95512ff4c1ce90d160938b9c402ffe029 Mon Sep 17 00:00:00 2001 From: cytopia Date: Mon, 10 Jun 2019 14:37:36 +0200 Subject: [PATCH] Release v0.3 --- .travis.yml | 8 ++++---- Dockerfile | 4 +++- README.md | 16 +++++++++------- data/docker-entrypoint.sh | 8 ++++---- 4 files changed, 20 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index 403b714..702c753 100644 --- a/.travis.yml +++ b/.travis.yml @@ -60,13 +60,13 @@ before_script: script: # Push to docker hub on success - if [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then - make login USER="${DOCKER_USERNAME}" PASS="${DOCKER_PASSWORD}"; + while ! make login USER="${DOCKER_USERNAME}" PASS="${DOCKER_PASSWORD}"; do sleep 1; done; if [ -n "${TRAVIS_TAG}" ]; then - make push TAG="${VERSION}-${TRAVIS_TAG}"; + while ! make push TAG="${VERSION}-${TRAVIS_TAG}"; do sleep 1; done; elif [ "${TRAVIS_BRANCH}" == "master" ]; then - make push TAG=${VERSION}; + while ! make push TAG=${VERSION}; do sleep 1; done; elif [[ ${TRAVIS_BRANCH} =~ ^(release-[.0-9]+)$ ]]; then - make push TAG="${VERSION}-${TRAVIS_BRANCH}"; + while ! make push TAG="${VERSION}-${TRAVIS_BRANCH}"; do sleep 1; done; else echo "Skipping branch ${TRAVIS_BRANCH}"; fi diff --git a/Dockerfile b/Dockerfile index 84c2342..82173a3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,5 @@ FROM alpine:latest as builder -# Install dependencies RUN set -x \ && apk add --no-cache \ nodejs-current \ @@ -19,6 +18,9 @@ RUN set -x \ FROM alpine:latest +LABEL \ + maintainer="cytopia " \ + repo="https://github.com/cytopia/docker-jsonlint" RUN set -x \ && apk add --no-cache nodejs-current bash \ && ln -s /node_modules/.bin/jsonlint /usr/bin/jsonlint diff --git a/README.md b/README.md index 3f87794..12c76f9 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ > #### All awesome CI images > +> [ansible](https://github.com/cytopia/docker-ansible) | > [ansible-lint](https://github.com/cytopia/docker-ansible-lint) | > [awesome-ci](https://github.com/cytopia/awesome-ci) | > [jsonlint](https://github.com/cytopia/docker-jsonlint) | @@ -16,13 +17,14 @@ > [yamllint](https://github.com/cytopia/docker-yamllint) -[![Docker hub](http://dockeri.co/image/cytopia/jsonlint)](https://hub.docker.com/r/cytopia/jsonlint) +View **[Dockerfile](https://github.com/cytopia/docker-jsonlint/blob/master/Dockerfile)** on GitHub. +[![Docker hub](http://dockeri.co/image/cytopia/jsonlint)](https://hub.docker.com/r/cytopia/jsonlint) -Dockerized version of [jsonlint](https://github.com/zaach/jsonlint)[1], which adds +Tiny Alpine-based multistage-build dockerized version of [jsonlint](https://github.com/zaach/jsonlint)[1], which adds additional functionality such as **failure on wrong indentation**, lint **multiple files via wildcard** search and being able to **ignore files** via wildcards. -The image is built nightly against the latest stable version of `jsonlint` and pushed to Dockerhub. +The image is built nightly against multiple stable versions and pushed to Dockerhub. [1] Official project: https://github.com/zaach/jsonlint @@ -57,10 +59,10 @@ where your JSON files are located. ```bash $ docker run --rm cytopia/jsonlint --help -Usage: cytopia/jsonlint jsonlint [-sti] - cytopia/jsonlint jsonlint [-sti] - cytopia/jsonlint jsonlint --version - cytopia/jsonlint jsonlint --help +Usage: cytopia/jsonlint [-sti] + cytopia/jsonlint [-sti] + cytopia/jsonlint --version + cytopia/jsonlint --help -s sort object keys -t CHAR character(s) to use for indentation diff --git a/data/docker-entrypoint.sh b/data/docker-entrypoint.sh index b843d7c..cacc225 100755 --- a/data/docker-entrypoint.sh +++ b/data/docker-entrypoint.sh @@ -19,10 +19,10 @@ REG_GLOB='(\*.+)|(.+\*)|(.+\*.+)' # Regex pattern to identify valid glob support ### Show Usage ### print_usage() { - >&2 echo "Usage: cytopia/jsonlint jsonlint [-sti] " - >&2 echo " cytopia/jsonlint jsonlint [-sti] " - >&2 echo " cytopia/jsonlint jsonlint --version" - >&2 echo " cytopia/jsonlint jsonlint --help" + >&2 echo "Usage: cytopia/jsonlint [-sti] " + >&2 echo " cytopia/jsonlint [-sti] " + >&2 echo " cytopia/jsonlint --version" + >&2 echo " cytopia/jsonlint --help" >&2 echo >&2 echo " -s sort object keys" >&2 echo " -t CHAR character(s) to use for indentation"