Skip to content

Commit

Permalink
Merge branch 'main' into fix/invalid-repo-artifacts-404
Browse files Browse the repository at this point in the history
  • Loading branch information
Vad1mo authored Aug 27, 2024
2 parents e3beda9 + 1fd606a commit 2651e23
Show file tree
Hide file tree
Showing 103 changed files with 2,412 additions and 893 deletions.
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ GOIMAGEBUILD_CORE=$(GOIMAGEBUILDCMD) $(GOFLAGS) ${GOTAGS} --ldflags "-w -s $(COR
GOBUILDPATH_CORE=$(GOBUILDPATHINCONTAINER)/src/core
GOBUILDPATH_JOBSERVICE=$(GOBUILDPATHINCONTAINER)/src/jobservice
GOBUILDPATH_REGISTRYCTL=$(GOBUILDPATHINCONTAINER)/src/registryctl
GOBUILDPATH_MIGRATEPATCH=$(GOBUILDPATHINCONTAINER)/src/cmd/migrate-patch
GOBUILDPATH_STANDALONE_DB_MIGRATOR=$(GOBUILDPATHINCONTAINER)/src/cmd/standalone-db-migrator
GOBUILDPATH_EXPORTER=$(GOBUILDPATHINCONTAINER)/src/cmd/exporter
GOBUILDMAKEPATH=make
Expand All @@ -182,7 +181,6 @@ JOBSERVICEBINARYPATH=$(BUILDPATH)/$(GOBUILDMAKEPATH_JOBSERVICE)
JOBSERVICEBINARYNAME=harbor_jobservice
REGISTRYCTLBINARYPATH=$(BUILDPATH)/$(GOBUILDMAKEPATH_REGISTRYCTL)
REGISTRYCTLBINARYNAME=harbor_registryctl
MIGRATEPATCHBINARYNAME=migrate-patch
STANDALONE_DB_MIGRATOR_BINARYPATH=$(BUILDPATH)/$(GOBUILDMAKEPATH_STANDALONE_DB_MIGRATOR)
STANDALONE_DB_MIGRATOR_BINARYNAME=migrate

Expand Down Expand Up @@ -548,7 +546,6 @@ cleanbinary:
if [ -f $(CORE_BINARYPATH)/$(CORE_BINARYNAME) ] ; then rm $(CORE_BINARYPATH)/$(CORE_BINARYNAME) ; fi
if [ -f $(JOBSERVICEBINARYPATH)/$(JOBSERVICEBINARYNAME) ] ; then rm $(JOBSERVICEBINARYPATH)/$(JOBSERVICEBINARYNAME) ; fi
if [ -f $(REGISTRYCTLBINARYPATH)/$(REGISTRYCTLBINARYNAME) ] ; then rm $(REGISTRYCTLBINARYPATH)/$(REGISTRYCTLBINARYNAME) ; fi
if [ -f $(MIGRATEPATCHBINARYPATH)/$(MIGRATEPATCHBINARYNAME) ] ; then rm $(MIGRATEPATCHBINARYPATH)/$(MIGRATEPATCHBINARYNAME) ; fi
rm -rf make/photon/*/binary/

cleanbaseimage:
Expand Down
105 changes: 104 additions & 1 deletion api/v2.0/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ paths:
operationId: searchLdapUser
summary: Search available ldap users.
description: |
This endpoint searches the available ldap users based on related configuration parameters. Support searched by input ladp configuration, load configuration from the system and specific filter.
This endpoint searches the available ldap users based on related configuration parameters. Support searched by input ldap configuration, load configuration from the system and specific filter.
parameters:
- $ref: '#/parameters/requestId'
- name: username
Expand Down Expand Up @@ -1548,6 +1548,88 @@ paths:
$ref: '#/responses/409'
'500':
$ref: '#/responses/500'
/projects/{project_name_or_id}/artifacts:
get:
summary: List artifacts
description: List artifacts of the specified project
tags:
- project
operationId: listArtifactsOfProject
parameters:
- $ref: '#/parameters/requestId'
- $ref: '#/parameters/isResourceName'
- $ref: '#/parameters/projectNameOrId'
- $ref: '#/parameters/query'
- $ref: '#/parameters/sort'
- $ref: '#/parameters/page'
- $ref: '#/parameters/pageSize'
- $ref: '#/parameters/acceptVulnerabilities'
- name: with_tag
in: query
description: Specify whether the tags are included inside the returning artifacts
type: boolean
required: false
default: true
- name: with_label
in: query
description: Specify whether the labels are included inside the returning artifacts
type: boolean
required: false
default: false
- name: with_scan_overview
in: query
description: Specify whether the scan overview is included inside the returning artifacts
type: boolean
required: false
default: false
- name: with_sbom_overview
in: query
description: Specify whether the SBOM overview is included in returning artifacts, when this option is true, the SBOM overview will be included in the response
type: boolean
required: false
default: false
- name: with_immutable_status
in: query
description: Specify whether the immutable status is included inside the tags of the returning artifacts. Only works when setting "with_immutable_status=true"
type: boolean
required: false
default: false
- name: with_accessory
in: query
description: Specify whether the accessories are included of the returning artifacts. Only works when setting "with_accessory=true"
type: boolean
required: false
default: false
- name: latest_in_repository
in: query
description: Specify whether only the latest pushed artifact of each repository is included inside the returning artifacts. Only works when either artifact_type or media_type is included in the query.
type: boolean
required: false
default: false
responses:
'200':
description: Success
headers:
X-Total-Count:
description: The total count of artifacts
type: integer
Link:
description: Link refers to the previous page and next page
type: string
schema:
type: array
items:
$ref: '#/definitions/Artifact'
'400':
$ref: '#/responses/400'
'401':
$ref: '#/responses/401'
'403':
$ref: '#/responses/403'
'404':
$ref: '#/responses/404'
'500':
$ref: '#/responses/500'
'/projects/{project_name_or_id}/scanner':
get:
summary: Get project level scanner
Expand Down Expand Up @@ -6586,6 +6668,9 @@ definitions:
manifest_media_type:
type: string
description: The manifest media type of the artifact
artifact_type:
type: string
description: The artifact_type in the manifest of the artifact
project_id:
type: integer
format: int64
Expand All @@ -6594,6 +6679,9 @@ definitions:
type: integer
format: int64
description: The ID of the repository that the artifact belongs to
repository_name:
type: string
description: The name of the repository that the artifact belongs to
digest:
type: string
description: The digest of the artifact
Expand Down Expand Up @@ -7252,6 +7340,10 @@ definitions:
type: string
description: 'The ID of the tag retention policy for the project'
x-nullable: true
proxy_speed_kb:
type: string
description: 'The bandwidth limit of proxy cache, in Kbps (kilobits per second). It limits the communication between Harbor and the upstream registry, not the client and the Harbor.'
x-nullable: true
ProjectSummary:
type: object
properties:
Expand Down Expand Up @@ -7754,6 +7846,9 @@ definitions:
type: array
items:
$ref: '#/definitions/RobotPermission'
creator:
type: string
description: The creator of the robot
creation_time:
type: string
format: date-time
Expand Down Expand Up @@ -8897,6 +8992,9 @@ definitions:
ldap_group_search_scope:
$ref: '#/definitions/IntegerConfigItem'
description: The scope to search ldap group. ''0-LDAP_SCOPE_BASE, 1-LDAP_SCOPE_ONELEVEL, 2-LDAP_SCOPE_SUBTREE''
ldap_group_attach_parallel:
$ref: '#/definitions/BoolConfigItem'
description: Attach LDAP user group information in parallel.
ldap_scope:
$ref: '#/definitions/IntegerConfigItem'
description: The scope to search ldap users,'0-LDAP_SCOPE_BASE, 1-LDAP_SCOPE_ONELEVEL, 2-LDAP_SCOPE_SUBTREE'
Expand Down Expand Up @@ -9087,6 +9185,11 @@ definitions:
description: The scope to search ldap group. ''0-LDAP_SCOPE_BASE, 1-LDAP_SCOPE_ONELEVEL, 2-LDAP_SCOPE_SUBTREE''
x-omitempty: true
x-isnullable: true
ldap_group_attach_parallel:
type: boolean
description: Attach LDAP user group information in parallel, the parallel worker count is 5
x-omitempty: true
x-isnullable: true
ldap_scope:
type: integer
description: The scope to search ldap users,'0-LDAP_SCOPE_BASE, 1-LDAP_SCOPE_ONELEVEL, 2-LDAP_SCOPE_SUBTREE'
Expand Down
5 changes: 5 additions & 0 deletions make/migrations/postgresql/0150_2.12.0_schema.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/*
Add new column creator for robot table to add a new column to record the creator of the robot
*/
ALTER TABLE robot ADD COLUMN IF NOT EXISTS creator varchar(255);
UPDATE robot SET creator = 'unknown' WHERE creator IS NULL;
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '2.3'
services:
log:
image: goharbor/harbor-log:{{version}}
Expand Down
3 changes: 3 additions & 0 deletions make/photon/prepare/templates/nginx/nginx.http.conf.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ http {

proxy_buffering off;
proxy_request_buffering off;

proxy_send_timeout 900;
proxy_read_timeout 900;
}

location /api/ {
Expand Down
81 changes: 63 additions & 18 deletions src/.mockery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@ packages:
Controller:
config:
dir: testing/controller/artifact
github.com/goharbor/harbor/src/controller/artifact/processor:
interfaces:
Processor:
config:
dir: testing/pkg/processor
github.com/goharbor/harbor/src/controller/artifact/annotation:
interfaces:
Parser:
config:
dir: testing/pkg/parser
outpkg: parser
github.com/goharbor/harbor/src/controller/blob:
interfaces:
Controller:
Expand Down Expand Up @@ -188,6 +199,11 @@ packages:
Manager:
config:
dir: testing/pkg/artifact
github.com/goharbor/harbor/src/pkg/artifactrash:
interfaces:
Manager:
config:
dir: testing/pkg/artifactrash
github.com/goharbor/harbor/src/pkg/blob:
interfaces:
Manager:
Expand Down Expand Up @@ -218,6 +234,11 @@ packages:
Handler:
config:
dir: testing/pkg/scan
github.com/goharbor/harbor/src/pkg/scan/postprocessors:
interfaces:
NativeScanReportConverter:
config:
dir: testing/pkg/scan/postprocessors
github.com/goharbor/harbor/src/pkg/scan/report:
interfaces:
Manager:
Expand All @@ -238,7 +259,7 @@ packages:
dir: pkg/scheduler
outpkg: scheduler
mockname: mockDAO
filename: mock_dao_test.go
filename: mock_dao_test.go
inpackage: True
Scheduler:
config:
Expand Down Expand Up @@ -342,6 +363,14 @@ packages:
DAO:
config:
dir: testing/pkg/immutable/dao
github.com/goharbor/harbor/src/pkg/immutable/match:
interfaces:
ImmutableTagMatcher:
config:
dir: testing/pkg/immutable
filename: matcher.go
outpkg: immutable
mockname: FakeMatcher
github.com/goharbor/harbor/src/pkg/ldap:
interfaces:
Manager:
Expand Down Expand Up @@ -505,20 +534,36 @@ packages:
Manager:
config:
dir: testing/pkg/securityhub

















github.com/goharbor/harbor/src/pkg/tag:
interfaces:
Manager:
config:
dir: testing/pkg/tag
github.com/goharbor/harbor/src/pkg/p2p/preheat/policy:
interfaces:
Manager:
config:
dir: testing/pkg/p2p/preheat/policy
github.com/goharbor/harbor/src/pkg/p2p/preheat/instance:
interfaces:
Manager:
config:
dir: testing/pkg/p2p/preheat/instance
github.com/goharbor/harbor/src/pkg/chart:
interfaces:
Operator:
config:
dir: testing/pkg/chart
# registryctl related mocks
github.com/goharbor/harbor/src/registryctl/client:
interfaces:
Client:
config:
dir: testing/registryctl
outpkg: registryctl
# remote interfaces
github.com/docker/distribution:
interfaces:
Manifest:
config:
dir: testing/pkg/distribution
6 changes: 0 additions & 6 deletions src/cmd/migrate-patch/README.md

This file was deleted.

Loading

0 comments on commit 2651e23

Please sign in to comment.