0
Fork 0
mirror of https://github.com/project-zot/zot.git synced 2024-12-16 21:56:37 -05:00
Commit graph

264 commits

Author SHA1 Message Date
Andreea Lupu
76277f5ebd
fix: remove inline GC and schedule a background task instead (#1610)
* fix: remove inline GC and set a default value of gc interval

- remove inline GC
- add a default value of GC interval
- run the GC periodically by default with the default value if no interval provided
- generate GC tasks with a random delay(0-30s) between
- add IsReady() method to scheduler.TaskGenerator interface

Signed-off-by: Andreea-Lupu <andreealupu1470@yahoo.com>

* ci: add test for gc with short interval

Signed-off-by: Andreea-Lupu <andreealupu1470@yahoo.com>

---------

Signed-off-by: Andreea-Lupu <andreealupu1470@yahoo.com>
2023-08-07 12:55:19 -07:00
Ramkumar Chinchani
cad564b9ee
ci(conformance): revert to upstream OCI checks (#1678)
Reverts part of de24bd937f

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2023-08-04 13:38:28 -07:00
Andrei Aaron
77149aa85c
refactor(extensions)!: refactor the extensions URLs and errors (#1636)
BREAKING CHANGE: The functionality provided by the mgmt endpoint has beed redesigned - see details below
BREAKING CHANGE: The API keys endpoint has been moved -  see details below
BREAKING CHANGE: The mgmt extension config has been removed - endpoint is now enabled by having both the search and the ui extensions enabled
BREAKING CHANGE: The API keys configuration has been moved from extensions to http>auth>apikey

mgmt and imagetrust extensions:
- separate the _zot/ext/mgmt into 3 separate endpoints: _zot/ext/auth, _zot/ext/notation, _zot/ext/cosign
- signature verification logic is in a separate `imagetrust` extension
- better hanling or errors in case of signature uploads: logging and error codes (more 400 and less 500 errors)
- add authz on signature uploads (and add a new middleware in common for this purpose)
- remove the mgmt extension configuration - it is now enabled if the UI and the search extensions are enabled

userprefs estension:
- userprefs are enabled if both search and ui extensions are enabled (as opposed to just search)

apikey extension is removed and logic moved into the api folder
- Move apikeys code out of pkg/extensions and into pkg/api
- Remove apikey configuration options from the extensions configuration and move it inside the http auth section
- remove the build label apikeys

other changes:
- move most of the logic adding handlers to the extensions endpoints out of routes.go and into the extensions files.
- add warnings in case the users are still using configurations with the obsolete settings for mgmt and api keys
- add a new function in the extension package which could be a single point of starting backgroud tasks for all extensions
- more clear methods for verifying specific extensions are enabled
- fix http methods paired with the UI handlers
- rebuild swagger docs

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
2023-08-02 21:58:34 +03:00
Ramkumar Chinchani
42f9f78125
ci: add freebsd target for releases (#1660)
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2023-07-31 13:51:03 -07:00
Ramkumar Chinchani
75b94a3c8b
chore: fix dependabot alerts (#1649) 2023-07-25 08:14:37 +03:00
Ramkumar Chinchani
de24bd937f
fix(conformance): OCI-Filters-Applied should return a literal (#1640)
* fix(conformance): OCI-Filters-Applied should return a literal

https://github.com/opencontainers/distribution-spec/issues/448

Should only indicate what filter-type was applied and not what exact
values it was filtered on.

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>

* ci(conformance): point to temporary repo

Revert this commit once upstream changes have been merged

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>

---------

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2023-07-22 16:25:02 -07:00
Ramkumar Chinchani
fe9c9750b5
chore: fix dependabot alerts (#1631)
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2023-07-17 23:37:54 +03:00
peusebiu
d3f27b4ba6
feat: add additional manifest validations (#1609)
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
2023-07-13 09:31:39 -07:00
Ramkumar Chinchani
730ef4aada
chore: fix dependabot alerts (#1613)
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2023-07-13 10:14:03 +03:00
peusebiu
cda6916b45
fix: don't allow blobs to be deleted if in use (#1559)
dist-spec APIs independently allow deletion of blobs and manifests.
Doing the former when in use by an image manifest or index is simply
error-prone. So disallow it.

Fixes issue #1509

Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
Co-authored-by: Ramkumar Chinchani <rchincha@cisco.com>
2023-07-10 12:24:45 +03:00
peusebiu
cd6f679359
fix(ci/cd): stop localstack after ci/cd pipeline (#1590)
this should clean localstack persisted data in tests

Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
2023-07-07 12:40:06 -07:00
peusebiu
17d1338af1
feat: integrate openID auth logic and user profile management (#1381)
This change introduces OpenID authn by using providers such as Github,
Gitlab, Google and Dex.
User sessions are now used for web clients to identify
and persist an authenticated users session, thus not requiring every request to
use credentials.
Another change is apikey feature, users can create/revoke their api keys and use them
to authenticate when using cli clients such as skopeo.

eg:
login:
/auth/login?provider=github
/auth/login?provider=gitlab
and so on

logout:
/auth/logout

redirectURL:
/auth/callback/github
/auth/callback/gitlab
and so on

If network policy doesn't allow inbound connections, this callback wont work!

for more info read documentation added in this commit.

Signed-off-by: Alex Stan <alexandrustan96@yahoo.ro>
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
Co-authored-by: Alex Stan <alexandrustan96@yahoo.ro>
2023-07-07 09:27:10 -07:00
peusebiu
7d7e4416b5
fix(nightly): fix nightly builds (#1584)
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
2023-07-06 16:50:12 +03:00
Ramkumar Chinchani
137e5bd793
chore: fix dependabot alerts (#1581)
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2023-07-05 11:42:24 +03:00
Ramkumar Chinchani
aad6db279b
chore: fix dependabot alerts (#1576)
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2023-07-04 09:19:26 -07:00
Andreea Lupu
7ec748f58a
fix: change commit message for pushing changes to project-zot/helm-charts (#1564)
Signed-off-by: Andreea-Lupu <andreealupu1470@yahoo.com>
2023-06-28 20:42:31 +03:00
Ramkumar Chinchani
d78ef0b1bd
ci: update oci dist-spec conformance test (#1552)
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2023-06-24 18:51:47 -07:00
Ramkumar Chinchani
d30d7a9330
chore: fix dependabot alerts (#1537)
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2023-06-19 12:34:50 -07:00
peusebiu
d45cfbf5d2
feat(ci): give minio container more time to start (#1527)
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
2023-06-16 12:24:38 +03:00
Ramkumar Chinchani
7dd17be96d
chore: fix dependabot alerts (#1517)
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2023-06-16 10:28:43 +03:00
Andrei Aaron
f9f9422d13
ci(disk usage): disk related fixes and improvements (#1524)
ci(workflow): show disk usage and free up disk space used by unneeded tooling
ci(tests): routes tests: do not copy large images if they are not used later
ci(trivy): update a test: download trivy.db to a temporary folder

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
2023-06-15 15:07:28 -07:00
Ramkumar Chinchani
d9e5f33e7e
chore: fix security alerts (#1493)
https://github.com/project-zot/zot/security/code-scanning/4293

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2023-06-01 16:53:50 -07:00
peusebiu
612a12e5a8
refactor(sync): use task scheduler (#1301)
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
2023-05-31 10:26:23 -07:00
Andrei Aaron
60148138d5
ci(cri-o): update cri-o installation steps (#1470)
Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
2023-05-23 17:01:10 +03:00
Andreea Lupu
6269dbea0c
fix(ci-cd): trigger update-helm-chart after push-image is completed (#1435)
Signed-off-by: Andreea-Lupu <andreealupu1470@yahoo.com>
2023-05-10 09:53:39 -07:00
Ramkumar Chinchani
42df4c505a
chore: fix dependabot alerts (#1403)
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2023-05-01 12:49:10 -07:00
Ramkumar Chinchani
635d07ae04
chore: update golang (to 1.20.x) and golangci-linter (#1388)
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2023-04-27 00:09:46 -07:00
LaurentiuNiculae
9cc990d7ca
feat(repodb): add user related information to repodb (#1317)
Initial code was contributed by Bogdan BIVOLARU <104334+bogdanbiv@users.noreply.github.com>
Moved implementation from a separate db to repodb by Andrei Aaron <aaaron@luxoft.com>

Not done yet:
- run/test dynamodb implementation, only boltdb was tested
- add additional coverage for existing functionality
- add web-based APIs to toggle the stars/bookmarks on/off

Initially graphql mutation was discussed for the missing API but
we decided REST endpoints would be better suited for configuration



feat(userdb): complete functionality for userdb integration

- dynamodb rollback changes to user starred repos in case increasing the total star count fails
- dynamodb increment/decrement repostars in repometa when user stars/unstars a repo
- dynamodb check anonymous user permissions are working as intendend
- common test handle anonymous users
- RepoMeta2RepoSummary set IsStarred and IsBookmarked



feat(userdb): rest api calls for toggling stars/bookmarks on/off



test(userdb): blackbox tests



test(userdb): move preferences tests in a different file with specific build tags



feat(repodb): add is-starred and is-bookmarked fields to repo-meta

- removed duplicated logic for determining if a repo is starred/bookmarked

Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>
Co-authored-by: Andrei Aaron <aaaron@luxoft.com>
2023-04-24 11:13:15 -07:00
Ramkumar Chinchani
9638899e6e
test: additional blackbox tests for client push/pull (#1371)
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2023-04-13 13:47:38 -07:00
peusebiu
f35ff53146
feat(storage): rebuild storage(s3/local) dedupe index when switching dedupe status (#1062)
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
2023-04-07 09:49:24 -07:00
Ramkumar Chinchani
d9173e3ad3
chore(go.mod): fix dependabot alerts (#1330)
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2023-04-05 09:39:15 +03:00
Ramkumar Chinchani
917159143c
chore: fix dependabot alerts (#1312)
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2023-03-27 12:16:29 -07:00
Ramkumar Chinchani
906f8ce621
chore(deps): fix dependabot alerts (#1291)
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2023-03-22 12:33:21 -07:00
LaurentiuNiculae
5d1f91a79f
feat(repodb): update referrers api to use repodb (#1230)
Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>
2023-03-10 10:37:29 -08:00
peusebiu
f04e66a5e2
feat(mgmt): added mgmt extension which returns current zot configuration (#1198)
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
2023-03-09 10:43:26 -08:00
Andrei Aaron
73b1126bbf
chore(go.mod): fix dependabot alerts (#1247)
Supersedes:
- https://github.com/project-zot/zot/pull/1132
- https://github.com/project-zot/zot/pull/1243
- https://github.com/project-zot/zot/pull/1244
- https://github.com/project-zot/zot/pull/1245

Also update the AWS SDK libraries used

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
2023-03-06 11:05:19 -08:00
Andrei Aaron
5968e7199f
test(ui): add owasp zap scanner in ci/cd (#1224)
(cherry picked from commit 6d03ce5f2d)

Additional changes on top of: 6d03ce5f2d
- Build and use zot from the same branch
do not use a container image as scan target, use the binary
- Fix typo in rules filename
- Add the full rule list to the rules config file
- Ignore some of the specific rules and add reasons
- Add security-related headers to fix some of the issues identified by the scan
- Update UI it includes the latest fixes for zap scan issues

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
Co-authored-by: Ramkumar Chinchani <rchincha@cisco.com>
2023-02-27 11:25:47 -08:00
Andrei Aaron
ed4954ab0d
build(ui): the ui is now included in the zot binary by default (#1202)
Update the default value of the EXTENSIONS variable in the makefile.
Also cleanup binary-ui and other make targets assuming the UI was not included by default.
Enable the ui by default in the zot container image
Swith back to using the distroless images, as c3 only has amd64 images.
Fix updating security events in github (permission issue)
Add an integration test for the UI extension
Rename ui extension files to use _ instead of -
feat(ui): upgrade to zui v2.0.0-rc3

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
2023-02-23 22:28:08 +02:00
Andrei Aaron
b1c6d945c6
chore(codecov): use a token to authenticate to codecov (#1212)
This should not be necessary for public repos,
but should help with rate limitting

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
2023-02-17 23:10:28 -08:00
Ramkumar Chinchani
be33f7b252
chore(go.mod): fix dependabot alerts (#1210)
* chore(go.mod): fix dependabot alerts

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>

* chore(test): update image tags

We have cleaned up older golang images in the project.

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>

* ci(gqlgen): fix gql schema validation GH workflow after npm upgrade

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>

---------

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2023-02-17 13:54:49 -08:00
Andrei Aaron
1f9f178a57
ci(golang): fix syncing build image golang 1.20 (#1205)
Since the matrix values were unquoted,
the logic reading the yaml considered them numbers

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
2023-02-17 10:02:30 -08:00
Ramkumar Chinchani
672a2cd384
chore: add/sync golang 1.20.x images (#1200)
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2023-02-16 11:25:32 +02:00
Andrei Aaron
0cddb2be3e
feat(ui): use a Makefile variable to download a pre-existing zui build (#1196)
Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
2023-02-13 22:55:05 +02:00
Andrei Aaron
c0aaca8ed1
feat(ui): package zui within zot binary (#1161)
(cherry picked from commit d557da0baba819b7cd7e6b5941528776e125ac6d)

build(ui): fix stacker builds


(cherry picked from commit ba25daf02b4a9bc7ee1cb6f84b7a6b096ca7d61f)

build(ui): various fixes

- Fix metrics endpoint
- Fix unit tests unit tests
- Make the ui build optional in the makefile
before the linter lint runs in the golangci-lint workflow
- Do not attempt to include UI routes if search is enabled
- Fix authorization for search endpoint



fix: use zot tag in ui make target


(cherry picked from commit 2a6882fa23f06b2d68c6c299773a6ff50bf90e78)

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
Signed-off-by: Catalin Hofnar <catalin.hofnar@gmail.com>
Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
Co-authored-by: Ramkumar Chinchani <rchincha@cisco.com>
2023-02-10 14:52:54 -08:00
Andrei Aaron
3cb99f4ed9
ci(cache): split go build cache from go modules cache (#1169)
The cache should not be the same if we build for different OSs/architectures

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
2023-02-04 09:57:07 +02:00
Andrei Aaron
78feb4b495
docs(graphql): rewrote search.md (#1130)
* docs(graphql): rewrote search.md
docs(graphql): added pagination and filter docs for gql

Squash of both commits:
(cherry picked from commit 2268fa0510b32b27f2c1f71e9889ec769877553b)
(cherry picked from commit c96adc88b2fb9edff90e7e4b01a8885511ceb0df)
Signed-off-by: Catalin Hofnar <catalin.hofnar@gmail.com>

Some additional updates by Andrei Aaron to keep up with the changes on main.
Also add more comments to schema.graphql

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>

* style: run a graphql schemma linter as a github workflow

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>

---------

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
Co-authored-by: Catalin Hofnar <catalin.hofnar@gmail.com>
2023-02-02 12:46:35 -08:00
Andrei Aaron
08983a845a
feat(repodb): implement pagination for ImageList and integrate it with RepoDB (#1129)
* feat(repodb): implement pagination for ImageList and integrate it with RepoDB

- it can now return all images from all repos, when provided repo parameter is ""

Signed-off-by: Alex Stan <alexandrustan96@yahoo.ro>
(cherry picked from commit c003dcec9f805564946935e7eb091632f605035e)
(cherry picked from commit 72feba979b9ddd452465a652bb31f439584a046c)
Signed-off-by: Andrei Aaron <aaaron@luxoft.com>

* ci(timeouts): increase ci-cd workflow timeout for the build and test step

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>

Signed-off-by: Alex Stan <alexandrustan96@yahoo.ro>
Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
Co-authored-by: Alex Stan <alexandrustan96@yahoo.ro>
2023-01-23 09:45:11 -08:00
Andrei Aaron
fac1d1d05d
chore(trivy): update trivy version and enforce OCI compliant repo names in local image storage (#1068)
1. chore(trivy): update trivy library version

The trivy team switched github.com/urfave/cli for viper so
there are some other code changes as well.

Since we don't use github.com/urfave/cli directly in our software
we needed to add a tools.go in order for "go mod tidy" to not delete it.
See this pattern explained in:
- https://github.com/99designs/gqlgen#quick-start
- https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module
- https://github.com/go-modules-by-example/index/blob/master/010_tools/README.md#walk-through

The jobs using "go get -u" have been updated to use "go install", since go get
modifies the go.mod by upgrading some of the packages, but downgrading trivy to an older
version with broken dependencies

2. fix(storage) Update local storage to ignore folder names not compliant with dist spec
Also updated trivy to download the DB and cache results under the rootDir/_trivy folder

3. fix(s3): one of the s3 tests was missing the skipIt call
This caused a failure when running locally without s3 being available

4. make sure the offline scanning is enabled, and zot only downloads the trivy DB
on the regular schedule, and doesn't download the DB on every image scan

ci: increase build and test timeout as tests are reaching the limit more often

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
2023-01-18 08:24:44 -08:00
Ramkumar Chinchani
ca1d4beb2a
ci: also allow manual workflow triggers (#1109)
* ci: also allow manual workflow triggers

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>

* ci: add a github actions checker

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2023-01-13 00:49:42 -08:00
Andrei Aaron
9f0b833293
fix(ci): use oras login before copying trivy-db
Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
2023-01-12 18:44:45 +00:00
Andrei Aaron
787a75e218
fix(ci): fix path to trivy-db copy under project-zot (#1108)
Signed-off-by: Andrei Aaron <aaaron@luxoft.com>

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
2023-01-12 20:01:43 +02:00
Andrei Aaron
6f5b7afd39
ci(trivy): copy trivydb oci artefact to project-zot repo (#1106)
This will replace calls made directly to ghcr.io/aquasecurity/trivy-db
Which are hitting the rate limiter

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
2023-01-12 09:54:53 -08:00
LaurentiuNiculae
f408df0dac
feat(repodb): Implement RepoDB for image specific information using boltdb/dynamodb (#979)
* feat(repodb): implement a DB for image specific information using boltdb

(cherry picked from commit e3cb60b856)

Some other fixes/improvements on top (Andrei)

Global search: The last updated attribute on repo level is now computed correctly.
Global search: Fix and enhance tests: validate more fields, and fix CVE verification logic
RepoListWithNewestImage: The vendors and platforms at repo level are no longer containing duplicate entries
CVE: scan OCIUncompressedLayer instead of skiping them (used in tests)
bug(repodb): do no try to increment download counters for signatures

Signed-off-by: Andrei Aaron <andaaron@cisco.com>

Add filtering to global search API (Laurentiu)

(cherry picked from commit a87976d635ea876fe8ced532e8adb7c3bb24098f)

Original work by Laurentiu Niculae <niculae.laurentiu1@gmail.com>

Fix pagination bug

 - when limit was bigger than the repo count result contained empty results
 - now correctly returns only maximum available number of repo results

Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>

Add history to the fields returned from RepoDB

Consolidate fields used in packages
- pkg/extensions/search/common/common_test
- pkg/extensions/search/common/common
Refactor duplicate code in GlobalSearch verification
Add vulnerability scan results to image:tag reply

Signed-off-by: Andrei Aaron <andaaron@cisco.com>

Refactor ExpandedRepoInfo to using RepoDB

Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>
(cherry picked from commit fd7dc85c3a9d028fd8860d3791cad4df769ed005)

Init RepoDB at startup
 - sync with storage
 - ignore images without a tag

Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>
(cherry picked from commit 359898facd6541b2aa99ee95080f7aabf28c2650)

Update request to get image:tag to use repodb

Signed-off-by: Andrei Aaron <andaaron@cisco.com>

Sync RepoDB logging
 - added logging for errors

Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>
(cherry picked from commit 2e128f4d01712b34c70b5468285100b0657001bb)

sync-repodb minor error checking fix

Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>

Improve tests for syncing RepoDB with storage

Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>
(cherry picked from commit b18408c6d64e01312849fc18b929e3a2a7931e9e)

Update scoring rule for repos
  - now prioritize matches to the end of the repo name

Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>
(cherry picked from commit 6961346ccf02223132b3b12a2132c80bd1b6b33c)

Upgrade search filters to permit multiple values
  - multiple values for os and arch

Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>
(cherry picked from commit 3ffb72c6fc0587ff827a03fe4f76a13b27b876a0)

feature(repodb): add pagination for RepoListWithNewestImage

Signed-off-by: Alex Stan <alexandrustan96@yahoo.ro>
(cherry picked from commit 32c917f2dc65363b0856345289353559a8027aee)

test(fix): fix tests failing since repodb is used for listing all repos

1. One of the tests was verifying disk/oci related erros and is not applicable
2. Another test was actually broken in an older PR, the default store and
the substore were using the same repo names (the substore ones were unprefixed),
which should not be the case, this was causing a single entry to show
in the RepoDB instead of two separate entries for each test image
Root cause in: b61aff62cd (diff-b86e11fa5a3102b336caebec3b30a9d35e26af554dd8658f124dba2404b7d24aR88)

Signed-off-by: Andrei Aaron <andaaron@cisco.com>

chore: move code reponsible for transforming objects to gql_generated types to separate package

Signed-off-by: Andrei Aaron <andaaron@cisco.com>

Process input for global search
  - Clean input: query, filter strings
  - Add validation for global search input

Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>
(cherry picked from commit f1ca8670fbe4a4a327ea25cf459237dbf23bb78a)

fix: only call cve scanning for data shown to the user

Signed-off-by: Andrei Aaron <andaaron@cisco.com>

GQL omit scanning for CVE if field is not required

Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>
(cherry picked from commit 5479ce45d6cb2abcf5fbccadeaf6f3393c3f6bf1)

Fix filtering logic in RepoDB
  - filter parameter was set to false instead of being calculator from the later image

Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>
(cherry picked from commit a82d2327e34e5da617af0b7ca78a2dba90999f0a)

bug(repodb): Checking signature returns error if signed image is not found
  - we considere a signature image orfan when the image it signs is not found
  - we need this to ignore such signatures in certain cases

Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>
(cherry picked from commit d0418505f76467accd8e1ee34fcc2b2a165efae5)

feat(repodb): CVE logic to use repoDB

Also update some method signatures to remove usage of:
github.com/google/go-containerregistry/pkg/v1

Signed-off-by: Andrei Aaron <andaaron@cisco.com>

* feat(repodb): refactor repodb update logic

Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>

* fix(repodb): minor fixes

Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>

* feat(repodb): move repodb logic inside meta directory under pkg

Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>

* feat(repodb): change factory class for repodb initialization with factory metrod

Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>

* feat(repodb): simplify repodb configuration
  - repodb now shares config parameters with the cache
  - config taken directly from storage config

Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>

* fix(authors): fix authors information to work properly with repodb

Ideally this commit would be squshed in the repodb commit
but as-is it is easier to cherry-pick on other branches

Signed-off-by: Andrei Aaron <andaaron@cisco.com>

* feat(repodb): dynamodb support for repodb
  - clean-up repodb code + coverage improvements

Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>

* feat(dynamo): tables used by dynamo are created automatically if they don't exists
  - if the table exists nothing happens

Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>

* test(repodb): coverage tests
  - minor fix for CVEListForImage to fix the tests
Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>

* feat(repodb): add descriptor with media type

  - to represent images and multi-arch images

Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>

* feat(repodb): support signatures on repo level

  - added to follow the behavior of signing and signature verification tools
    that work on a manifest level for each repo
  - all images with different tags but the same manifest will be signed at once

Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>

* feat(repodb): old repodb version migration support

Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>

* feat(repodb): tests for coverage

Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>

* feat(repodb): WIP fixing tests

Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>

* feat(repodb): work on patchRepoDB tests

Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>

* fix(repodb): create dynamo tables only for linux amd

Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>

* fix(ci): fix a typo in ci-cd.yml

Signed-off-by: Andrei Aaron <aaaron@luxoft.com>

Signed-off-by: Andrei Aaron <andaaron@cisco.com>
Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>
Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
Co-authored-by: Andrei Aaron <andaaron@cisco.com>
Co-authored-by: Andrei Aaron <aaaron@luxoft.com>
2023-01-09 12:37:44 -08:00
peusebiu
f69b104838
fix(test): use correct aws region for dynamodb (#1093)
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
2023-01-09 09:04:56 -08:00
Ramkumar Chinchani
08a8b3d44c
chore(deps): fix dependabot alerts (#1090)
https://github.com/project-zot/zot/pull/1087
https://github.com/project-zot/zot/pull/1088
https://github.com/project-zot/zot/pull/1089
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-12-29 10:05:22 +02:00
peusebiu
0e7b49996a
ci: start localstack container only if needed (#1086)
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
2022-12-23 11:19:51 -08:00
Ramkumar Chinchani
1c9db99b0d
chore(deps): fix dependabot alerts (#1077)
https://github.com/project-zot/zot/pull/1071
https://github.com/project-zot/zot/pull/1075
https://github.com/project-zot/zot/pull/1076


Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-12-20 11:59:04 -08:00
Ramkumar Chinchani
2571e8e5fc
chore(deps): fix dependabot alerts (#1074)
https://github.com/project-zot/zot/pull/1069
https://github.com/project-zot/zot/pull/1070
https://github.com/project-zot/zot/pull/1071
https://github.com/project-zot/zot/pull/1072
https://github.com/project-zot/zot/pull/1073


Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-12-19 14:59:31 -08:00
Ramkumar Chinchani
37e6c6db0e
ci: remove superfluous parts of github workflows (#1050)
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-12-07 12:46:50 -08:00
Ramkumar Chinchani
69f0cf6bb4
fix(config): warn if cve is used with remote storage driver (#1034)
* fix(config): warn if cve is used with remote storage driver

Signed-off-by: Catalin Hofnar <catalin.hofnar@gmail.com>

* fix: also check if search is enabled

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>

Signed-off-by: Catalin Hofnar <catalin.hofnar@gmail.com>
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
Co-authored-by: Catalin Hofnar <catalin.hofnar@gmail.com>
2022-11-30 09:35:06 +02:00
Catalin-George Hofnar
31b9481713
feat(cache): dynamodb implementation (#953)
Signed-off-by: Catalin Hofnar <catalin.hofnar@gmail.com>
2022-11-22 10:29:57 -08:00
Ramkumar Chinchani
97e7f7f756
build: move build artifacts into build/ (#986)
Unclutter the root dir by moving all docker/stacker build artifacts into
build/ folder.

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-11-10 12:09:39 -08:00
Ramkumar Chinchani
f9b575e1cf
chore(deps): fix dependabot alerts (#965)
https://github.com/project-zot/zot/pull/959
https://github.com/project-zot/zot/pull/960
https://github.com/project-zot/zot/pull/961
https://github.com/project-zot/zot/pull/962
https://github.com/project-zot/zot/pull/963
https://github.com/project-zot/zot/pull/964

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-11-08 00:39:06 -08:00
Catalin-George Hofnar
11ec261df6
refactor: changed github issue templates to yml form (#949)
Signed-off-by: Catalin Hofnar <catalin.hofnar@gmail.com>
2022-11-01 11:28:34 -07:00
Ramkumar Chinchani
4edecbb429
chore(deps): fix dependabot alerts (#919)
https://github.com/project-zot/zot/pull/911
https://github.com/project-zot/zot/pull/912
https://github.com/project-zot/zot/pull/913
https://github.com/project-zot/zot/pull/914
https://github.com/project-zot/zot/pull/915
https://github.com/project-zot/zot/pull/916
https://github.com/project-zot/zot/pull/917

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-10-24 15:18:48 -07:00
peusebiu
92d97d48d6
fix(s3): remove tracking multipart uploads (#883)
Remove sticky sessions from clustering

Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
2022-10-20 09:36:58 -07:00
Nicol
d93c68af33
test: Build images with annotations (#872)
Signed-off-by: Nicol Draghici <idraghic@cisco.com>
2022-10-18 20:47:41 -07:00
Catalin Hofnar
794a4aabd3
fix(workflow): add fetch depth, removed running at release (#873)
Signed-off-by: Catalin Hofnar <catalin.hofnar@gmail.com>
2022-10-17 10:41:53 -07:00
Ramkumar Chinchani
14954596cb
ci: fix image build/release workflow (#874)
Fix typo in the workflow.
Pass RELEASE_TAG env var.

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-10-15 11:14:15 +03:00
Catalin Hofnar
f3b1913fbd
build: add commit hash to Config at build for proper discovery readme (#854)
* build: add commit hash to Config at build for proper discovery readme link

* fix: use tag instead of commit hash, add to release build

Signed-off-by: Catalin Hofnar <catalin.hofnar@gmail.com>
2022-10-11 09:01:59 -07:00
Ramkumar Chinchani
5494208556
chore(deps): fix dependabot alerts (#868)
https://github.com/project-zot/zot/pull/864
https://github.com/project-zot/zot/pull/865
https://github.com/project-zot/zot/pull/866

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-10-10 12:19:05 -07:00
Andrei Aaron
98854337ff
build(tags): remove redundant build tag ui_base (#857)
It was not used for UI, it had become a CLI dependency
with the same functionality as search

Signed-off-by: Andrei Aaron <andaaron@cisco.com>
2022-10-10 15:05:55 +03:00
Catalin Hofnar
9916449d88
ci(workflows): changed ci-cd workflow to generate introspection json when gql schema changed (#810)
Signed-off-by: Catalin Hofnar <catalin.hofnar@gmail.com>
2022-10-06 12:17:41 -07:00
Nicol
33a431ef43
Update go version to 1.19 (#829)
* ci: Update go version to 1.19

Signed-off-by: Nicol Draghici <idraghic@cisco.com>

* ci: Fix lint issues

Signed-off-by: Nicol Draghici <idraghic@cisco.com>

* ci: Added needprivileges to lint, made needprivileges pass lint

Signed-off-by: Catalin Hofnar <catalin.hofnar@gmail.com>
Signed-off-by: Nicol Draghici <idraghic@cisco.com>

Signed-off-by: Nicol Draghici <idraghic@cisco.com>
Signed-off-by: Catalin Hofnar <catalin.hofnar@gmail.com>
Co-authored-by: Catalin Hofnar <catalin.hofnar@gmail.com>
2022-10-05 13:21:14 +03:00
Ramkumar Chinchani
65df973f70
fix(ci/cd): update the commit msg checker settings (#846)
Update the checker to check for length limits and against all commits.

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-10-04 09:56:07 +03:00
Ramkumar Chinchani
f235f88426
chore(deps): update dependabot dependency update alerts (#845)
https://github.com/project-zot/zot/pull/819
https://github.com/project-zot/zot/pull/841
https://github.com/project-zot/zot/pull/842
https://github.com/project-zot/zot/pull/843
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-10-03 14:33:52 -07:00
Catalin Hofnar
bd9e6fc7e3
Removed swagger requirement from binary-minimal and binary (#838)
Signed-off-by: Catalin Hofnar <catalin.hofnar@gmail.com>
2022-10-03 09:53:44 -07:00
Ramkumar Chinchani
f658ef66ee
style(ci/cd): add a commit msg style checker (#796)
https://www.conventionalcommits.org/en/v1.0.0-beta.4/#summary

The commit message should be structured as follows:

<type>[optional scope]: <description>

[optional body]

[optional footer]

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-09-30 16:08:23 -07:00
Ramkumar Chinchani
18d17f5d4c
also sync golang 1.19 (#826)
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-09-27 11:31:54 -07:00
Ramkumar Chinchani
b919279eef
dco: enable DCO checks only on PRs (#812)
GitHub allows a "Squash and Merge" model which does an automatic rebase
but commit GPG signature is from GitHub. So disable DCO checks only when
merging.

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-09-22 20:13:53 +03:00
Ramkumar Chinchani
e5decaa47e fix dependabot alerts
https://github.com/project-zot/zot/pull/800
https://github.com/project-zot/zot/pull/801
https://github.com/project-zot/zot/pull/805

https://github.com/project-zot/zot/security/dependabot/26
https://github.com/project-zot/zot/security/dependabot/30

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-09-21 16:07:04 -07:00
Ramkumar Chinchani
7804ba7ce0
fix dependabot alerts (#795)
https://github.com/project-zot/zot/pull/778
https://github.com/project-zot/zot/pull/780
https://github.com/project-zot/zot/pull/781
https://github.com/project-zot/zot/pull/782
https://github.com/project-zot/zot/security/dependabot/27
https://github.com/project-zot/zot/security/dependabot/29

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-09-21 10:04:08 +03:00
Roxana Nemulescu
3bccea7aa2 oras fix:
newer version of oras: https://github.com/oras-project/oras/releases/tag/v0.14.0
	rename the --manifest-config to --config for push command

Signed-off-by: Roxana Nemulescu <roxana.nemulescu@gmail.com>
2022-08-30 21:39:16 +03:00
Andrei Aaron
5dda12b6a7 Fix syntax errors in benchmark and cluster workflows
Signed-off-by: Andrei Aaron <andaaron@cisco.com>
2022-08-30 19:20:56 +03:00
Roxana Nemulescu
8ed34608e4 GetCatalog() - Populate _catalog with mix of many small, medium and large images
Signed-off-by: Roxana Nemulescu <roxana.nemulescu@gmail.com>
2022-08-30 16:48:38 +03:00
Ramkumar Chinchani
f9f388f32e fix artifact upload action in github workflow
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-08-24 10:04:34 +03:00
Ramkumar Chinchani
5c01c4eab4
support OCI image index at manifest endpoint (#638)
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-08-20 11:18:48 +03:00
Nicol Draghici
a702a2377e Remove AllowReadOnly and ReadOnly
Signed-off-by: Nicol Draghici <idraghic@cisco.com>

Remove check and set header every time

Signed-off-by: Nicol Draghici <idraghic@cisco.com>
2022-08-10 14:27:21 -07:00
Andrei Aaron
903460c55c
Fix permissions for image sync and stale workflows
Looks like read|write is not a correct value:
https://github.com/project-zot/zot/actions/runs/2743961177
https://github.com/project-zot/zot/actions/runs/2743965531

Write should include both, so let's try to use that.

Signed-off-by: Andrei Aaron <andaaron@cisco.com>
2022-07-27 17:44:08 +00:00
Lisca Ana-Roberta
87fc941b3c image level lint: enforce manifest mandatory annotations
closes #536

Signed-off-by: Lisca Ana-Roberta <ana.kagome@yahoo.com>
2022-07-27 11:48:04 +03:00
Ramkumar Chinchani
3d72dad507 fix dependabot alerts
https://github.com/project-zot/zot/pull/674
https://github.com/project-zot/zot/pull/676
https://github.com/project-zot/zot/pull/677
https://github.com/project-zot/zot/pull/678

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-07-27 08:48:51 +03:00
Andrei Aaron
7182e426a7 Fix typos in workflow permissions
Signed-off-by: Andrei Aaron <andaaron@cisco.com>
2022-07-26 10:40:51 -07:00
Ramkumar Chinchani
4a3c0073b7 add a github workflow to report branch coverage
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-07-20 22:43:55 -07:00
Ramkumar Chinchani
317064ffc9 fix dependabot alerts
https://github.com/project-zot/zot/pull/647
https://github.com/project-zot/zot/pull/648
https://github.com/project-zot/zot/pull/649
https://github.com/project-zot/zot/pull/650
https://github.com/project-zot/zot/pull/651
https://github.com/project-zot/zot/pull/652
https://github.com/project-zot/zot/pull/653
https://github.com/project-zot/zot/pull/656

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-07-18 14:59:27 -07:00
Andrei Aaron
43160dcc43 Update to graphql 1.17.13
We encountered some problems with using the existing folder structure,
but it looks like running the tooling with the latest versions works after
we regenerated the project using 'gql init' and refactoring to separate
the login previously in resolvers.go.

- the autogenerated code is now under the gql_generated folder
- the file resolvers.go now contains only the code which is not
rewritten by the gqlgen framework
- the file schema.resolvers.go is rewritten when gqlgen runs,
and we'll only keep there the actual resolvers matching query names
Changes we observed to schema.resolvers.go when gqlgen runs include
reordering methods, and renaming function parameters to match the
names used in schema.graphql
- we now have a gqlgen.yaml config file which governs the behavior of
gqlgen (can be tweaked to restructure the folder structure of the
generated code in the future)

Looks like the new graphql server has better validation
1 Returns 422 instead of 200 for missing query string - had to update tests
2 Correctly uncovered an error in a test for a bad `%` in query string.

As as result of 2, a `masked` bug was found in the way we check if images are
signed with Notary, the signatures were reasched for with the media type
of the image manifest itself instead of the media type for notation.
Fixed this bug, and improved error messages.
This bug would have also been reproducible with main branch if the bad `%`
in the test would have fixed.

Updated the linter to ignore some issues with the code which is
always rewritten when running:
`go run github.com/99designs/gqlgen@v0.17.13 generate`

Add a workflow to test gqlgen works and has no uncommitted changes

Signed-off-by: Andrei Aaron <andaaron@cisco.com>
2022-07-18 12:55:40 -07:00
Ramkumar Chinchani
76b811b029 harden github action/workflow perms
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-07-18 01:05:09 -07:00
Ramkumar Chinchani
595e1bca59 fix dependabot alerts
https://github.com/project-zot/zot/pull/624
https://github.com/project-zot/zot/pull/625
https://github.com/project-zot/zot/pull/626
https://github.com/project-zot/zot/pull/627
https://github.com/project-zot/zot/pull/628

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-07-15 12:03:08 -07:00
Ramkumar Chinchani
19434af3c4 fix dependabot.yml
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-07-13 13:18:01 -07:00
Ramkumar Chinchani
dc97096502 restrict workflow action permissions
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-07-13 11:34:57 -07:00
Andreea-Lupu
8da34d5751 Rename push token
Signed-off-by: Andreea-Lupu <andreealupu1470@yahoo.com>
2022-07-13 09:05:06 -07:00
Petu Eusebiu
01d742718f ci/cd: fix oras cli flags after it got updated
installing notation and oras not needed anymore

Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
2022-07-12 10:02:51 -07:00
Andreea-Lupu
26f85ab195 Update automatically helm chart when publish a new release for zot
Signed-off-by: Andreea-Lupu <andreealupu1470@yahoo.com>
2022-07-11 11:27:05 -07:00
Ramkumar Chinchani
9cfed4bb46 Create scorecards.yml
Add ossf/scorecards action

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-07-10 22:32:00 -07:00
Alex Stan
ada21ed842 Manage builds with different combinations of extensions
Files were added to be built whether an extension is on or off.
New build tags were added for each extension, while minimal and extended disappeared.

added custom binary naming depending on extensions used and changed references from binary to binary-extended

added automated blackbox tests for sync, search, scrub, metrics

added contributor guidelines

Signed-off-by: Alex Stan <alexandrustan96@yahoo.ro>
2022-06-30 09:53:52 -07:00
Petu Eusebiu
a04f870a22 Periodically sync golang image from dockerhub to ghcr.io
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
2022-06-16 23:42:50 -07:00
Alex Stan
66484c8ca9 changed go version to 1.18
Signed-off-by: Alex Stan <alexandrustan96@yahoo.ro>
2022-06-09 04:38:06 -07:00
Petu Eusebiu
d0b52612a2 ci/cd: Fix arm builds, use distroless final image
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
2022-05-30 10:38:55 -07:00
Petu Eusebiu
ad08c08986 cluster: use zb source ips pool to distribute requests to cluster
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
2022-05-24 15:19:23 -07:00
Shivam Mishra
36c9631000 ext: use distribution spec route prefix for extension api
Following the spec defined here https://github.com/opencontainers/distribution-spec/tree/main/extensions

Signed-off-by: Shivam Mishra <shimish2@cisco.com>
2022-05-22 16:35:16 -07:00
Ramkumar Chinchani
287ac05ddc update linter version to 1.46.2
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-05-20 11:53:56 -07:00
Catalin Hofnar
7c477f5ba3 Changed Github workflow to cache dependencies
Signed-off-by: Catalin Hofnar <catalin.hofnar@gmail.com>
2022-05-19 09:44:52 -07:00
Petu Eusebiu
799eab63a9 clustering: Give time to minio container to come up
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
2022-05-18 10:35:26 -07:00
Ramkumar Chinchani
e1a1bdff1a codeql: move from v1 to v2
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-04-27 11:58:46 -07:00
Alex Stan
d325c8b5f4 Fix problems signaled by new linter version v1.45.2
PR (linter: upgrade linter version #405) triggered lint job which failed
with many errors generated by various linters. Configurations were added to
golangcilint.yaml and several refactorings were made in order to improve the
results of the linter.

maintidx linter disabled

Signed-off-by: Alex Stan <alexandrustan96@yahoo.ro>
2022-04-27 09:55:44 -07:00
Petu Eusebiu
ad90a4975f Migrate from docker/build-push-action to stacker-build-push-action
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
2022-04-19 10:49:21 -07:00
Roxana Nemulescu
efc55b013e Add reading tests for zb binary: read-only tests and mixed read-only tests
Add mixed write-only tests
Add mixed read-write tests

Signed-off-by: Roxana Nemulescu <roxana.nemulescu@gmail.com>
2022-04-13 13:22:36 -07:00
Catalin Hofnar
475d97b1ad Separate make commands that require sudo
Reworked privileged cert test so it runs in Go by moving make logic to Go logic

Signed-off-by: Catalin Hofnar <catalin.hofnar@gmail.com>
2022-04-05 10:12:43 -07:00
Ramkumar Chinchani
ceb8c8ae6f demos: initial commit of asciinema demos
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-04-04 13:52:55 -07:00
Alexei Dodon
ad519e2d3e Leave zot repositories in a consistent state after zot hits fd limit closes #359
Signed-off-by: Alexei Dodon <adodon@cisco.com>
2022-03-31 13:25:15 -07:00
Ramkumar Chinchani
cff3be638f ci/cd: scan released images with trivy scanner
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-03-17 19:13:49 -07:00
Ramkumar Chinchani
e767cb456c fix issue and PR templates
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-03-17 11:10:56 -07:00
Petu Eusebiu
fa27e22404 Added clustering github workflow
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
2022-03-09 10:54:17 -08:00
laurentiuNiculae
aee94218aa remove root access for skopeo in Makefile
Signed-off-by: laurentiuNiculae <themelopeus@gmail.com>
2022-03-08 10:39:22 -08:00
Ramkumar Chinchani
3ada6af0de tls: set min version to 1.2 and restrict cipher suites
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-03-02 10:03:50 -08:00
Ramkumar Chinchani
408f043f1e codecov: upgrade from v1 to v2
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-02-25 09:23:57 -08:00
Ramkumar Chinchani
25bacd5aec ci/cd: add a workflow to detect/close stale PRs and issues
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-02-24 10:55:47 -08:00
Ramkumar Chinchani
4ddfd059b6 ci/cd: count lines of code
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-02-09 17:00:52 -08:00
Ramkumar Chinchani
73027fbce5 ci/cd: fix build/test workflow
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-02-08 22:31:42 -08:00
Ramkumar Chinchani
40d6174c1e ci/cd: restore part of github workflow for PRs
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-02-08 12:03:07 -08:00
Ramkumar Chinchani
298b966eab build: parameterize arch builds
Build zot artifacts for multiple os and arch.
[linux, amd64] - common case
[linux, arm64] - raspberry pi
[darwin, amd64] - Intel-based macs
[darwin, arm64] - Arm-based macs

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-02-08 08:26:58 -08:00
Ramkumar Chinchani
c73e71b018 ci/cd: add a basic push-pull testing using client tools
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-02-07 10:03:24 -08:00
Ramkumar Chinchani
8d6b36a61b bench: fix benchmark test data
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-02-02 13:31:41 -08:00
Ramkumar Chinchani
f9d14d7f94 ci/cd: add a license checker
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-01-30 12:04:49 -08:00
Ramkumar Chinchani
e0a1a82890 coverage: add failure injection framework
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-01-28 08:56:00 -08:00
Alexei Dodon
c9a81baa10 Renamed zot-exporter to zxp and added its image to zot release
Signed-off-by: Alexei Dodon <adodon@cisco.com>
2022-01-19 10:31:37 -08:00
Ramkumar Chinchani
cec66f6bc2 ci/cd: update continuous benchmark version
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-01-18 09:54:15 +02:00
Ramkumar Chinchani
6a2529f08f ci/cd: add continuous benchmark action
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-01-14 10:10:55 -08:00
Ramkumar Chinchani
4896adad1b build: split functionality into separate binaries
zot: registry server
zli: zot cli to interact with the zot registry
zui: zot ui (proposed)
zb: zot benchmark (proposed)

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-01-11 11:48:18 -08:00
Ramkumar Chinchani
3177f87403 ci/cd: upgrade golang to 1.17
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2022-01-07 09:46:50 -08:00
Ramkumar Chinchani
ac3801ea2d lint: upgrade golangci-lint
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2021-12-20 17:20:35 -08:00
Ramkumar Chinchani
fc4a34d43a ci/cd: include tag name in release docker builds
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2021-12-16 09:09:43 -08:00
Ramkumar Chinchani
50a0831f1b ci/cd: fix github workflow to upload release binaries
Fixes issue #332

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2021-12-16 09:09:43 -08:00
Ramkumar Chinchani
914cf5c356 ci/cd: fix arch builds to pick correct file
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2021-12-08 21:16:19 -08:00
Ramkumar Chinchani
b4c8d8351a
Create PULL_REQUEST_TEMPLATE.md 2021-12-07 21:22:52 -08:00
Ramkumar Chinchani
0e03c88e51 Update issue templates 2021-12-07 21:17:44 -08:00
Ramkumar Chinchani
96226af869 move references to zotregistry.io and project-zot
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2021-12-05 10:52:27 -08:00
Ramkumar Chinchani
304a68334e ci/cd: build for arm64 arch
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2021-12-03 15:30:49 -08:00
Ramkumar Chinchani
e42e42a2cc artifacts: initial support for artifacts/notaryv2 spec
https://github.com/oras-project/artifacts-spec
https://github.com/notaryproject/notaryproject

Fixes issue #264

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2021-12-01 18:55:39 -08:00
Ramkumar Chinchani
4d50ad2bb1 release: revert changelog generator workflow
revert 061dfb3

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2021-11-15 11:30:29 -08:00
Ramkumar Chinchani
83e0bbd79b release: update changelog generator version
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
2021-11-15 11:30:29 -08:00