Skip to content

Commit 19a46ad

Browse files
committed
Adding owners file
1 parent 1b5cf32 commit 19a46ad

File tree

5 files changed

+91
-11
lines changed

5 files changed

+91
-11
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
/openshift-apiserver
22
/_output
33
.idea
4-
/test/extended/tests-extension/openshift-apiserver-tests-ext
4+
/test/extended/tests-extension/bin/

Makefile

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,11 @@ verify:
6161
# -------------------------------------------------------------------
6262
.PHONY: tests-ext-build
6363
tests-ext-build:
64-
cd $(TESTS_EXT_DIR) && \
65-
GOOS=$(GOOS) GOARCH=$(GOARCH) GO_COMPLIANCE_POLICY=exempt_all CGO_ENABLED=0 \
66-
go build -mod=mod -o $(TESTS_EXT_BINARY) -ldflags "$(TESTS_EXT_LDFLAGS)" $(TESTS_EXT_PACKAGE)
64+
$(MAKE) -C $(TESTS_EXT_DIR) build
6765

6866
# -------------------------------------------------------------------
6967
# Run "update" and strip env-specific metadata
7068
# -------------------------------------------------------------------
7169
.PHONY: tests-ext-update
72-
tests-ext-update: tests-ext-build
73-
cd $(TESTS_EXT_DIR) && ./$(TESTS_EXT_BINARY) update
74-
for f in $(TESTS_EXT_DIR)/.openshift-tests-extension/*.json; do \
75-
jq 'map(del(.codeLocations))' "$$f" > tmpp && mv tmpp "$$f"; \
76-
done
70+
tests-ext-update:
71+
$(MAKE) -C $(TESTS_EXT_DIR) build-update

images/Dockerfile.rhel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ WORKDIR /go/src/github.com/openshift/openshift-apiserver
33
COPY . .
44
RUN make build --warn-undefined-variables \
55
&& make tests-ext-build \
6-
&& gzip test/extended/tests-extension/openshift-apiserver-tests-ext
6+
&& gzip test/extended/tests-extension/bin/openshift-apiserver-tests-ext
77

88
FROM registry.ci.openshift.org/ocp/4.21:base-rhel9
99
COPY --from=builder /go/src/github.com/openshift/openshift-apiserver/openshift-apiserver /usr/bin/
10-
COPY --from=builder /go/src/github.com/openshift/openshift-apiserver/test/extended/tests-extension/openshift-apiserver-tests-ext.gz /usr/bin/
10+
COPY --from=builder /go/src/github.com/openshift/openshift-apiserver/test/extended/tests-extension/bin/openshift-apiserver-tests-ext.gz /usr/bin/
1111
ENTRYPOINT ["/usr/bin/openshift-apiserver"]
1212
LABEL io.k8s.display-name="OpenShift API Server Command" \
1313
io.k8s.description="OpenShift is a platform for developing, building, and deploying containerized applications." \

test/extended/tests-extension/.openshift-tests-extension/openshift_payload_openshift-apiserver.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,15 @@
88
"source": "openshift:payload:openshift-apiserver",
99
"lifecycle": "blocking",
1010
"environmentSelector": {}
11+
},
12+
{
13+
"name": "[Jira:openshift-apiserver][sig-api-machinery][openshift-apiserver][encryption] Force encryption key rotation for etcd datastore should rotate keys and update encryption prefixes [Slow][Serial][Disruptive][Suite:openshift/openshift-apiserver/conformance/serial]",
14+
"labels": {},
15+
"resources": {
16+
"isolation": {}
17+
},
18+
"source": "openshift:payload:openshift-apiserver",
19+
"lifecycle": "blocking",
20+
"environmentSelector": {}
1121
}
1222
]
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Get the directory where this Makefile is, so we can use it below for including
2+
DIR := $(strip $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))))
3+
4+
# Definitions for the extended tests
5+
GO_PKG_NAME := github.com/openshift-eng/openshift-tests-extension
6+
7+
GIT_COMMIT := $(shell git rev-parse --short HEAD 2>/dev/null || echo 'unknown')
8+
BUILD_DATE := $(shell date -u +'%Y-%m-%dT%H:%M:%SZ')
9+
GIT_TREE_STATE := $(shell if git rev-parse --git-dir > /dev/null 2>&1; then if git diff --quiet; then echo clean; else echo dirty; fi; else echo unknown; fi)
10+
11+
LDFLAGS := -X '$(GO_PKG_NAME)/pkg/version.CommitFromGit=$(GIT_COMMIT)' \
12+
-X '$(GO_PKG_NAME)/pkg/version.BuildDate=$(BUILD_DATE)' \
13+
-X '$(GO_PKG_NAME)/pkg/version.GitTreeState=$(GIT_TREE_STATE)'
14+
15+
METADATA := $(shell pwd)/.openshift-tests-extension
16+
17+
TOOLS_BIN_DIR := $(CURDIR)/bin
18+
BINARY_NAME := openshift-apiserver-tests-ext
19+
20+
.PHONY: help
21+
help: #HELP Display essential help.
22+
@awk 'BEGIN {FS = ":[^#]*#HELP"; printf "\nUsage:\n make \033[36m<target>\033[0m\n\n"} /^[a-zA-Z_0-9-]+:.*#HELP / { printf " \033[36m%-17s\033[0m %s\n", $$1, $$2 } ' $(MAKEFILE_LIST)
23+
24+
#SECTION Development
25+
.PHONY: verify #HELP To verify the code
26+
verify: tidy fmt vet
27+
28+
.PHONY: tidy #HELP Run go mod tidy.
29+
tidy:
30+
go mod tidy
31+
32+
.PHONY: fmt
33+
fmt: #HELP Run go fmt against code.
34+
go fmt ./...
35+
36+
.PHONY: vet
37+
vet: #HELP Run go vet against code.
38+
go vet ./...
39+
40+
.PHONY: build
41+
build: #HELP Build the extended tests binary
42+
@mkdir -p $(TOOLS_BIN_DIR)
43+
GO_COMPLIANCE_POLICY="exempt_all" CGO_ENABLED=0 go build -mod=mod -ldflags "$(LDFLAGS)" -o $(TOOLS_BIN_DIR)/$(BINARY_NAME) ./cmd/...
44+
45+
.PHONY: update-metadata
46+
update-metadata: build #HELP Build and run 'update-metadata' to generate test metadata
47+
$(TOOLS_BIN_DIR)/$(BINARY_NAME) update
48+
$(MAKE) clean-metadata
49+
50+
.PHONY: build-update
51+
build-update: build update-metadata #HELP Build and update metadata and sanitize output
52+
53+
.PHONY: clean
54+
clean: #HELP Remove build artifacts
55+
rm -rf $(TOOLS_BIN_DIR)
56+
57+
#SECTION Metadata
58+
59+
.PHONY: list-test-names
60+
list-test-names: build #HELP Show current full test names
61+
@$(TOOLS_BIN_DIR)/$(BINARY_NAME) list -o names
62+
63+
.PHONY: clean-metadata
64+
clean-metadata: #HELP Remove 'codeLocations' from metadata JSON
65+
@echo "Cleaning metadata (removing codeLocations)..."
66+
@for f in $(METADATA)/*.json; do \
67+
jq 'map(del(.codeLocations))' "$$f" > "$$f.tmp" && mv "$$f.tmp" "$$f"; \
68+
done
69+
70+
.PHONY: verify-metadata #HELP To verify that the metadata was properly updated
71+
verify-metadata: update-metadata
72+
@if ! git diff --exit-code $(METADATA); then \
73+
echo "ERROR: Metadata is out of date. Please run 'make build-update' and commit the result."; \
74+
exit 1; \
75+
fi

0 commit comments

Comments
 (0)