From 0adcbce92de6bf5d96db6ae815dc8eb266704b29 Mon Sep 17 00:00:00 2001 From: Brendan Bergen Date: Fri, 9 Feb 2024 17:02:53 -0700 Subject: [PATCH] WIP - passing tests, no azdev linting/etc --- Dockerfile.ci-az-aro | 14 ++++++++++++++ Makefile | 6 +++++- requirements-dev.txt | 2 ++ 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 Dockerfile.ci-az-aro create mode 100644 requirements-dev.txt diff --git a/Dockerfile.ci-az-aro b/Dockerfile.ci-az-aro new file mode 100644 index 00000000000..82c3371f4dd --- /dev/null +++ b/Dockerfile.ci-az-aro @@ -0,0 +1,14 @@ +FROM docker.io/library/python:3.10 AS az-aro-base +WORKDIR /build/ +COPY requirements.txt . +RUN pip install -U pip \ + && pip install -r requirements.txt + +# untracked testing deps +RUN pip install azure.mgmt.core +RUN pip install azure.cli + +COPY python/ . +# TODO: azdev linting??? Getting "TypeError: expected str, bytes or os.PathLike object, not NoneType" - for ... maybe... $HOME? +RUN pip install pytest +RUN pytest --ignore=az/aro/azext_aro/tests/latest/integration diff --git a/Makefile b/Makefile index e09e900a295..49b6923db83 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ COMMIT = $(shell git rev-parse --short=7 HEAD)$(shell [[ $$(git status --porcela ARO_IMAGE_BASE = ${RP_IMAGE_ACR}.azurecr.io/aro E2E_FLAGS ?= -test.v --ginkgo.v --ginkgo.timeout 180m --ginkgo.flake-attempts=2 --ginkgo.junit-report=e2e-report.xml GO_FLAGS ?= -tags=containers_image_openpgp,exclude_graphdriver_btrfs,exclude_graphdriver_devicemapper +NO_CACHE ?= true export GOFLAGS=$(GO_FLAGS) @@ -74,6 +75,9 @@ clean: 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 +ci-az-aro: + docker build . -f Dockerfile.ci-az-aro --build-arg REGISTRY=$(REGISTRY) --no-cache=$(NO_CACHE) + # TODO: hard coding dev-config.yaml is clunky; it is also probably convenient to # override COMMIT. deploy: @@ -254,4 +258,4 @@ vendor: # See comments in the script for background on why we need it hack/update-go-module-dependencies.sh -.PHONY: admin.kubeconfig aks.kubeconfig aro az clean client deploy dev-config.yaml discoverycache generate image-aro-multistage image-fluentbit image-proxy 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 +.PHONY: admin.kubeconfig aks.kubeconfig aro az ci-az-aro clean client deploy dev-config.yaml discoverycache generate image-aro-multistage image-fluentbit image-proxy 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 diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 00000000000..a8f4310c3b9 --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1,2 @@ +azure.mgmt.core=1.4.0 +azure.cli=2.57.0