Merge pull request #11385 from jwangyangls/nightly-case-trivy-2

[Nightly] Project Level Image Serverity Policy
This commit is contained in:
jwangyangls 2020-04-02 11:14:21 +08:00 committed by GitHub
commit 4ea7b13215
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 33 additions and 7 deletions

View File

@ -19,7 +19,7 @@
<input clrInput type="text" id="name" name="name" required size="20" autocomplete="off"
[(ngModel)]="newTagName.name" #name="ngModel" pattern="^[\w][\w.-]{0,127}$" (keyup)="existValid(newTagName.name)">
<clr-control-error class="position-ab" *ngIf="isTagNameExist">
{{'LABEL.NAME_ALREADY_EXISTS' | translate }}
{{'TAG.NAME_ALREADY_EXISTS' | translate }}
</clr-control-error>
<clr-control-error class="position-ab" *ngIf="name.hasError('pattern')">
{{'RETAG.TIP_TAG' | translate }}

View File

@ -1064,7 +1064,8 @@
"OF": "of",
"ITEMS": "items",
"ADD_TAG": "ADD TAG",
"REMOVE_TAG": "REMOVE TAG"
"REMOVE_TAG": "REMOVE TAG",
"NAME_ALREADY_EXISTS": "Tag already exists under the repository"
},
"LABEL": {
"LABEL": "Label",

View File

@ -1063,7 +1063,8 @@
"PUSH_TIME": "Push Time",
"OF": "of",
"ADD_TAG": "ADD TAG",
"REMOVE_TAG": "REMOVE TAG"
"REMOVE_TAG": "REMOVE TAG",
"NAME_ALREADY_EXISTS": "Tag already exists under the repository"
},
"LABEL": {

View File

@ -1035,7 +1035,8 @@
"OF": "of",
"ITEMS": "items",
"ADD_TAG": "ADD TAG",
"REMOVE_TAG": "REMOVE TAG"
"REMOVE_TAG": "REMOVE TAG",
"NAME_ALREADY_EXISTS": "Tag already exists under the repository"
},
"LABEL": {
"LABEL": "Label",

View File

@ -1056,7 +1056,8 @@
"OF": "of",
"ITEMS": "items",
"ADD_TAG": "ADD TAG",
"REMOVE_TAG": "REMOVE TAG"
"REMOVE_TAG": "REMOVE TAG",
"NAME_ALREADY_EXISTS": "Tag already exists under the repository"
},
"LABEL": {
"LABEL": "Label",

View File

@ -1064,7 +1064,8 @@
"OF": "of",
"ITEMS": "items",
"ADD_TAG": "ADD TAG",
"REMOVE_TAG": "REMOVE TAG"
"REMOVE_TAG": "REMOVE TAG",
"NAME_ALREADY_EXISTS": "Tag already exists under the repository"
},
"LABEL": {
"LABEL": "Etiket",

View File

@ -1063,7 +1063,8 @@
"OF": "共计",
"ITEMS": "条记录",
"ADD_TAG": "添加 TAG",
"REMOVE_TAG": "删除 TAG"
"REMOVE_TAG": "删除 TAG",
"NAME_ALREADY_EXISTS": "当前的镜像已经存在此名字的Tag"
},
"LABEL": {
"LABEL": "标签",

View File

@ -123,3 +123,23 @@ Test Case - View Scan Results
Summary Chart Should Display latest
View Repo Scan Details
Close Browser
Test Case - Project Level Image Serverity Policy
[Tags] run-once
Init Chrome Driver
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
${d}= get current date result_format=%m%s
#For docker-hub registry
#${sha256}= Set Variable 9755880356c4ced4ff7745bafe620f0b63dd17747caedba72504ef7bac882089
#For internal CPE harbor registry
${sha256}= Set Variable 0e67625224c1da47cb3270e7a861a83e332f708d3d89dde0cbed432c94824d9a
${image}= Set Variable redis
Create An New Project project${d}
Push Image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} ${image} sha256=${sha256}
Go Into Project project${d}
Go Into Repo ${image}
Scan Repo ${sha256} Succeed
Navigate To Projects
Go Into Project project${d}
Set Vulnerabilty Serverity 3
Cannot pull image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} ${image} tag=${sha256}
Close Browser