Skip to content

Commit

Permalink
Merge pull request #5 from cytopia/release-0.3
Browse files Browse the repository at this point in the history
Release v0.3
  • Loading branch information
cytopia authored Jun 10, 2019
2 parents 4a968d4 + 7ea5cbd commit 9c75111
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 16 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
FROM alpine:latest as builder

# Install dependencies
RUN set -x \
&& apk add --no-cache \
nodejs-current \
Expand All @@ -19,6 +18,9 @@ RUN set -x \


FROM alpine:latest
LABEL \
maintainer="cytopia <[email protected]>" \
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
Expand Down
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,22 @@

> #### 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) |
> [terraform-docs](https://github.com/cytopia/docker-terraform-docs) |
> [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)<sup>[1]</sup>, which adds
Tiny Alpine-based multistage-build dockerized version of [jsonlint](https://github.com/zaach/jsonlint)<sup>[1]</sup>, 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.

<sup>[1] Official project: https://github.com/zaach/jsonlint</sup>

Expand Down Expand Up @@ -57,10 +59,10 @@ where your JSON files are located.
```bash
$ docker run --rm cytopia/jsonlint --help

Usage: cytopia/jsonlint jsonlint [-sti] <PATH-TO-FILE>
cytopia/jsonlint jsonlint [-sti] <GLOB-PATTERN>
cytopia/jsonlint jsonlint --version
cytopia/jsonlint jsonlint --help
Usage: cytopia/jsonlint [-sti] <PATH-TO-FILE>
cytopia/jsonlint [-sti] <GLOB-PATTERN>
cytopia/jsonlint --version
cytopia/jsonlint --help

-s sort object keys
-t CHAR character(s) to use for indentation
Expand Down
8 changes: 4 additions & 4 deletions data/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ REG_GLOB='(\*.+)|(.+\*)|(.+\*.+)' # Regex pattern to identify valid glob support
### Show Usage
###
print_usage() {
>&2 echo "Usage: cytopia/jsonlint jsonlint [-sti] <PATH-TO-FILE>"
>&2 echo " cytopia/jsonlint jsonlint [-sti] <GLOB-PATTERN>"
>&2 echo " cytopia/jsonlint jsonlint --version"
>&2 echo " cytopia/jsonlint jsonlint --help"
>&2 echo "Usage: cytopia/jsonlint [-sti] <PATH-TO-FILE>"
>&2 echo " cytopia/jsonlint [-sti] <GLOB-PATTERN>"
>&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"
Expand Down

0 comments on commit 9c75111

Please sign in to comment.