From 1f1be2c12b289dd98250117ecbb4a2b28455ca6c Mon Sep 17 00:00:00 2001 From: Chmouel Boudjnah Date: Wed, 25 Oct 2023 05:05:57 +0200 Subject: [PATCH 1/3] Use ruff in pre-commit We did move from pylint to ruff for the linter pipelinerun. This commit updates the pre-commit to use ruff instead of pylint. Signed-off-by: Chmouel Boudjnah --- .pre-commit-config.yaml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3dfeb4fbc..18dcee052 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,6 +22,10 @@ repos: hooks: - id: codespell files: '^(docs/content|pkg|test)/.*' +- repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.1.2 + hooks: + - id: ruff - repo: local hooks: - id: black @@ -29,12 +33,6 @@ repos: language: system entry: black name: "Python check code Formatter" - - id: pylint - name: "Python linter" - entry: pylint - language: system - types: [python] - args: ["-rn", "-sn"] - id: lint-markdown name: "Lint Markdown" entry: make From f0b6fdd42dbb016f596488e2e1e4241cae491ca2 Mon Sep 17 00:00:00 2001 From: Chmouel Boudjnah Date: Wed, 25 Oct 2023 05:08:08 +0200 Subject: [PATCH 2/3] pre-commit rule update Updating all pre-commit with pre-commit autoupdate. Signed-off-by: Chmouel Boudjnah --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 18dcee052..4f23b149c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ default_install_hook_types: ["pre-push"] exclude: '(^docs/themes/hugo-book|^vendor|.*golden$|^\.vale)' repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: check-added-large-files - id: check-toml @@ -18,7 +18,7 @@ repos: hooks: - id: gitlint - repo: https://github.com/codespell-project/codespell - rev: v2.2.4 + rev: v2.2.6 hooks: - id: codespell files: '^(docs/content|pkg|test)/.*' From 3ccb287254348af8dc8a10fb67399a1cf2627997 Mon Sep 17 00:00:00 2001 From: Chmouel Boudjnah Date: Wed, 25 Oct 2023 05:15:55 +0200 Subject: [PATCH 3/3] Update container images SHA256 to the latest Using https://github.com/chmouel/waashup to update the containers to the latest container image Signed-off-by: Chmouel Boudjnah --- .tekton/e2e-tests.yaml | 2 +- .tekton/generate-coverage-release.yaml | 6 +++--- .tekton/go.yaml | 6 +++--- Dockerfile | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.tekton/e2e-tests.yaml b/.tekton/e2e-tests.yaml index 2e6d1719d..c030517ca 100644 --- a/.tekton/e2e-tests.yaml +++ b/.tekton/e2e-tests.yaml @@ -41,7 +41,7 @@ spec: workspaces: - name: source steps: - - image: registry.access.redhat.com/ubi9/go-toolset@sha256:d55ff49e9b6907d5f50290f8bcffa15657470da009a5f982202780c4122ce2dd + - image: registry.access.redhat.com/ubi9/go-toolset@sha256:82d9bc5d3ceb43635288880f26207201e55d1c688a60ebbfff4f54d4963a62a1 env: - name: GOCACHE value: $(workspaces.source.path)/go-build-cache/cache diff --git a/.tekton/generate-coverage-release.yaml b/.tekton/generate-coverage-release.yaml index 5722d3aa6..d9a52d1cb 100644 --- a/.tekton/generate-coverage-release.yaml +++ b/.tekton/generate-coverage-release.yaml @@ -41,7 +41,7 @@ spec: workspaces: - name: source steps: - - image: registry.access.redhat.com/ubi9/go-toolset@sha256:d55ff49e9b6907d5f50290f8bcffa15657470da009a5f982202780c4122ce2dd + - image: registry.access.redhat.com/ubi9/go-toolset@sha256:82d9bc5d3ceb43635288880f26207201e55d1c688a60ebbfff4f54d4963a62a1 name: get-cache workingDir: $(workspaces.source.path) env: @@ -64,7 +64,7 @@ spec: curl http://uploader:8080/golang-cache.tar.gz|tar -z -x -f- || \ curl -X DELETE -F "file=golang-cache.tar.gz" http://uploader:8080/upload - name: unittest - image: registry.access.redhat.com/ubi9/go-toolset@sha256:d55ff49e9b6907d5f50290f8bcffa15657470da009a5f982202780c4122ce2dd + image: registry.access.redhat.com/ubi9/go-toolset@sha256:82d9bc5d3ceb43635288880f26207201e55d1c688a60ebbfff4f54d4963a62a1 workingDir: $(workspaces.source.path) env: - name: GOCACHE @@ -87,7 +87,7 @@ spec: steps: - name: codecov-run # Has everything we need in there and we already fetched it! - image: registry.access.redhat.com/ubi9/go-toolset@sha256:d55ff49e9b6907d5f50290f8bcffa15657470da009a5f982202780c4122ce2dd + image: registry.access.redhat.com/ubi9/go-toolset@sha256:82d9bc5d3ceb43635288880f26207201e55d1c688a60ebbfff4f54d4963a62a1 workingDir: $(workspaces.source.path) env: - name: CODECOV_TOKEN diff --git a/.tekton/go.yaml b/.tekton/go.yaml index 0f18d4c1d..6f5cefa49 100644 --- a/.tekton/go.yaml +++ b/.tekton/go.yaml @@ -38,7 +38,7 @@ spec: workspaces: - name: source steps: - - image: registry.access.redhat.com/ubi9/go-toolset@sha256:d55ff49e9b6907d5f50290f8bcffa15657470da009a5f982202780c4122ce2dd + - image: registry.access.redhat.com/ubi9/go-toolset@sha256:82d9bc5d3ceb43635288880f26207201e55d1c688a60ebbfff4f54d4963a62a1 env: - name: GOCACHE value: $(workspaces.source.path)/go-build-cache/cache @@ -72,7 +72,7 @@ spec: - name: unittest # we get bumped out when usingh the official image with docker.io # ratelimit so workaround this. - image: registry.access.redhat.com/ubi9/go-toolset@sha256:d55ff49e9b6907d5f50290f8bcffa15657470da009a5f982202780c4122ce2dd + image: registry.access.redhat.com/ubi9/go-toolset@sha256:82d9bc5d3ceb43635288880f26207201e55d1c688a60ebbfff4f54d4963a62a1 env: - name: GOCACHE value: $(workspaces.source.path)/go-build-cache/cache @@ -89,7 +89,7 @@ spec: - name: coverage # we get bumped out when usingh the official image with docker.io # ratelimit so workaround this. - image: registry.access.redhat.com/ubi9/go-toolset@sha256:d55ff49e9b6907d5f50290f8bcffa15657470da009a5f982202780c4122ce2dd + image: registry.access.redhat.com/ubi9/go-toolset@sha256:82d9bc5d3ceb43635288880f26207201e55d1c688a60ebbfff4f54d4963a62a1 env: - name: CODECOV_TOKEN valueFrom: diff --git a/Dockerfile b/Dockerfile index 93962e0a6..4c5a5c0a2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM registry.access.redhat.com/ubi9/go-toolset@sha256:a2bdd33c7fc0cda56eb3745e80820c1ee29efeaac720f7c52a59224a39003261 AS builder +FROM registry.access.redhat.com/ubi9/go-toolset@sha256:82d9bc5d3ceb43635288880f26207201e55d1c688a60ebbfff4f54d4963a62a1 AS builder ARG BINARY_NAME=pipelines-as-code-controller COPY . /src