Commit Graph

948 Commits

Author SHA1 Message Date
AllForNothing
3f213df595 Fix nightly case for replication
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-09-30 16:59:11 +08:00
danfengliu
baf7cda3e2
Merge pull request #13164 from danfengliu/add-build-package-action-in-github
Add harbor build in git action workflow
2020-09-30 09:55:26 +08:00
danfengliu
12f4f73c8a Add harbor build in gith action workflow
Signed-off-by: danfengliu <danfengl@vmware.com>
2020-09-29 09:18:18 +00:00
danfengliu
fc5743b355
Merge pull request #13128 from danfengliu/fix-a-typo-in-upgrade-prepare-script
Fix typo in upgrade prepare script
2020-09-28 17:54:51 +08:00
danfengliu
e4894017cd Fix typo in upgrade prepare scritp
Signed-off-by: danfengliu <danfengl@vmware.com>
2020-09-28 10:36:22 +08:00
AllForNothing
8d9a18b539 Update UI package to latest version
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-09-25 09:46:05 +08:00
Will Sun
18f41bad88
Merge pull request #13085 from AllForNothing/replication
Add disable/enable function to replication rules
2020-09-24 17:35:51 +08:00
danfengliu
48510fde08
Merge branch 'master' into add-2.1-upgrade-pipeline-in-nightly 2020-09-22 13:48:22 +08:00
danfengliu
ef53edf553 Recovery nightly setup
1. Recovery nightly setup;
2. Add retry for replication rule selection.
3. Add retry for CNAB test.
4. Rerun keyword of push CNAB

Signed-off-by: danfengliu <danfengl@vmware.com>
2020-09-22 02:41:50 +00:00
danfengliu
e2989e3b93 Add 2.0 & 2.1 upgrade pipeline in nightly
1. Add 2.0 upgrade pipeline in nightly;
2. Add 2.1 upgrade pipeline in nightly.

Signed-off-by: danfengliu <danfengl@vmware.com>
2020-09-22 02:14:40 +00:00
AllForNothing
abdbd79ed4 Add disable/enable function to replication rules
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-09-17 10:29:31 +08:00
danfengliu
7e097afde8
Remove ca parameter in helm test case (#13069)
Signed-off-by: danfengliu <danfengl@vmware.com>
2020-09-16 16:31:45 +08:00
danfengliu
ebef11476a
Merge pull request #13002 from danfengliu/upgrade-docker-in-drone-dockerfile
Create Dockerfile for E2E py-test
2020-09-15 14:16:11 +08:00
danfengliu
d99ea887f1
Merge pull request #12989 from danfengliu/Add-Checkpoint-for-LDAP-group-py-test
Add checkpoint for LDAP group py-test
2020-09-15 14:15:31 +08:00
danfengliu
86fb6fdc65 Add checkpoint for LDAP group py-test
LDAP group has different role, user in group has the same role, as groups with different roles were added in project
member list, user should act like in different roles. for admin and dev role, there should be checkpoints to verify priviledges of each own.

Signed-off-by: danfengliu <danfengl@vmware.com>
2020-09-14 21:15:09 +08:00
danfengliu
0dda643bc5 Create Dockerfile for E2E py-test
Robot tests have been always executed in docker container, but API pyt-test is not,
so rebuild Dockerfile for it. During that, some of tools have been upgraded, so API py-test
 scripts need some modification.

Signed-off-by: danfengliu <danfengl@vmware.com>
2020-09-14 02:36:18 +00:00
stonezdj(Daojun Zhang)
97b9cc2d5e
Merge pull request #12997 from stonezdj/200902_ldap_filter_fail
Add ldap filter syntax validation when create search filter
2020-09-09 16:21:01 +08:00
danfengliu
f90f9a6984
Fix nightly issue caused UI changing (#13006)
Some UI text display changed, it cause failure in nightly.

Signed-off-by: danfengliu <danfengl@vmware.com>
2020-09-09 15:20:13 +08:00
stonezdj
b9752f3112 Add ldap filter syntax validation when create search filter
Correct ldap search filter is enclosed with '(' and ')'
Search ldap group with the ldap group base DN instead of group DN
Fixes #12613 LDAP Group Filter and Group Base DN have no affect

Signed-off-by: stonezdj <stonezdj@gmail.com>
2020-09-09 10:07:07 +08:00
danfengliu
34e2490154 Fix git action CI python package installation
Signed-off-by: danfengliu <danfengl@vmware.com>
2020-09-03 20:41:55 +08:00
danfengliu
2ca5c11675 Fix git action CI missing python sit packages issue
Signed-off-by: danfengliu <danfengl@vmware.com>
2020-09-03 17:34:51 +08:00
danfengliu
931bde0df8 Fix issue of missing swagger package for python API test
1. Python API test can't import packages from swagger maker, the reason is that python install packages to site-packages instead of dist-packages,
   so the current solution is to copy pakages from site back to dist, I will try to find a way of using ENV variable to fix this;

2. Remove a python library no longer be used.

Signed-off-by: danfengliu <danfengl@vmware.com>
2020-09-02 15:18:23 +08:00
danfengliu
00180b2a6f Add P2P Preheat UI Test
1. Fix ldap script issue, test case name should be in lowercase;
2. Add manifest list checkout point for proxy cache issue;
3. Add P2P Preheat policy CRUD Test.

Signed-off-by: danfengliu <danfengl@vmware.com>
2020-08-28 11:34:32 +08:00
stonezdj(Daojun Zhang)
b2ed195df5
Merge pull request #12785 from danfengliu/add-distribution-ui-test
Add distribution UI test in nightly
2020-08-21 14:19:05 +08:00
danfengliu
37e280c49f Add proxy-cache and distribution UI test in nightly
1. Add proxy-cache UI test in nightly;
2. Add distribution UI test in nightly.

Signed-off-by: danfengliu <danfengl@vmware.com>
2020-08-21 02:08:06 +00:00
danfengliu
143062fe20
Merge pull request #12788 from danfengliu/upgrade-robotframework-in-git-action
upgrade robotframework in git action
2020-08-20 20:08:36 +08:00
danfengliu
3f5bd9ae0a Re-script ldap API script
1. upgrade robotframework in git action
2. Re-script ldap API script:test_assign_role_to_ldap_group.py

Signed-off-by: danfengliu <danfengl@vmware.com>
2020-08-20 11:24:51 +00:00
Dirk Mueller
08a4d8efd2
Update to golang 1.14.7 (#12809)
We should use a golang that isn't having security issues.

This includes:
* go1.14.6 (released 2020/07/16) includes fixes to the go command, the
compiler, the linker, vet, and the database/sql, encoding/json,
net/http, reflect, and testing packages. See the Go 1.14.6 milestone on
our issue tracker for details.

* go1.14.7 (released 2020/08/06) includes security fixes to the
encoding/binary package. See the Go 1.14.7 milestone on our issue
tracker for details (CVE-2020-16845)

Signed-off-by: Dirk Mueller <dirk@dmllr.de>
Signed-off-by: Dirk Mueller <dmueller@suse.com>
2020-08-20 15:38:35 +08:00
Wang Yan
60427e7187
build base image in CI (#12750)
In git action, use the local build base images instead of pulling from docker hub.

Signed-off-by: wang yan <wangyan@vmware.com>
2020-08-18 14:11:52 +08:00
He Weiwei
f659523f50 fix(scan): fix the permission checking for artifact scanning
Closes #12778

Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-08-17 09:55:38 +00:00
He Weiwei
f309896f2f refactor(api): generate project apis by go-swagger
Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-08-15 16:10:57 +00:00
danfengliu
5cb239af1e
Fix echo parameter issue (#12775)
Signed-off-by: danfengliu <danfengl@vmware.com>
2020-08-14 10:23:58 +08:00
danfengliu
e1eac2b4d0
Merge pull request #12688 from danfengliu/fix-upgrade-test-wrong-keyword-issue
Fix wrong keyword issue in upgrade test
2020-08-14 10:11:37 +08:00
Daniel Jiang
83de495147
Merge pull request #12772 from reasonerjt/update-root-cert-test
Refresh CA cert
2020-08-13 18:22:19 +08:00
Daniel Jiang
376929d58e Refresh CA cert
This commit refresh the harbor_ca.crt and revert the changes to generate a new CA each time in the test script.

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
2020-08-13 08:43:07 +00:00
danfengliu
8f116d7b38 Add exec priviledge to integration script
Signed-off-by: danfengliu <danfengl@vmware.com>
2020-08-13 08:15:42 +00:00
danfengliu
601d1ef0eb Add git/golang/dns config in drone image
Signed-off-by: danfengliu <danfengl@vmware.com>
2020-08-13 07:24:54 +00:00
danfengliu
9a2188641d Upgrade python and robot for drone build
1.Separate Dockerfile to drone and nightly e2e, one Dockerfile should cover
 both scenarios, it will be resolved later;
2.Fix docker api err type issue, API error has no message attibute;
3.Upgrade docker in nightly e2e images.

Signed-off-by: danfengliu <danfengl@vmware.com>
2020-08-12 10:26:12 +00:00
danfengliu
ab7767f539 Fix wrong keyword issue in upgrade test
Signed-off-by: danfengliu <danfengl@vmware.com>
2020-08-10 14:47:38 +00:00
danfengliu
4968b6619b Recovery drone build script
Signed-off-by: danfengliu <danfengl@vmware.com>
2020-08-10 14:23:44 +00:00
danfengliu
859ff2e1ef Modify e2e image for drone build
Signed-off-by: danfengliu <danfengl@vmware.com>
2020-08-10 11:40:26 +00:00
danfengliu
07f5f549d0 Fix LDAP API test issue by upgrading python
Signed-off-by: danfengliu <danfengl@vmware.com>
2020-08-09 06:37:28 +00:00
danfengliu
0521f9eed5
Merge pull request #12626 from danfengliu/upgrade-robotframework-and-libs
Upgrade robot-framework and Selenim library
2020-08-06 16:01:35 +08:00
danfengliu
3b8a2890f9 Upgrade robot-framework and Selenium library
1. Upgrade robot-framework to 3.1 and Selenium library to 4.4.0.
2. Fix a registry issue for clear filter text input.

Signed-off-by: danfengliu <danfengl@vmware.com>
2020-08-06 07:25:53 +00:00
Flávio Ramalho
3d3fabbd20
Make notary-remove-image-signature more flexible (#12536)
Instead of explicitly defining the expect path to /usr/local/bin/expect,
use the env command, so the expect executable is searched for and launched
from wherever it is first found.

Signed-off-by: Flávio Ramalho <framalho@suse.com>
2020-07-31 15:49:45 +08:00
danfengliu
da662f52d5
Merge pull request #12607 from danfengliu/add-gcs-s3-push-based-replic-test
Add GCS&S3 push-based replicatiton tests
2020-07-30 09:40:21 +08:00
danfengliu
8328e95b63 Add GCS&S3 push-based replicatiton tests
1. Add GCS push-based replicatiton tests;
   There is an issue against it, so it's commented out;
2. Add S3 push-based replicatiton tests;
3. Add filter registry keyword;

Signed-off-by: danfengliu <danfengl@vmware.com>
2020-07-29 12:44:49 +00:00
danfengliu
658cfcf3a2
Merge pull request #12427 from danfengliu/add-checkpoint-to-gc-untag-case
Add checkpoint of no deletion for untagged image
2020-07-28 21:27:26 +08:00
danfengliu
5d3080c2c2 Add checkpoint of no deletion for untagged image
1. Add checkpoint of no deletion for untagged image
2. rebase master.

Signed-off-by: danfengliu <danfengl@vmware.com>
2020-07-28 15:21:28 +08:00
stonezdj
7d97ae6ea2 Set LDAP groupname when PopulateGroup
Search ldap group name with default ldap group attribute name
fixes #10940

Signed-off-by: stonezdj <stonezdj@gmail.com>
2020-07-28 10:27:15 +08:00
danfengliu
f030de59a5
Merge pull request #12537 from danfengliu/add-oidc-user-onboard-test
Add OIDC user onboard test in nightly
2020-07-27 14:39:04 +08:00
danfengliu
8a691c5df1 Add OIDC user onboard test in nightly
Signed-off-by: danfengliu <danfengl@vmware.com>
2020-07-27 13:56:18 +08:00
Wang Yan
eeb8fca255
add debugging env for GC time window (#12528)
* add debugging env for GC time window

For debugging, the tester/users wants to run GC to delete the removed artifact immediately instead of waitting for two hours, add the env(GC_BLOB_TIME_WINDOW) to meet this.

Signed-off-by: wang yan <wangyan@vmware.com>
2020-07-22 11:09:01 +08:00
danfengliu
4bdcc1fa7d
Merge pull request #12515 from danfengliu/fix-replication-robot-script
Fix issues in replication tests
2020-07-20 16:19:19 +08:00
danfengliu
e20cb51d6b Fix issues in replication tests
Signed-off-by: danfengliu <danfengl@vmware.com>
2020-07-20 09:42:55 +08:00
Ziming Zhang
8857e89e40 feature(redis) support redis sentinel
Signed-off-by: Ziming Zhang <zziming@vmware.com>
2020-07-19 21:19:03 +08:00
danfengliu
af3a638980
Merge pull request #12498 from danfengliu/add-push-based-replication-test
Add push-based replication test in nightly
2020-07-17 11:01:38 +08:00
danfengliu
aa43afb601 Add push-based replication test in nightly
Signed-off-by: danfengliu <danfengl@vmware.com>
2020-07-16 19:50:42 +08:00
Wang Yan
bad8f026fc
upgrade golang to v1.14.5 (#12489)
Signed-off-by: wang yan <wangyan@vmware.com>
2020-07-16 16:20:54 +08:00
Wang Yan
d73265d10d
revise gc job to align non blocking gc (#12439)
two phases:
1, mark, select the gc candidates bases on the DB and mark them as status delete.
2, sweep, select the candidate and mark it as status deleting and remove it from backend and database.

Signed-off-by: wang yan <wangyan@vmware.com>
2020-07-16 14:35:54 +08:00
AllForNothing
706c6bdb2b Rename project role
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-07-08 09:15:01 +08:00
danfengliu
0cb378d8fa Verify error message when deleting signed image
1. Verify error message when deleting signed image;
2. Add test case - Replication From Dockerhub;

Signed-off-by: danfengliu <danfengl@vmware.com>
2020-07-06 10:56:31 +08:00
AllForNothing
fff6f7529a Replace all whitelist with allowlist
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-06-24 16:17:17 +08:00
danfengliu
a8f159728b Add API E2E pytest of GC with untag flag enabled
1. Fix issue of keyword Go Into Repo, the verification logic could be more strict;
2. Add API E2E pytest of GC with untag flag enabled;
3. Add sleep in test_user_view_logs.py for delete log ocurred;
4. Test Case - Tag CRUD is not stable. Although add button was clicked, but the tag was'nt added successfully.

Signed-off-by: danfengliu <danfengl@vmware.com>
2020-06-23 14:48:04 +08:00
danfengliu
c5e5e9ec9f
Merge pull request #12234 from danfengliu/fix-keyword-go-into-repo
Add helm and helm3 CLI py-test
2020-06-16 17:28:47 +08:00
danfengliu
67ccc98c58 Add helm and helm3 CLI py-test
Signed-off-by: danfengliu <danfengl@vmware.com>
2020-06-16 16:27:31 +08:00
danfengliu
1948a3ef66 Fix nightly issue caused by GC and CVE UI changed
Signed-off-by: danfengliu <danfengl@vmware.com>
2020-06-13 20:28:27 +08:00
danfengliu
4b5080d44e Add singularity py-test
Signed-off-by: danfengliu <danfengl@vmware.com>
2020-06-10 11:09:41 +08:00
Wang Yan
c993103e01
enable storage driver of gcs and oss (#12180)
Add go build tags for gcs and oss, otherwise these drivers cannot be registered and the error "StorageDriver is not regsited: GCS" will raise on registryctl launch under the setting of GCS storage.

These build tags are designed in the distribution, just refer to https://github.com/docker/distribution/blob/release/2.7/registry/storage/driver/gcs/gcs.go#L13

Pin the google cloud API to a old version is because distribution depends on it, otherwise go mode will use v0.17.0 that go-migrate is using as the dependency version, but this version will break the compile process with following error:
harbor/pkg/mod/google.golang.org/cloud@v0.0.0-20151119220103-975617b05ea8/storage/acl.go:65:16: invalid type assertion: v.(map[string]<inter>) (non-interface type *storage.ObjectAccessControl on left)
that's bacause another dependency google.golang.org/cloud requires the pinned version of google.golang.org/api.

The pinned package should be removed once https://github.com/docker/distribution/pull/3019 is merged, and distribution ships their v2.8.0

Signed-off-by: wang yan <wangyan@vmware.com>
2020-06-09 00:57:27 +08:00
danfengliu
e020b90bf0 add oras cli py-test
1. Add oras cli py-test;
2. Add env for notary url, allow to input different notary port instead of solid 4443;
3. Add retry for keyword Cannot Pull Image and make it longer during retry.

Signed-off-by: danfengliu <danfengl@vmware.com>
2020-06-08 11:10:07 +08:00
danfengliu
3f2850ffdf Scan result behavior changed after trivy upgrade
Signed-off-by: danfengliu <danfengl@vmware.com>
2020-06-04 16:25:21 +08:00
danfengliu
ceaa0a57b3 Add replication schedule test
1. Add replication schedule test;
2. Add some sleep after project creation before push image to avoid push image v2 error.
   It fixed issue# 12094: Scan image vmware/photon:1.0 return unsupported occasionally.
3. Add some sleep in test_user_view_logs.py, can't get operation logs sometimes.

Signed-off-by: danfengliu <danfengl@vmware.com>
2020-06-02 15:51:10 +08:00
danfengliu
a732292941
Merge pull request #12002 from danfengliu/add-retry-for-go-into-index-2
Add retry for keyword go into index
2020-05-29 10:01:20 +08:00
danfengliu
5d8a308158 Add retry for keyword go into index
1. Add retry for keyword go into index;
2. Add retry for keyword go into project.
Signed-off-by: danfengliu <danfengl@vmware.com>
2020-05-27 08:55:58 +00:00
danfengliu
ba48e55e4e Move docker prune cmd outside of api common install shell script
Signed-off-by: danfengliu <danfengl@vmware.com>
2020-05-22 04:06:25 +00:00
danfengliu
a07cc7bb2a
Merge pull request #11967 from danfengliu/fix-nightly-log-verification
Modify nightly quotas error message verification
2020-05-20 14:38:37 +08:00
danfengliu
2b9a01ce59
Merge pull request #11963 from danfengliu/add-schedule-test-in-ui-test
Add Scan schedule test in nightly
2020-05-20 14:36:29 +08:00
danfengliu
b4a54adfeb Add Scan schedule test in nightly
1. Add Scan schedule test in nightly;
2. Remove redundancy steps when create a new project;

Signed-off-by: danfengliu <danfengl@vmware.com>
2020-05-20 12:16:33 +08:00
danfengliu
2fb90cf258 Modify nightly quotas error message verification
Signed-off-by: danfengliu <danfengl@vmware.com>
2020-05-19 14:59:21 +08:00
wang yan
65f2abcb39 enable full set of conformance test
1, enable test of Content Discovery
2, enable test of Content Management

Signed-off-by: wang yan <wangyan@vmware.com>
2020-05-15 14:12:34 +08:00
danfengliu
ac19f02bf5 Enhance verificaton for tag retention pytest
1. Modify scan related keywords, some of keywords are not effective.

Signed-off-by: danfengliu <danfengl@vmware.com>
2020-05-12 16:41:47 +08:00
danfengliu
a8cfb40cc2
Merge pull request #11812 from danfengliu/fix-issue-of-gc-untag-case
Fix issue of GC untag images case
2020-04-30 20:17:37 +08:00
Daniel Jiang
2f2fe8ba68
Merge pull request #11801 from wy65701436/conformance-ci
add conformance test to CI
2020-04-30 19:49:07 +08:00
Daniel Jiang
8b9dc1fac6
Merge pull request #11779 from bitsf/cicd_fix_base_image
feat(cicd) add build date for base images
2020-04-30 19:13:16 +08:00
danfengliu
d10dfc8167 Fix issue of GC untag images case
Signed-off-by: danfengliu <danfengl@vmware.com>
2020-04-30 16:10:03 +08:00
danfengliu
768b292b15 Add double confirm for clicking untag checkbox
1. Add double confirm for clicking untag checkbox;
2. Add retry for waiting GC completion;

Signed-off-by: danfengliu <danfengl@vmware.com>
2020-04-29 20:21:07 +08:00
wang yan
d9773248e2 add conformance test to CI
1, add a specrate git action for conformance test
2, use the OCI testing code to test Harbor master code on push

Signed-off-by: wang yan <wangyan@vmware.com>
2020-04-29 16:08:27 +08:00
danfengliu
cd0463047b Add tag for ui test case of add nuew user
Signed-off-by: danfengliu <danfengl@vmware.com>
2020-04-28 19:47:47 +08:00
danfengliu
f8ce615e12 Add ctr command for pulling oci
1. Manifest list can be pulled by ctr;
2. ui-test missing key checkpoint, fix it by add checking scan detail result;
3. add tag retension untag image test;

Signed-off-by: danfengliu <danfengl@vmware.com>
2020-04-28 15:01:49 +08:00
danfengliu
16f6ad3688
Merge pull request #11768 from AllForNothing/nightly-login
Add new nightly case  admin add new users
2020-04-28 14:57:37 +08:00
Ziming Zhang
3c51ab556e feat(cicd) add build date for base images
Signed-off-by: Ziming Zhang <zziming@vmware.com>
2020-04-28 12:56:37 +08:00
AllForNothing
8ff4003438 Add new nightly case admin add new users
Signed-off-by: AllForNothing <sshijun@vmware.com>
2020-04-28 11:10:06 +08:00
He Weiwei
8458f980d0 fix(swagger): enable security in swagger.yaml
1. Enable `security` in the swagger.yaml.
2. Include `basic` auth in `security` to make the generated python
client by `swagger-codegen-cli` work with basic authorization.
3. Include `anonymous` auth in `security` to make APIs of v2.0 generated
by `goswagger` work with `security` middleware.

Closes #11771

Signed-off-by: He Weiwei <hweiwei@vmware.com>
2020-04-28 02:34:34 +00:00
DQ
599ca98c09 Hidden veriify client cert verfiy option
Remove to avoid replication access core from external_url issue

Signed-off-by: DQ <dengq@vmware.com>
2020-04-23 10:14:36 +08:00
Ziming Zhang
41e8bb91ce fix some cicd problems
Signed-off-by: Ziming Zhang <zziming@vmware.com>
2020-04-21 14:34:45 +08:00
danfengliu
fdded0744a Clean up gitaction env and add tag for pytest
1. Add docker prune cmd to release some space;
2. Add tag for pytest in case of debugging requirement;
3. Replace image to smaller size in robot account pytest;

Signed-off-by: danfengliu <danfengl@vmware.com>
2020-04-20 18:19:28 +08:00
Danfeng Liu (c)
1cc5d0261b Add robot-account verification for upgrade test
1. Add Clair should be default scanner in upgrade test;
2. Add tag retention verification in upgrade test;
3. Add tag retention verification in upgrade test;
4. Add tag Immutability verification in upgrade test;
5. Add webhook verification in upgrade test;
6. Add CVE whitelist in upgrade test;

Signed-off-by: Danfeng Liu (c) <danfengl@vmware.com>
2020-04-16 22:16:33 +08:00
Yogi_Wang
589d05a894 nightly move switch scanner case to mutiple-scanner file
Signed-off-by: Yogi_Wang <yawang@vmware.com>
2020-04-16 10:05:08 +08:00
Yogi_Wang
8835813439 [test-case] add switch scanner case
Signed-off-by: Yogi_Wang <yawang@vmware.com>
2020-04-15 14:53:17 +08:00
jwangyangls
5cf72e3ba4
Merge pull request #11616 from jwangyangls/fix-bug-case
[Test] Fix view log error
2020-04-14 21:41:47 +08:00