diff --git a/Dockerfile.ci-rp b/Dockerfile.ci-rp index 23ee37330ef..0c8cfe58757 100644 --- a/Dockerfile.ci-rp +++ b/Dockerfile.ci-rp @@ -1,5 +1,5 @@ ARG REGISTRY -ARG VERSION +ARG ARO_VERSION ############################################################################### # Stage 1: Build the SRE Portal Assets @@ -22,6 +22,7 @@ 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 USER root WORKDIR /app @@ -49,8 +50,8 @@ 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/gotestsum@v1.11.0 --format pkgname --junitfile report.xml -- -coverprofile=cover.out ./... diff --git a/Makefile b/Makefile index e5b53a309c8..d263c3e8d85 100644 --- a/Makefile +++ b/Makefile @@ -77,7 +77,7 @@ 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) # TODO: hard coding dev-config.yaml is clunky; it is also probably convenient to # override COMMIT.