From aa4baf3744491e2cb07c9cd21564ddbf81e6a174 Mon Sep 17 00:00:00 2001 From: cytopia Date: Tue, 30 Mar 2021 16:45:19 +0200 Subject: [PATCH 1/3] Fix build pipeline --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 1ca35bf..33b5cfd 100644 --- a/Makefile +++ b/Makefile @@ -72,6 +72,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 \ From af1d8b0541271801bb20034d23b13a21953513a7 Mon Sep 17 00:00:00 2001 From: cytopia Date: Tue, 30 Mar 2021 16:48:24 +0200 Subject: [PATCH 2/3] Stable vs Point-in-time releases --- .github/workflows/nightly.yml | 1 - Makefile | 40 ++++++++++++++++++++++++++++++++++- README.md | 16 ++++++++++++++ 3 files changed, 55 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 0e55717..54b1ebf 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -29,7 +29,6 @@ jobs: - 'latest' refs: - 'master' - - '0.3' steps: # ------------------------------------------------------------ diff --git a/Makefile b/Makefile index 33b5cfd..5ec1efa 100644 --- a/Makefile +++ b/Makefile @@ -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 . diff --git a/README.md b/README.md index 6a13132..3a9f2c2 100644 --- a/README.md +++ b/README.md @@ -56,10 +56,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-` | Latest stable version when this repository was git tagged | + ## Docker mounts From 44d08ec921d7ec5c8b7ac9676f94ae1add3f403c Mon Sep 17 00:00:00 2001 From: cytopia Date: Tue, 30 Mar 2021 16:48:40 +0200 Subject: [PATCH 3/3] Update related projects --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 3a9f2c2..ed39635 100644 --- a/README.md +++ b/README.md @@ -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] **•** @@ -108,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 **[1]** | +| [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 | @@ -151,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