-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into preflight_add_update
- Loading branch information
Showing
166 changed files
with
24,237 additions
and
19,814 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM mcr.microsoft.com/azure-cli:2.61.0 AS builder | ||
|
||
RUN pip install pytest | ||
COPY /python /data/ | ||
|
||
WORKDIR /data/az/aro | ||
RUN pytest --ignore=azext_aro/tests/latest/integration | ||
RUN python3 setup.py bdist_wheel | ||
|
||
FROM mcr.microsoft.com/azure-cli:2.61.0-cbl-mariner2.0 AS final | ||
COPY --from=builder /data/az/aro/dist /opt/az | ||
RUN az extension add --yes --source /opt/az/aro-*-py2.py3-none-any.whl |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
ARG REGISTRY | ||
ARG VERSION | ||
ARG ARO_VERSION | ||
|
||
############################################################################### | ||
# Stage 1: Build the SRE Portal Assets | ||
# builder is responsible for all compilation and validation of the RP | ||
############################################################################### | ||
FROM ${REGISTRY}/ubi8/nodejs-16 as portal-build | ||
LABEL aro-portal-build=true | ||
WORKDIR /build/portal/v2 | ||
USER root | ||
|
||
|
@@ -22,6 +23,8 @@ RUN npm run lint && npm run build | |
# Stage 2: Compile the Golang RP code | ||
############################################################################### | ||
FROM ${REGISTRY}/ubi8/go-toolset:1.20.12-5 AS builder | ||
ARG ARO_VERSION | ||
LABEL aro-builder=true | ||
USER root | ||
WORKDIR /app | ||
|
||
|
@@ -49,17 +52,18 @@ COPY --from=portal-build /build/pkg/portal/assets/v2/build /app/pkg/portal/asset | |
# Lint, generate, build, and test | ||
RUN golangci-lint run --verbose | ||
RUN go generate ./... | ||
RUN go build -ldflags "-X github.com/Azure/ARO-RP/pkg/util/version.GitCommit=${VERSION}" ./cmd/aro | ||
RUN go test ./test/e2e/... -tags e2e,codec.safe -c -ldflags "-X github.com/Azure/ARO-RP/pkg/util/version.GitCommit=${VERSION}" -o e2e.test | ||
RUN go build -ldflags "-X github.com/Azure/ARO-RP/pkg/util/version.GitCommit=${ARO_VERSION}" ./cmd/aro | ||
RUN go test ./test/e2e/... -tags e2e,codec.safe -c -ldflags "-X github.com/Azure/ARO-RP/pkg/util/version.GitCommit=${ARO_VERSION}" -o e2e.test | ||
|
||
# Additional tests | ||
RUN ARO_RUN_PKI_TESTS=nope go run gotest.tools/[email protected] --format pkgname --junitfile report.xml -- -coverprofile=cover.out ./... | ||
RUN ARO_SKIP_PKI_TESTS=true go run gotest.tools/[email protected] --format pkgname --junitfile report.xml -- -coverprofile=cover.out ./... | ||
RUN hack/fips/validate-fips.sh ./aro | ||
|
||
############################################################################### | ||
# Stage 3: final is our slim image with minimal layers and tools | ||
############################################################################### | ||
FROM ${REGISTRY}/ubi8/ubi-minimal AS final | ||
LABEL aro-final=true | ||
RUN microdnf update && microdnf clean all | ||
COPY --from=builder /app/aro /app/e2e.test /usr/local/bin/ | ||
ENTRYPOINT ["aro"] | ||
|
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,8 +14,7 @@ FLUENTBIT_VERSION = 1.9.10 | |
FLUENTBIT_IMAGE ?= ${RP_IMAGE_ACR}.azurecr.io/fluentbit:$(FLUENTBIT_VERSION)-cm$(MARINER_VERSION) | ||
AUTOREST_VERSION = 3.6.3 | ||
AUTOREST_IMAGE = quay.io/openshift-on-azure/autorest:${AUTOREST_VERSION} | ||
GATEKEEPER_VERSION = v3.10.0 | ||
GATEKEEPER_IMAGE ?= ${RP_IMAGE_ACR}.azurecr.io/gatekeeper:$(GATEKEEPER_VERSION) | ||
GATEKEEPER_VERSION = v3.15.1 | ||
GOTESTSUM = gotest.tools/[email protected] | ||
|
||
ifneq ($(shell uname -s),Darwin) | ||
|
@@ -40,6 +39,7 @@ else | |
endif | ||
|
||
ARO_IMAGE ?= $(ARO_IMAGE_BASE):$(VERSION) | ||
GATEKEEPER_IMAGE ?= ${REGISTRY}/gatekeeper:$(GATEKEEPER_VERSION) | ||
|
||
check-release: | ||
# Check that VERSION is a valid tag when building an official release (when RELEASE=true). | ||
|
@@ -67,6 +67,10 @@ az: pyenv | |
python3 ./setup.py bdist_wheel || true && \ | ||
rm -f ~/.azure/commandIndex.json # https://github.com/Azure/azure-cli/issues/14997 | ||
|
||
.PHONY: azext-aro | ||
azext-aro: | ||
docker build --platform=linux/amd64 . -f Dockerfile.ci-azext-aro --no-cache=$(NO_CACHE) -t azext-aro:latest | ||
|
||
clean: | ||
rm -rf python/az/aro/{aro.egg-info,build,dist} aro | ||
find python -type f -name '*.pyc' -delete | ||
|
@@ -77,7 +81,10 @@ client: generate | |
hack/build-client.sh "${AUTOREST_IMAGE}" 2020-04-30 2021-09-01-preview 2022-04-01 2022-09-04 2023-04-01 2023-07-01-preview 2023-09-04 2023-11-22 2024-08-12-preview | ||
|
||
ci-rp: fix-macos-vendor | ||
docker build . -f Dockerfile.ci-rp --ulimit=nofile=4096:4096 --build-arg REGISTRY=$(REGISTRY) --build-arg VERSION=$(VERSION) --no-cache=$(NO_CACHE) | ||
docker build . -f Dockerfile.ci-rp --ulimit=nofile=4096:4096 --build-arg REGISTRY=$(REGISTRY) --build-arg ARO_VERSION=$(VERSION) --no-cache=$(NO_CACHE) | ||
|
||
ci-clean: | ||
docker image prune --all --filter="label=aro-*=true" | ||
|
||
# TODO: hard coding dev-config.yaml is clunky; it is also probably convenient to | ||
# override COMMIT. | ||
|
@@ -278,4 +285,4 @@ vendor: | |
install-go-tools: | ||
go install ${GOTESTSUM} | ||
|
||
.PHONY: admin.kubeconfig aks.kubeconfig aro az ci-portal ci-rp clean client deploy dev-config.yaml discoverycache fix-macos-vendor generate image-aro-multistage image-fluentbit image-proxy init-contrib lint-go runlocal-rp proxy publish-image-aro-multistage publish-image-fluentbit publish-image-proxy secrets secrets-update e2e.test tunnel test-e2e test-go test-python vendor build-all validate-go unit-test-go coverage-go validate-fips install-go-tools | ||
.PHONY: admin.kubeconfig aks.kubeconfig aro az ci-rp ci-clean clean client deploy dev-config.yaml discoverycache fix-macos-vendor generate image-aro-multistage image-fluentbit image-proxy init-contrib lint-go runlocal-rp proxy publish-image-aro-multistage publish-image-fluentbit publish-image-proxy secrets secrets-update e2e.test tunnel test-e2e test-go test-python vendor build-all validate-go unit-test-go coverage-go validate-fips install-go-tools |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.