Support helm3.7 in nightly (#15819)

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
This commit is contained in:
Yang Jiao 2021-10-26 17:27:45 +08:00 committed by GitHub
parent 60ab3aeb27
commit 57431aa8cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 56 additions and 2 deletions

Binary file not shown.

View File

@ -17,6 +17,11 @@ ${harbor_chart_prov_filename} harbor-0.2.0.tgz.prov
${harbor_chart_file_url} https://storage.googleapis.com/harbor-builds/helm-chart-test-files/harbor-0.2.0.tgz
${harbor_chart_prov_file_url} https://storage.googleapis.com/harbor-builds/helm-chart-test-files/harbor-0.2.0.tgz.prov
${harbor_helm_name} harbor-helm-1.7.3
${harbor_helm_filename} harbor-helm-1.7.3.tar.gz
${harbor_helm_version} 1.7.3
${harbor_helm_package} harbor-1.7.3.tgz
${prometheus_chart_name} prometheus
${prometheus_chart_filename} prometheus-7.0.2.tgz
${prometheus_chart_version} 7.0.2

View File

@ -41,3 +41,23 @@ Helm Chart Push
${rc} ${output}= Run And Return Rc And Output ./tests/robot-cases/Group0-Util/helm_push_chart.sh ${ip} ${user} ${pwd} ${chart_file} ${archive} ${project} ${repo_name} ${verion}
Log ${output}
Should Be Equal As Integers ${rc} 0
Helm3.7 Registry Login
[Arguments] ${ip} ${user} ${password}
Wait Unitl Command Success helm3.7 registry login ${ip} -u ${user} -p ${password}
Helm3.7 Package
[Arguments] ${file_path}
Wait Unitl Command Success helm3.7 package ${file_path}
Helm3.7 Push
[Arguments] ${file_path} ${ip} ${repo_name}
Wait Unitl Command Success helm3.7 push ${file_path} oci://${ip}/${repo_name}
Helm3.7 Pull
[Arguments] ${ip} ${repo_name} ${version}
Wait Unitl Command Success helm3.7 pull oci://${ip}/${repo_name}/harbor --version ${version}
Helm3.7 Registry Logout
[Arguments] ${ip}
Wait Unitl Command Success helm3.7 registry logout ${ip}

View File

@ -18,6 +18,7 @@ Resource Util.robot
*** Variables ***
${download_directory} /drone/download
${files_directory} ${EXECDIR}/tests/files
*** Keywords ***
Start Selenium Standalone Server Locally

View File

@ -238,6 +238,21 @@ Helm3 CLI Push Without Sign In Harbor
Switch To Project Charts
Retry Double Keywords When Error Go Into Chart Version ${harbor_chart_name} Retry Wait Until Page Contains ${harbor_chart_version}
Helm3.7 CLI Work Flow
[Arguments] ${sign_in_user} ${sign_in_pwd}
${d}= Get Current Date result_format=%m%s
Create An New Project And Go Into Project project${d}
Run rm -rf ./${harbor_helm_name}
Wait Unitl Command Success tar zxf ${files_directory}/${harbor_helm_filename}
Helm3.7 Registry Login ${ip} ${sign_in_user} ${sign_in_pwd}
Helm3.7 Package ./${harbor_helm_name}
Helm3.7 Push ${harbor_helm_package} ${ip} project${d}
Run rm -rf ./${harbor_helm_package}
Retry File Should Not Exist ./${harbor_helm_package}
Helm3.7 Pull ${ip} project${d} ${harbor_helm_version}
Retry File Should Exist ./${harbor_helm_package}
Helm3.7 Registry Logout ${ip}
#Important Note: All CVE IDs in CVE Allowlist cases must unique!
Body Of Verfiy System Level CVE Allowlist
[Arguments] ${image_argument} ${sha256_argument} ${most_cve_list} ${single_cve}

View File

@ -38,4 +38,11 @@ Test Case - Helm3 CLI Push
${user}= Set Variable user004
${pwd}= Set Variable Test1@34
Sign In Harbor ${HARBOR_URL} ${user} ${pwd}
Helm3 CLI Push Without Sign In Harbor ${user} ${pwd}
Helm3 CLI Push Without Sign In Harbor ${user} ${pwd}
Test Case - Helm3.7 CLI Push And Pull In Harbor
Init Chrome Driver
${user}= Set Variable user004
${pwd}= Set Variable Test1@34
Sign In Harbor ${HARBOR_URL} ${user} ${pwd}
Retry Keyword N Times When Error 4 Helm3.7 CLI Work Flow ${user} ${pwd}

View File

@ -37,8 +37,13 @@ RUN pwd && mkdir /tool/binary && \
tar zxvf helm-v$HELM3_VERSION-linux-amd64.tar.gz && \
ls || pwd && \
mv linux-amd64/helm /tool/binary/helm3 && \
# Install helm v3.7
HELM3_7_VERSION=3.7.0 && wget https://get.helm.sh/helm-v$HELM3_7_VERSION-linux-amd64.tar.gz && \
tar zxvf helm-v$HELM3_7_VERSION-linux-amd64.tar.gz && \
ls || pwd && \
mv linux-amd64/helm /tool/binary/helm3.7 && \
# Install ORAS
ORAS_VERSION=0.9.0 && curl -LO https://github.com/deislabs/oras/releases/download/v$ORAS_VERSION/oras_${ORAS_VERSION}_linux_amd64.tar.gz && \
ORAS_VERSION=0.12.0 && curl -LO https://github.com/deislabs/oras/releases/download/v$ORAS_VERSION/oras_${ORAS_VERSION}_linux_amd64.tar.gz && \
mkdir -p oras-install/ && \
tar -zxf oras_${ORAS_VERSION}_*.tar.gz -C oras-install/ && \
mv oras-install/oras /tool/binary/ && \

View File

@ -2,6 +2,7 @@
#ubuntm based image
FROM ubuntu:18.04
ENV LANG C.UTF-8
ENV HELM_EXPERIMENTAL_OCI=1
RUN apt-get update && apt-get install -y --no-install-recommends wget curl gnupg2
RUN apt-get install libseccomp2
RUN wget --no-check-certificate -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -