mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-12 19:32:48 -06:00
download: fix when compiling with tag opa_no_oci
The Makefile adjustments were needed to have the test compile actually work in CI. Previously, it was just believed to work... Fixes #8070. Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
This commit is contained in:
committed by
Stephan Renatus
parent
c71db71cec
commit
ba6824774e
@@ -145,7 +145,7 @@ jobs:
|
|||||||
run: ubuntu-24.04
|
run: ubuntu-24.04
|
||||||
targets: ci-go-ci-build-linux-static
|
targets: ci-go-ci-build-linux-static
|
||||||
go_tags: GO_TAGS="-tags=opa_no_oci"
|
go_tags: GO_TAGS="-tags=opa_no_oci"
|
||||||
variant_name: opa_no_ci
|
variant_name: opa_no_oci
|
||||||
arch: arm64
|
arch: arm64
|
||||||
- os: windows
|
- os: windows
|
||||||
run: ubuntu-24.04
|
run: ubuntu-24.04
|
||||||
|
|||||||
@@ -19,10 +19,12 @@ GOVERSION ?= $(shell cat ./.go-version)
|
|||||||
GOARCH := $(shell go env GOARCH)
|
GOARCH := $(shell go env GOARCH)
|
||||||
GOOS := $(shell go env GOOS)
|
GOOS := $(shell go env GOOS)
|
||||||
|
|
||||||
GO_TAGS := -tags=
|
GO_TAGS ?=
|
||||||
|
CONDITIONAL_WASM_TAG :=
|
||||||
ifeq ($(WASM_ENABLED),1)
|
ifeq ($(WASM_ENABLED),1)
|
||||||
GO_TAGS = -tags=opa_wasm
|
CONDITIONAL_WASM_TAG := -tags=opa_wasm
|
||||||
endif
|
endif
|
||||||
|
override GO_TAGS := $(GO_TAGS) $(CONDITIONAL_WASM_TAG)
|
||||||
|
|
||||||
GOLANGCI_LINT_VERSION := v2.6.2
|
GOLANGCI_LINT_VERSION := v2.6.2
|
||||||
YAML_LINT_VERSION := 0.29.0
|
YAML_LINT_VERSION := 0.29.0
|
||||||
@@ -261,6 +263,7 @@ CI_GOLANG_DOCKER_MAKE := $(DOCKER) run \
|
|||||||
-w /src \
|
-w /src \
|
||||||
-e GOCACHE=/src/.go/cache \
|
-e GOCACHE=/src/.go/cache \
|
||||||
-e GOARCH=$(GOARCH) \
|
-e GOARCH=$(GOARCH) \
|
||||||
|
-e GO_TAGS="$(GO_TAGS)" \
|
||||||
-e CGO_ENABLED=$(CGO_ENABLED) \
|
-e CGO_ENABLED=$(CGO_ENABLED) \
|
||||||
-e WASM_ENABLED=$(WASM_ENABLED) \
|
-e WASM_ENABLED=$(WASM_ENABLED) \
|
||||||
-e FUZZ_TIME=$(FUZZ_TIME) \
|
-e FUZZ_TIME=$(FUZZ_TIME) \
|
||||||
|
|||||||
@@ -1,59 +0,0 @@
|
|||||||
//go:build opa_no_oci
|
|
||||||
|
|
||||||
package download
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
"github.com/open-policy-agent/opa/ast"
|
|
||||||
"github.com/open-policy-agent/opa/bundle"
|
|
||||||
"github.com/open-policy-agent/opa/plugins/rest"
|
|
||||||
)
|
|
||||||
|
|
||||||
func NewOCI(Config, rest.Client, string, string) *OCIDownloader {
|
|
||||||
panic("built without OCI support")
|
|
||||||
}
|
|
||||||
|
|
||||||
func (d *OCIDownloader) WithCallback(f func(context.Context, Update)) *OCIDownloader {
|
|
||||||
panic("built without OCI support")
|
|
||||||
}
|
|
||||||
|
|
||||||
func (d *OCIDownloader) WithLogAttrs(map[string]any) *OCIDownloader {
|
|
||||||
panic("built without OCI support")
|
|
||||||
}
|
|
||||||
|
|
||||||
func (d *OCIDownloader) WithBundleVerificationConfig(*bundle.VerificationConfig) *OCIDownloader {
|
|
||||||
panic("built without OCI support")
|
|
||||||
}
|
|
||||||
|
|
||||||
func (d *OCIDownloader) WithSizeLimitBytes(int64) *OCIDownloader {
|
|
||||||
panic("built without OCI support")
|
|
||||||
}
|
|
||||||
|
|
||||||
func (d *OCIDownloader) WithBundlePersistence(bool) *OCIDownloader {
|
|
||||||
panic("built without OCI support")
|
|
||||||
}
|
|
||||||
|
|
||||||
func (d *OCIDownloader) ClearCache() {
|
|
||||||
panic("built without OCI support")
|
|
||||||
}
|
|
||||||
|
|
||||||
func (d *OCIDownloader) SetCache(string) {
|
|
||||||
panic("built without OCI support")
|
|
||||||
}
|
|
||||||
|
|
||||||
func (d *OCIDownloader) Trigger(context.Context) error {
|
|
||||||
panic("built without OCI support")
|
|
||||||
}
|
|
||||||
|
|
||||||
func (d *OCIDownloader) Start(context.Context) {
|
|
||||||
panic("built without OCI support")
|
|
||||||
}
|
|
||||||
|
|
||||||
func (d *OCIDownloader) Stop(context.Context) {
|
|
||||||
panic("built without OCI support")
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*OCIDownloader) WithBundleParserOpts(ast.ParserOptions) *OCIDownloader {
|
|
||||||
panic("built without OCI support")
|
|
||||||
}
|
|
||||||
@@ -14,43 +14,43 @@ func NewOCI(Config, rest.Client, string, string) *OCIDownloader {
|
|||||||
panic("built without OCI support")
|
panic("built without OCI support")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *OCIDownloader) WithCallback(f func(context.Context, Update)) *OCIDownloader {
|
func (*OCIDownloader) WithCallback(func(context.Context, Update) error) *OCIDownloader {
|
||||||
panic("built without OCI support")
|
panic("built without OCI support")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *OCIDownloader) WithLogAttrs(map[string]any) *OCIDownloader {
|
func (*OCIDownloader) WithLogAttrs(map[string]any) *OCIDownloader {
|
||||||
panic("built without OCI support")
|
panic("built without OCI support")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *OCIDownloader) WithBundleVerificationConfig(*bundle.VerificationConfig) *OCIDownloader {
|
func (*OCIDownloader) WithBundleVerificationConfig(*bundle.VerificationConfig) *OCIDownloader {
|
||||||
panic("built without OCI support")
|
panic("built without OCI support")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *OCIDownloader) WithSizeLimitBytes(int64) *OCIDownloader {
|
func (*OCIDownloader) WithSizeLimitBytes(int64) *OCIDownloader {
|
||||||
panic("built without OCI support")
|
panic("built without OCI support")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *OCIDownloader) WithBundlePersistence(bool) *OCIDownloader {
|
func (*OCIDownloader) WithBundlePersistence(bool) *OCIDownloader {
|
||||||
panic("built without OCI support")
|
panic("built without OCI support")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *OCIDownloader) ClearCache() {
|
func (*OCIDownloader) ClearCache() {
|
||||||
panic("built without OCI support")
|
panic("built without OCI support")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *OCIDownloader) SetCache(string) {
|
func (*OCIDownloader) SetCache(string) {
|
||||||
panic("built without OCI support")
|
panic("built without OCI support")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *OCIDownloader) Trigger(context.Context) error {
|
func (*OCIDownloader) Trigger(context.Context) error {
|
||||||
panic("built without OCI support")
|
panic("built without OCI support")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *OCIDownloader) Start(context.Context) {
|
func (*OCIDownloader) Start(context.Context) {
|
||||||
panic("built without OCI support")
|
panic("built without OCI support")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *OCIDownloader) Stop(context.Context) {
|
func (*OCIDownloader) Stop(context.Context) {
|
||||||
panic("built without OCI support")
|
panic("built without OCI support")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user