This repository was archived by the owner on Dec 16, 2025. It is now read-only.
✨ use new builder image approach#133
Merged
Merged
Conversation
this commit updates builder images and adds a make target so that we copy the static executables right from the container image. it's fast and we don't have to pull it from the internet again and again if we have the builder image present locally. This commit also updates go to 1.21.8 patch version. Signed-off-by: kranurag7 <anurag.kumar@syself.com>
Signed-off-by: kranurag7 <anurag.kumar@syself.com>
chess-knight
approved these changes
Mar 22, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #128
this commit updates builder images and adds a make target so that we copy the static executables right from the container image. it's fast and we don't have to pull it from the internet again and again if we have the builder image present locally.
And then invoke any of the following make targets because these targets depend on the builder image.
Here's the output from my machine:
Details
$ make lint-yaml make lint-yaml-ci make lint-links make lint-dockerfile make lint-golang make lint-golang-ci make format-golang make generate-modules docker run --rm -t -i \ -v /root/go/pkg:/go/pkg \ -v /root/cluster-stack-provider-openstack:/src/cluster-stack-provider-openstack \ ghcr.io/sovereigncloudstack/cspo-builder:0.1.0 lint-yaml; make: Entering directory '/src/cluster-stack-provider-openstack' yamllint --version yamllint 1.35.1 yamllint -c .yamllint.yaml --strict . make: Leaving directory '/src/cluster-stack-provider-openstack' docker run --rm -t -i \ -v /root/go/pkg:/go/pkg \ -v /root/cluster-stack-provider-openstack:/src/cluster-stack-provider-openstack \ ghcr.io/sovereigncloudstack/cspo-builder:0.1.0 lint-yaml-ci; make: Entering directory '/src/cluster-stack-provider-openstack' yamllint --version yamllint 1.35.1 yamllint -c .yamllint.yaml . --format github make: Leaving directory '/src/cluster-stack-provider-openstack' docker run --rm -t -i \ -v /root/cluster-stack-provider-openstack:/src/cluster-stack-provider-openstack \ ghcr.io/sovereigncloudstack/cspo-builder:0.1.0 lint-links; make: Entering directory '/src/cluster-stack-provider-openstack' lychee --config .lychee.toml ./*.md ./docs/**/*.md 34/34 ━━━━━━━━━━━━━━━━━━━━ Finished extracting links make: Leaving directory '/src/cluster-stack-provider-openstack' docker run --rm -t -i \ -v /root/go/pkg:/go/pkg \ -v /root/cluster-stack-provider-openstack:/src/cluster-stack-provider-openstack \ ghcr.io/sovereigncloudstack/cspo-builder:0.1.0 lint-dockerfile; make: Entering directory '/src/cluster-stack-provider-openstack' hadolint --version Haskell Dockerfile Linter 2.12.0 hadolint -t error ./images/cache/Dockerfile ./images/builder/Dockerfile ./images/cspo/Dockerfile [{"code":"DL3007","column":1,"file":"./images/builder/Dockerfile","level":"warning","line":24,"message":"Using latest is prone to errors if the image will ever docker run --rm -t -i \ -v /root/go/pkg:/go/pkg \ -v /root/cluster-stack-provider-openstack:/src/cluster-stack-provider-openstack \ ghcr.io/sovereigncloudstack/cspo-builder:0.1.0 lint-golang; make: Entering directory '/src/cluster-stack-provider-openstack' go version go version go1.21.8 linux/amd64 golangci-lint version golangci-lint has version 1.56.2 built with go1.22.0 from 58a724a0 on 2024-02-15T18:01:51Z golangci-lint run -v INFO [config_reader] Config search paths: [./ /src/cluster-stack-provider-openstack /src /] INFO [config_reader] Used config file .golangci.yml INFO [lintersdb] Active 47 linters: [asasalint asciicheck bidichk bodyclose containedctx contextcheck durationcheck errchkjson errname errorlint exhaustive expo INFO [loader] Go packages loading at mode 575 (files|name|deps|exports_file|types_sizes|compiled_files|imports) took 19.166665856s INFO [runner/filename_unadjuster] Pre-built 0 adjustments in 6.264492ms INFO [linters_context/goanalysis] analyzers took 0s with no stages INFO [runner] Issues before processing: 12, after processing: 0 INFO [runner] Processors filtering stat (out/in): skip_files: 12/12, filename_unadjuster: 12/12, path_prettifier: 12/12, skip_dirs: 12/12, nolint: 0/9, cgo: 12/ INFO [runner] processing took 2.596524ms with stages: nolint: 1.386458ms, identifier_marker: 694.72µs, autogenerated_exclude: 225.582µs, path_prettifier: 149.95 INFO [runner] linters took 545.870908ms with stages: goanalysis_metalinter: 543.154823ms INFO File cache stats: 0 entries of total size 0B INFO Memory: 199 samples, avg is 28.6MB, max is 100.1MB INFO Execution took 19.724938345s make: Leaving directory '/src/cluster-stack-provider-openstack' docker run --rm -t -i \ -v /root/go/pkg:/go/pkg \ -v /root/cluster-stack-provider-openstack:/src/cluster-stack-provider-openstack \ ghcr.io/sovereigncloudstack/cspo-builder:0.1.0 lint-golang-ci; make: Entering directory '/src/cluster-stack-provider-openstack' go version go version go1.21.8 linux/amd64 golangci-lint version golangci-lint has version 1.56.2 built with go1.22.0 from 58a724a0 on 2024-02-15T18:01:51Z golangci-lint run -v --out-format=github-actions INFO [config_reader] Config search paths: [./ /src/cluster-stack-provider-openstack /src /] INFO [config_reader] Used config file .golangci.yml INFO [lintersdb] Active 47 linters: [asasalint asciicheck bidichk bodyclose containedctx contextcheck durationcheck errchkjson errname errorlint exhaustive expo INFO [loader] Go packages loading at mode 575 (types_sizes|compiled_files|exports_file|imports|deps|files|name) took 19.280973388s INFO [runner/filename_unadjuster] Pre-built 0 adjustments in 6.054439ms INFO [linters_context/goanalysis] analyzers took 0s with no stages INFO [runner] Issues before processing: 12, after processing: 0 INFO [runner] Processors filtering stat (out/in): path_prettifier: 12/12, skip_dirs: 12/12, nolint: 0/9, identifier_marker: 12/12, cgo: 12/12, filename_unadjust INFO [runner] processing took 2.499632ms with stages: nolint: 1.464439ms, identifier_marker: 604.978µs, autogenerated_exclude: 188.612µs, path_prettifier: 117.2 INFO [runner] linters took 531.53592ms with stages: goanalysis_metalinter: 528.934117ms INFO File cache stats: 0 entries of total size 0B INFO Memory: 200 samples, avg is 28.1MB, max is 96.1MB INFO Execution took 19.824791139s make: Leaving directory '/src/cluster-stack-provider-openstack' docker run --rm -t -i \ -v /root/go/pkg:/go/pkg \ -v /root/cluster-stack-provider-openstack:/src/cluster-stack-provider-openstack \ ghcr.io/sovereigncloudstack/cspo-builder:0.1.0 format-golang; make: Entering directory '/src/cluster-stack-provider-openstack' go version go version go1.21.8 linux/amd64 golangci-lint version golangci-lint has version 1.56.2 built with go1.22.0 from 58a724a0 on 2024-02-15T18:01:51Z golangci-lint run -v --fix INFO [config_reader] Config search paths: [./ /src/cluster-stack-provider-openstack /src /] INFO [config_reader] Used config file .golangci.yml INFO [lintersdb] Active 47 linters: [asasalint asciicheck bidichk bodyclose containedctx contextcheck durationcheck errchkjson errname errorlint exhaustive exportloopref forcetypeassert gci gocritic godot gofmt gofumpt goprintffuncname gosec gosimple govet importas ineffassign loggercheck makezero misspell nakedret nilerr noctx nolintlint nosprintfhostport prealloc predeclared reassign revive rowserrcheck staticcheck stylecheck tagliatelle thelper tparallel unconvert unused usestdlibvars wastedassign wrapcheck] INFO [loader] Go packages loading at mode 575 (compiled_files|imports|name|types_sizes|deps|exports_file|files) took 19.231407223s INFO [runner/filename_unadjuster] Pre-built 0 adjustments in 4.857484ms INFO [linters_context/goanalysis] analyzers took 0s with no stages INFO [runner] fixer took 0s with no stages INFO [runner] Issues before processing: 12, after processing: 0 INFO [runner] Processors filtering stat (out/in): identifier_marker: 12/12, filename_unadjuster: 12/12, skip_dirs: 12/12, skip_files: 12/12, autogenerated_exclude: 12/12, exclude: 12/12, nolint: 0/9, cgo: 12/12, path_prettifier: 12/12, exclude-rules: 9/12 INFO [runner] processing took 1.983836ms with stages: nolint: 1.123755ms, identifier_marker: 451.256µs, autogenerated_exclude: 169.042µs, path_prettifier: 100.982µs, skip_dirs: 95.911µs, cgo: 19.37µs, fixer: 13.66µs, exclude-rules: 6.07µs, filename_unadjuster: 1.72µs, max_same_issues: 400ns, sort_results: 270ns, skip_files: 230ns, exclude: 230ns, severity-rules: 200ns, uniq_by_line: 160ns, max_from_linter: 120ns, source_code: 110ns, diff: 90ns, max_per_file_from_linter: 90ns, path_shortener: 90ns, path_prefixer: 80ns INFO [runner] linters took 575.996901ms with stages: goanalysis_metalinter: 573.925284ms INFO File cache stats: 0 entries of total size 0B INFO Memory: 200 samples, avg is 28.8MB, max is 92.1MB INFO Execution took 19.817485395s make: Leaving directory '/src/cluster-stack-provider-openstack' docker run --rm -t -i \ -v /root/go/pkg:/go/pkg \ -v /root/cluster-stack-provider-openstack:/src/cluster-stack-provider-openstack \ ghcr.io/sovereigncloudstack/cspo-builder:0.1.0 generate-modules; make: Entering directory '/src/cluster-stack-provider-openstack' ./hack/golang-modules-update.sh all modules verified make: Leaving directory '/src/cluster-stack-provider-openstack' $ echo $status 0