зеркало из https://github.com/Azure/ARO-RP.git
Fix client generation (#2867)
* Update autorest core to 3.6.3. Update nodejs to new secure LTS version for client generation. Fix permissions error in autorest Dockerfile for client generation. * Added closing console line after api version generation
This commit is contained in:
Родитель
a26292d6b2
Коммит
a68f9c10ff
|
@ -1,5 +1,5 @@
|
|||
ARG REGISTRY
|
||||
FROM ${REGISTRY}/ubi8/nodejs-14
|
||||
FROM ${REGISTRY}/ubi8/nodejs-18
|
||||
|
||||
LABEL MAINTAINER="aos-azure"
|
||||
|
||||
|
@ -14,8 +14,6 @@ RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.n
|
|||
dnf install -y python3-pip && \
|
||||
dnf clean all --enablerepo=\*
|
||||
|
||||
USER 1001
|
||||
|
||||
# Autorest
|
||||
RUN npm install -g autorest@${AUTOREST_VERSION} && \
|
||||
autorest --reset && \
|
||||
|
|
2
Makefile
2
Makefile
|
@ -8,7 +8,7 @@ E2E_FLAGS ?= -test.v --ginkgo.v --ginkgo.timeout 180m --ginkgo.flake-attempts=2
|
|||
MARINER_VERSION = 20230321
|
||||
FLUENTBIT_VERSION = 1.9.10
|
||||
FLUENTBIT_IMAGE ?= ${RP_IMAGE_ACR}.azurecr.io/fluentbit:$(FLUENTBIT_VERSION)-cm$(MARINER_VERSION)
|
||||
AUTOREST_VERSION = 3.6.2
|
||||
AUTOREST_VERSION = 3.6.3
|
||||
AUTOREST_IMAGE = quay.io/openshift-on-azure/autorest:${AUTOREST_VERSION}
|
||||
|
||||
ifneq ($(shell uname -s),Darwin)
|
||||
|
|
|
@ -23,7 +23,8 @@ function generate_golang() {
|
|||
local API_VERSION=$2
|
||||
local FOLDER=$3
|
||||
|
||||
# Generating Track 1 SDK. Needs work to migrate to Track 2.
|
||||
# Generating Track 1 Golang SDK
|
||||
# Needs work to migrate to Track 2
|
||||
docker run \
|
||||
--platform=linux/amd64 \
|
||||
--rm \
|
||||
|
@ -58,7 +59,7 @@ function generate_python() {
|
|||
local API_VERSION=$2
|
||||
local FOLDER=$3
|
||||
|
||||
# Generating Track 2 SDK
|
||||
# Generating Track 2 Python SDK
|
||||
docker run \
|
||||
--platform=linux/amd64 \
|
||||
--rm \
|
||||
|
@ -92,8 +93,26 @@ do
|
|||
FOLDER=preview
|
||||
fi
|
||||
|
||||
printf "\nGENERATING API v$API_VERSION\n"
|
||||
printf "%*s\n" "${COLUMNS:-$(tput cols)}" "" | tr " " -
|
||||
|
||||
printf "CLEANING OLD API GENERATED FILES...\n"
|
||||
clean "$API_VERSION" "$FOLDER"
|
||||
printf "[\u2714] SUCCESS\n\n"
|
||||
|
||||
printf "GENERATING CHECKSUM...\n"
|
||||
checksum "$API_VERSION" "$FOLDER"
|
||||
printf "[\u2714] SUCCESS\n\n"
|
||||
|
||||
printf "GENERATING GOLANG SDK...\n"
|
||||
generate_golang "$AUTOREST_IMAGE" "$API_VERSION" "$FOLDER"
|
||||
printf "[\u2714] SUCCESS\n\n"
|
||||
|
||||
printf "GENERATING PYTHON SDK...\n"
|
||||
generate_python "$AUTOREST_IMAGE" "$API_VERSION" "$FOLDER"
|
||||
printf "[\u2714] SUCCESS\n\n"
|
||||
printf "%*s\n" "${COLUMNS:-$(tput cols)}" "" | tr " " -
|
||||
printf "\n"
|
||||
done
|
||||
|
||||
printf "[\u2714] CLIENT GENERATION COMPLETED SUCCESSFULLY\n"
|
||||
|
|
Загрузка…
Ссылка в новой задаче