Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.4 #10

Merged
merged 3 commits into from
Mar 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ jobs:
- 'latest'
refs:
- 'master'
- '0.3'
steps:

# ------------------------------------------------------------
Expand Down
41 changes: 40 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,45 @@ help:
# --------------------------------------------------------------------------------------------------
# Lint Targets
# --------------------------------------------------------------------------------------------------
lint:
lint: _lint-files
lint: _lint-workflow

.PHONY: _lint-workflow
_lint-workflow:
@echo "################################################################################"
@echo "# Lint Workflow"
@echo "################################################################################"
@\
GIT_CURR_MAJOR="$$( git tag | sort -V | tail -1 | sed 's|\.[0-9]*$$||g' )"; \
GIT_CURR_MINOR="$$( git tag | sort -V | tail -1 | sed 's|^[0-9]*\.||g' )"; \
GIT_NEXT_TAG="$${GIT_CURR_MAJOR}.$$(( GIT_CURR_MINOR + 1 ))"; \
AVAILABLE_REFS="$$( \
grep 'refs:' -A 100 .github/workflows/nightly.yml \
| grep 'steps:' -B 100 \
| grep -E '[[:space:]]+\-' \
| sed 's/.*\s//g' \
| sed "s/'//g" \
| sed 's/"//g' \
| grep -v master || true \
)"; \
if [ -n "$${AVAILABLE_REFS}" ]; then \
if ! grep 'refs:' -A 100 .github/workflows/nightly.yml \
| grep " - '$${GIT_NEXT_TAG}'" >/dev/null; then \
echo "[ERR] New Tag required in .github/workflows/nightly.yml: $${GIT_NEXT_TAG}"; \
exit 1; \
else \
echo "[OK] Git Tag present in .github/workflows/nightly.yml: $${GIT_NEXT_TAG}"; \
fi \
else \
echo "[OK] No Tags defined at all in .github/workflows/nightly.yml"; \
fi
@echo

.PHONY: lint-files
_lint-files:
@echo "################################################################################"
@echo "# Lint Files"
@echo "################################################################################"
@docker run --rm -v $(CURRENT_DIR):/data cytopia/file-lint file-cr --text --ignore '.git/,.github/,tests/' --path .
@docker run --rm -v $(CURRENT_DIR):/data cytopia/file-lint file-crlf --text --ignore '.git/,.github/,tests/' --path .
@docker run --rm -v $(CURRENT_DIR):/data cytopia/file-lint file-trailing-single-newline --text --ignore '.git/,.github/,tests/' --path .
Expand Down Expand Up @@ -72,6 +110,7 @@ _test-version:
LATEST="$$( \
curl -L -sS https://github.com/PyCQA/pylint/releases/ \
| tac | tac \
| grep -Eo 'PyCQA/pylint/releases/tag/(pylint-)?[.0-9]+"' \
| grep -Eo "PyCQA/pylint/releases/tag/(pylint-)?[.0-9]+" \
| sed 's/.*tag\///g' \
| sort -u \
Expand Down
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
> [goimports][gimp-git-lnk] **•**
> [golint][glint-git-lnk] **•**
> [jsonlint][jlint-git-lnk] **•**
> [kubeval][kubeval-git-lnk] **•**
> [linkcheck][linkcheck-git-lnk] **•**
> [mypy][mypy-git-lnk] **•**
> [php-cs-fixer][pcsf-git-lnk] **•**
Expand Down Expand Up @@ -56,10 +57,26 @@ The image is built nightly against multiple stable versions and pushed to Docker

## Available Docker image versions

#### Rolling releaess

The following Docker image tags are rolling releases and are built and updated every night.

[![nightly](https://github.com/cytopia/docker-pylint/workflows/nightly/badge.svg)](https://github.com/cytopia/docker-pylint/actions?query=workflow%3Anightly)

| Docker tag | Build from |
|------------|------------|
| `latest` | Latest stable pylint version |

#### Point in time releases

The following Docker image tags are built once and can be used for reproducible builds. Its version never changes so you will have to update tags in your pipelines from time to time in order to stay up-to-date.

[![build](https://github.com/cytopia/docker-pylint/workflows/build/badge.svg)](https://github.com/cytopia/docker-pylint/actions?query=workflow%3Abuild)

| Docker tag | Explanation |
|-----------------|-------------|
| `latest-<TAG>` | Latest stable version when this repository was git tagged |


## Docker mounts

Expand Down Expand Up @@ -92,6 +109,7 @@ linter below for reproducible local or remote CI tests:
| [golint][glint-git-lnk] | [![glint-hub-img]][glint-hub-lnk] | Go | Lint Go code |
| [eslint][elint-git-lnk] | [![elint-hub-img]][elint-hub-lnk] | Javascript | Lint Javascript code |
| [jsonlint][jlint-git-lnk] | [![jlint-hub-img]][jlint-hub-lnk] | JSON | Lint JSON files **<sup>[1]</sup>** |
| [kubeval][kubeval-git-lnk] | [![kubeval-hub-img]][kubeval-hub-lnk] | K8s | Lint Kubernetes files |
| [checkmake][cm-git-lnk] | [![cm-hub-img]][cm-hub-lnk] | Make | Lint Makefiles |
| [phpcbf][pcbf-git-lnk] | [![pcbf-hub-img]][pcbf-hub-lnk] | PHP | PHP Code Beautifier and Fixer |
| [phpcs][pcs-git-lnk] | [![pcs-hub-img]][pcs-hub-lnk] | PHP | PHP Code Sniffer |
Expand Down Expand Up @@ -135,6 +153,10 @@ linter below for reproducible local or remote CI tests:
[alint-hub-img]: https://img.shields.io/docker/pulls/cytopia/ansible-lint.svg
[alint-hub-lnk]: https://hub.docker.com/r/cytopia/ansible-lint

[kubeval-git-lnk]: https://github.com/cytopia/docker-kubeval
[kubeval-hub-img]: https://img.shields.io/docker/pulls/cytopia/kubeval.svg
[kubeval-hub-lnk]: https://hub.docker.com/r/cytopia/kubeval

[gfmt-git-lnk]: https://github.com/cytopia/docker-gofmt
[gfmt-hub-img]: https://img.shields.io/docker/pulls/cytopia/gofmt.svg
[gfmt-hub-lnk]: https://hub.docker.com/r/cytopia/gofmt
Expand Down