mirror of
https://github.com/project-zot/zot.git
synced 2024-12-16 21:56:37 -05:00
build(tags): remove redundant build tag ui_base (#857)
It was not used for UI, it had become a CLI dependency with the same functionality as search Signed-off-by: Andrei Aaron <andaaron@cisco.com>
This commit is contained in:
parent
1afc5c8c3f
commit
98854337ff
28 changed files with 52 additions and 52 deletions
2
.github/workflows/branch-cov.yml
vendored
2
.github/workflows/branch-cov.yml
vendored
|
@ -38,7 +38,7 @@ jobs:
|
||||||
cd $GITHUB_WORKSPACE
|
cd $GITHUB_WORKSPACE
|
||||||
for i in $(find . -type f \( -name "*.go" -not -name "*_test.go" -not -name "generated.go" \)); do
|
for i in $(find . -type f \( -name "*.go" -not -name "*_test.go" -not -name "generated.go" \)); do
|
||||||
echo $i;
|
echo $i;
|
||||||
gobco -test '-tags=sync,search,scrub,metrics,ui_base,containers_image_openpgp' $i;
|
gobco -test '-tags=sync,search,scrub,metrics,containers_image_openpgp' $i;
|
||||||
gobco -test '-tags=minimal,containers_image_openpgp' $i;
|
gobco -test '-tags=minimal,containers_image_openpgp' $i;
|
||||||
done
|
done
|
||||||
env:
|
env:
|
||||||
|
|
2
.github/workflows/codeql-analysis.yml
vendored
2
.github/workflows/codeql-analysis.yml
vendored
|
@ -39,7 +39,7 @@ jobs:
|
||||||
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
|
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
|
||||||
env:
|
env:
|
||||||
CGO_ENABLED: 0
|
CGO_ENABLED: 0
|
||||||
GOFLAGS: "-tags=sync,search,scrub,metrics,ui_base,containers_image_openpgp"
|
GOFLAGS: "-tags=sync,search,scrub,metrics,containers_image_openpgp"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
|
|
2
.github/workflows/golangci-lint.yaml
vendored
2
.github/workflows/golangci-lint.yaml
vendored
|
@ -31,7 +31,7 @@ jobs:
|
||||||
|
|
||||||
# Optional: golangci-lint command line arguments.
|
# Optional: golangci-lint command line arguments.
|
||||||
# args: --issues-exit-code=0
|
# args: --issues-exit-code=0
|
||||||
args: --config ./golangcilint.yaml --enable-all --build-tags debug,needprivileges,sync,scrub,search,metrics,ui_base,containers_image_openpgp,lint ./cmd/... ./pkg/...
|
args: --config ./golangcilint.yaml --enable-all --build-tags debug,needprivileges,sync,scrub,search,metrics,containers_image_openpgp,lint ./cmd/... ./pkg/...
|
||||||
|
|
||||||
# Optional: show only new issues if it's a pull request. The default value is `false`.
|
# Optional: show only new issues if it's a pull request. The default value is `false`.
|
||||||
# only-new-issues: true
|
# only-new-issues: true
|
||||||
|
|
|
@ -45,7 +45,7 @@ make binary-minimal
|
||||||
```
|
```
|
||||||
|
|
||||||
For a zot that includes only the extensions that you specify,
|
For a zot that includes only the extensions that you specify,
|
||||||
the available extensions that can be used at the moment are: sync, scrub, metrics, search, ui_base .
|
the available extensions that can be used at the moment are: sync, scrub, metrics, search.
|
||||||
|
|
||||||
NOTES: When multiple extensions are used, they should be enlisted in the above presented order.
|
NOTES: When multiple extensions are used, they should be enlisted in the above presented order.
|
||||||
|
|
||||||
|
|
8
Makefile
8
Makefile
|
@ -19,7 +19,7 @@ TESTDATA := $(TOP_LEVEL)/test/data
|
||||||
OS ?= linux
|
OS ?= linux
|
||||||
ARCH ?= amd64
|
ARCH ?= amd64
|
||||||
BENCH_OUTPUT ?= stdout
|
BENCH_OUTPUT ?= stdout
|
||||||
EXTENSIONS ?= sync,search,scrub,metrics,ui_base,lint
|
EXTENSIONS ?= sync,search,scrub,metrics,lint
|
||||||
comma:= ,
|
comma:= ,
|
||||||
hyphen:= -
|
hyphen:= -
|
||||||
extended-name:=
|
extended-name:=
|
||||||
|
@ -59,7 +59,7 @@ binary-debug: modcheck swagger create-name build-metadata
|
||||||
|
|
||||||
.PHONY: cli
|
.PHONY: cli
|
||||||
cli: modcheck create-name build-metadata
|
cli: modcheck create-name build-metadata
|
||||||
env CGO_ENABLED=0 GOOS=$(OS) GOARCH=$(ARCH) go build -o bin/zli-$(OS)-$(ARCH) -buildmode=pie -tags $(EXTENSIONS),ui_base,containers_image_openpgp -v -trimpath -ldflags "-X zotregistry.io/zot/pkg/api/config.Commit=${COMMIT} -X zotregistry.io/zot/pkg/api/config.BinaryType=$(extended-name) -X zotregistry.io/zot/pkg/api/config.GoVersion=${GO_VERSION} -s -w" ./cmd/zli
|
env CGO_ENABLED=0 GOOS=$(OS) GOARCH=$(ARCH) go build -o bin/zli-$(OS)-$(ARCH) -buildmode=pie -tags $(EXTENSIONS),search,containers_image_openpgp -v -trimpath -ldflags "-X zotregistry.io/zot/pkg/api/config.Commit=${COMMIT} -X zotregistry.io/zot/pkg/api/config.BinaryType=$(extended-name) -X zotregistry.io/zot/pkg/api/config.GoVersion=${GO_VERSION} -s -w" ./cmd/zli
|
||||||
|
|
||||||
.PHONY: bench
|
.PHONY: bench
|
||||||
bench: modcheck create-name build-metadata
|
bench: modcheck create-name build-metadata
|
||||||
|
@ -280,12 +280,12 @@ bats-sync-verbose: binary binary-minimal check-skopeo $(BATS)
|
||||||
$(BATS) --trace -t -x -p --verbose-run --print-output-on-failure --show-output-of-passing-tests test/blackbox/sync.bats
|
$(BATS) --trace -t -x -p --verbose-run --print-output-on-failure --show-output-of-passing-tests test/blackbox/sync.bats
|
||||||
|
|
||||||
.PHONY: bats-cve
|
.PHONY: bats-cve
|
||||||
bats-cve: EXTENSIONS=ui_base
|
bats-cve: EXTENSIONS=search
|
||||||
bats-cve: binary cli check-skopeo $(BATS)
|
bats-cve: binary cli check-skopeo $(BATS)
|
||||||
$(BATS) --trace --print-output-on-failure test/blackbox/cve.bats
|
$(BATS) --trace --print-output-on-failure test/blackbox/cve.bats
|
||||||
|
|
||||||
.PHONY: bats-cve-verbose
|
.PHONY: bats-cve-verbose
|
||||||
bats-cve-verbose: EXTENSIONS=ui_base
|
bats-cve-verbose: EXTENSIONS=search
|
||||||
bats-cve-verbose: binary cli check-skopeo $(BATS)
|
bats-cve-verbose: binary cli check-skopeo $(BATS)
|
||||||
$(BATS) --trace -t -x -p --verbose-run --print-output-on-failure --show-output-of-passing-tests test/blackbox/cve.bats
|
$(BATS) --trace -t -x -p --verbose-run --print-output-on-failure --show-output-of-passing-tests test/blackbox/cve.bats
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//go:build sync && scrub && metrics && search && ui_base
|
//go:build sync && scrub && metrics && search
|
||||||
// +build sync,scrub,metrics,search,ui_base
|
// +build sync,scrub,metrics,search
|
||||||
|
|
||||||
package api_test
|
package api_test
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//go:build sync && scrub && metrics && search && ui_base && lint
|
//go:build sync && scrub && metrics && search && lint
|
||||||
// +build sync,scrub,metrics,search,ui_base,lint
|
// +build sync,scrub,metrics,search,lint
|
||||||
|
|
||||||
package api_test
|
package api_test
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//go:build ui_base || search
|
//go:build search
|
||||||
// +build ui_base search
|
// +build search
|
||||||
|
|
||||||
package cli
|
package cli
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//go:build search || ui_base
|
//go:build search
|
||||||
// +build search ui_base
|
// +build search
|
||||||
|
|
||||||
package cli
|
package cli
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//go:build ui_base && needprivileges
|
//go:build search && needprivileges
|
||||||
// +build ui_base,needprivileges
|
// +build search,needprivileges
|
||||||
|
|
||||||
package cli //nolint:testpackage
|
package cli //nolint:testpackage
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//go:build ui_base
|
//go:build search
|
||||||
// +build ui_base
|
// +build search
|
||||||
|
|
||||||
package cli //nolint:testpackage
|
package cli //nolint:testpackage
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//go:build search || ui_base
|
//go:build search
|
||||||
// +build search ui_base
|
// +build search
|
||||||
|
|
||||||
package cli
|
package cli
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//go:build ui_base
|
//go:build search
|
||||||
// +build ui_base
|
// +build search
|
||||||
|
|
||||||
package cli //nolint:testpackage
|
package cli //nolint:testpackage
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//go:build search || ui_base
|
//go:build search
|
||||||
// +build search ui_base
|
// +build search
|
||||||
|
|
||||||
package cli
|
package cli
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//go:build ui_base
|
//go:build search
|
||||||
// +build ui_base
|
// +build search
|
||||||
|
|
||||||
package cli //nolint:testpackage
|
package cli //nolint:testpackage
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//go:build sync && scrub && metrics && search && ui_base
|
//go:build sync && scrub && metrics && search
|
||||||
// +build sync,scrub,metrics,search,ui_base
|
// +build sync,scrub,metrics,search
|
||||||
|
|
||||||
package cli_test
|
package cli_test
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//go:build search || ui_base
|
//go:build search
|
||||||
// +build search ui_base
|
// +build search
|
||||||
|
|
||||||
package cli
|
package cli
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//go:build ui_base
|
//go:build search
|
||||||
// +build ui_base
|
// +build search
|
||||||
|
|
||||||
package cli //nolint:testpackage
|
package cli //nolint:testpackage
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//go:build !search && !ui_base
|
//go:build !search
|
||||||
// +build !search,!ui_base
|
// +build !search
|
||||||
|
|
||||||
package cli
|
package cli
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//go:build search || ui_base
|
//go:build search
|
||||||
// +build search ui_base
|
// +build search
|
||||||
|
|
||||||
package cli
|
package cli
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//go:build search || ui_base
|
//go:build search
|
||||||
// +build search ui_base
|
// +build search
|
||||||
|
|
||||||
package cli
|
package cli
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//go:build ui_base || search
|
//go:build search
|
||||||
// +build ui_base search
|
// +build search
|
||||||
|
|
||||||
package cli
|
package cli
|
||||||
|
|
||||||
|
|
|
@ -27,5 +27,5 @@ package extensions
|
||||||
|
|
||||||
- with every new extension, you should modify the EXTENSIONS variable in Makefile by adding the new extension. The EXTENSIONS variable represents all extensions and is used in Make targets that require them all (e.g make test).
|
- with every new extension, you should modify the EXTENSIONS variable in Makefile by adding the new extension. The EXTENSIONS variable represents all extensions and is used in Make targets that require them all (e.g make test).
|
||||||
|
|
||||||
- the available extensions that can be used at the moment are: <b>sync, scrub, metrics, search, ui_base </b>.
|
- the available extensions that can be used at the moment are: <b>sync, scrub, metrics, search </b>.
|
||||||
NOTE: When multiple extensions are used, they should be enlisted in the above presented order.
|
NOTE: When multiple extensions are used, they should be enlisted in the above presented order.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//go:build search || ui_base
|
//go:build search
|
||||||
// +build search ui_base
|
// +build search
|
||||||
|
|
||||||
package extensions
|
package extensions
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//go:build !search && !ui_base
|
//go:build !search
|
||||||
// +build !search,!ui_base
|
// +build !search
|
||||||
|
|
||||||
package extensions
|
package extensions
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//go:build sync && scrub && metrics && search && ui_base
|
//go:build sync && scrub && metrics && search
|
||||||
// +build sync,scrub,metrics,search,ui_base
|
// +build sync,scrub,metrics,search
|
||||||
|
|
||||||
package log_test
|
package log_test
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//go:build sync && scrub && metrics && search && ui_base
|
//go:build sync && scrub && metrics && search
|
||||||
// +build sync,scrub,metrics,search,ui_base
|
// +build sync,scrub,metrics,search
|
||||||
|
|
||||||
package test_test
|
package test_test
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,6 @@ do
|
||||||
do
|
do
|
||||||
echo "Fuzzing $func in $file"
|
echo "Fuzzing $func in $file"
|
||||||
parentDir=$(dirname $file)
|
parentDir=$(dirname $file)
|
||||||
go test $parentDir -run=$func -fuzz=$func$ -fuzztime=${fuzzTime}s -tags sync,metrics,search,scrub,ui_base,containers_image_openpgp | grep -oP -x '^(?:(?!\blevel\b).)*$'
|
go test $parentDir -run=$func -fuzz=$func$ -fuzztime=${fuzzTime}s -tags sync,metrics,search,scrub,containers_image_openpgp | grep -oP -x '^(?:(?!\blevel\b).)*$'
|
||||||
done
|
done
|
||||||
done
|
done
|
Loading…
Reference in a new issue