Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* Renamed files to ratify

Signed-off-by: Sajay Antony <[email protected]>

* Renamed package to ratify

Signed-off-by: Sajay Antony <[email protected]>
  • Loading branch information
sajayantony authored Nov 9, 2021
1 parent 4c9ff75 commit 467ea25
Show file tree
Hide file tree
Showing 64 changed files with 330 additions and 330 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ jobs:
- name: Build CLI
run: make
- name: Check build
run: bin/hora --help
run: bin/ratify --help
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release Hora
name: Release Ratify

on:
push:
Expand Down
6 changes: 3 additions & 3 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ before:
hooks:
- go mod tidy
builds:
- id: hora
dir: cmd/hora
binary: hora
- id: ratify
dir: cmd/ratify
binary: ratify
env:
- CGO_ENABLED=0
goos:
Expand Down
40 changes: 20 additions & 20 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
# Contributing to Hora
# Contributing to Ratify

Welcome! We are very happy to accept community contributions to Hora, whether those are [Pull Requests](#pull-requests), [Plugins](#plugins), [Feature Suggestions](#feature-suggestions) or [Bug Reports](#bug-reports)! Please note that by participating in this project, you agree to abide by the [Code of Conduct](./CODE_OF_CONDUCT.md), as well as the terms of the [CLA](#cla).
Welcome! We are very happy to accept community contributions to Ratify, whether those are [Pull Requests](#pull-requests), [Plugins](#plugins), [Feature Suggestions](#feature-suggestions) or [Bug Reports](#bug-reports)! Please note that by participating in this project, you agree to abide by the [Code of Conduct](./CODE_OF_CONDUCT.md), as well as the terms of the [CLA](#cla).

## Getting Started

* If you don't already have it, you will need [go](https://golang.org/dl/) v1.16+ installed locally to build the project.
* You can work on Hora using any platform using any editor, but you may find it quickest to get started using [VSCode](https://code.visualstudio.com/Download) with the [Go extension](https://marketplace.visualstudio.com/items?itemName=golang.Go).
* You can work on Ratify using any platform using any editor, but you may find it quickest to get started using [VSCode](https://code.visualstudio.com/Download) with the [Go extension](https://marketplace.visualstudio.com/items?itemName=golang.Go).
* Fork this repo (see [this forking guide](https://guides.github.com/activities/forking/) for more information).
* Checkout the repo locally with `git clone [email protected]:{your_username}/hora.git`.
* Build the Hora CLI with `go build -o ./bin/hora ./cmd/hora` or if on Mac/Linux/WSL `make build-cli`.
* Checkout the repo locally with `git clone [email protected]:{your_username}/ratify.git`.
* Build the Ratify CLI with `go build -o ./bin/ratify ./cmd/ratify` or if on Mac/Linux/WSL `make build-cli`.

## Developing

### Components

The Hora project is composed of the following main components:
The Ratify project is composed of the following main components:

* **Hora CLI** (`cmd/hora`): the `hora` CLI executable.
* **Config** (`config`): an example configuration file for `hora`.
* **Deploy** (`deploy`): the deployment files for using hora in a Kubernetes cluster.
* **Hora Internals** (`pkg`): the internal modules containing the majority of the Hora code.
* **Plugins** (`plugins`): the referrer store and verifier plugins for the Hora Framework.
* **Ratify CLI** (`cmd/ratify`): the `ratify` CLI executable.
* **Config** (`config`): an example configuration file for `ratify`.
* **Deploy** (`deploy`): the deployment files for using ratify in a Kubernetes cluster.
* **Ratify Internals** (`pkg`): the internal modules containing the majority of the Ratify code.
* **Plugins** (`plugins`): the referrer store and verifier plugins for the Ratify Framework.

### Running the tests

* You can use the following command to run the full Hora test suite:
* `go test -v ./cmd/hora` on Windows
* You can use the following command to run the full Ratify test suite:
* `go test -v ./cmd/ratify` on Windows
* `make test` on Mac/Linux/WSL

### Running the Hora CLI
### Running the Ratify CLI

* Once built run Hora from the bin directory `./bin/hora` for a list of the available commands.
* Once built run Ratify from the bin directory `./bin/ratify` for a list of the available commands.
* For any command the `--help` argument can be passed for more information and a list of possible arguments.

## Pull Requests

If you'd like to start contributing to Hora, you can search for issues tagged as "good first issue" [here](https://github.com/deislabs/hora/labels/good%20first%20issue).
If you'd like to start contributing to Ratify, you can search for issues tagged as "good first issue" [here](https://github.com/deislabs/ratify/labels/good%20first%20issue).

### Hora Code
### Ratify Code

* Ensure that an issue has been created to track the feature enhancement or bug that is being fixed.
* In the PR description, make sure you've included "Fixes #{issue_number}" e.g. "Fixes #242" so that GitHub knows to link it to an issue.
Expand All @@ -62,14 +62,14 @@ If you'd like to contribute to the collection of plugins:

## Feature Suggestions

* Please first search [Open Hora Issues](https://github.com/deislabs/hora/issues) before opening an issue to check whether your feature has already been suggested. If it has, feel free to add your own comments to the existing issue.
* Please first search [Open Ratify Issues](https://github.com/deislabs/ratify/issues) before opening an issue to check whether your feature has already been suggested. If it has, feel free to add your own comments to the existing issue.
* Ensure you have included a "What?" - what your feature entails, being as specific as possible, and giving mocked-up syntax examples where possible.
* Ensure you have included a "Why?" - what the benefit of including this feature will be.

## Bug Reports

* Please first search [Open Hora Issues](https://github.com/deislabs/hora/issues) before opening an issue, to see if it has already been reported.
* Try to be as specific as possible, including the version of the Hora CLI used to reproduce the issue, and any example arguments needed to reproduce it.
* Please first search [Open Ratify Issues](https://github.com/deislabs/ratify/issues) before opening an issue, to see if it has already been reported.
* Try to be as specific as possible, including the version of the Ratify CLI used to reproduce the issue, and any example arguments needed to reproduce it.

## CLA

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2021 Hora Authors.
Copyright 2021 Ratify Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
BINARY_NAME=hora
INSTALL_DIR=~/.hora
BINARY_NAME=ratify
INSTALL_DIR=~/.ratify
all: build test

build: build-cli build-plugins

build-cli:
go build -o ./bin/${BINARY_NAME} ./cmd/hora
go build -o ./bin/${BINARY_NAME} ./cmd/ratify


build-plugins:
Expand All @@ -16,7 +16,7 @@ install:
cp -r ./bin/* ${INSTALL_DIR}

test:
go test -v ./cmd/hora
go test -v ./cmd/ratify

clean:
go clean
Expand Down
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Hora
# Ratify

The project provides a framework to integrate scenarios that require
verification of references and aim to provide a set of interfaces that can
Expand Down Expand Up @@ -32,32 +32,32 @@ questions or comments.

## Setup & Usage

- Build the ```hora``` binary
- Build the ```ratify``` binary

```bash
git clone https://github.com/deislabs/hora.git
git clone https://github.com/deislabs/ratify.git
git checkout dev
go build -o ~/bin ./cmd/hora
go build -o ~/bin ./cmd/ratify
```

- Build the ```hora``` plugins and install them in the home directory
- Build the ```ratify``` plugins and install them in the home directory

```bash
go build -o ~/.hora/plugins ./plugins/verifier/sbom
go build -o ~/.ratify/plugins ./plugins/verifier/sbom
```

- Update the ```./config/config.json``` to the certs folder and copy it to home dir

```bash
cp ./config/config.json ~/.hora
cp ./config/config.json ~/.ratify
```

- ```hora``` is ready to use
- ```ratify``` is ready to use

```bash
Usage:
hora [flags]
hora [command]
ratify [flags]
ratify [command]

Available Commands:
completion generate the autocompletion script for the specified shell
Expand All @@ -66,9 +66,9 @@ Available Commands:
verify Verify a subject

Flags:
-h, --help help for hora
-h, --help help for ratify

Use "hora [command] --help" for more information about a command.
Use "ratify [command] --help" for more information about a command.
```

## Try it Out
Expand Down Expand Up @@ -121,11 +121,11 @@ oras push localhost:5000/net-monitor \
./sbom.json:application/json
```

- Verify both artifacts above exist using hora (WHEN THIS WORKS, CURRENTLY WIP):
- Verify both artifacts above exist using ratify (WHEN THIS WORKS, CURRENTLY WIP):

```shell
hora referrer list \
-c ./hora/config/config.json \
ratify referrer list \
-c ./ratify/config/config.json \
-s $(docker image inspect localhost:5000/net-monitor:v1 | jq -r '.[0].RepoDigests[0]')

example output
Expand All @@ -142,12 +142,12 @@ sha256:bdad7c3a3209b464c0fdfcaac4a254f87448bc6877c8fd2a651891efb596b05a
oras discover --plain-http localhost:5000/net-monitor:v1
```

- ```hora``` can be used to verify all the references to the target image.
- ```ratify``` can be used to verify all the references to the target image.
Please make sure that the image is referenced with ```digest``` rather
than with the tag.

```json
hora verify -s $(docker image inspect localhost:5000/net-monitor:v1 | jq -r '.[0].RepoDigests[0]')
ratify verify -s $(docker image inspect localhost:5000/net-monitor:v1 | jq -r '.[0].RepoDigests[0]')

{
"isSuccess": true,
Expand Down
8 changes: 4 additions & 4 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Hora Release Process
# Ratify Release Process

This document describes the versioning scheme and release processes for Hora.
This document describes the versioning scheme and release processes for Ratify.

## Attribution

Expand All @@ -13,7 +13,7 @@ The specification release process was created using content and verbiage from th

## Versioning

The Hora project follows [semantic versioning](https://semver.org/) beginning with version `v0.1.0`. Pre-release versions may be specified with a dash after the patch version and the following specifiers (in the order of release readiness):
The Ratify project follows [semantic versioning](https://semver.org/) beginning with version `v0.1.0`. Pre-release versions may be specified with a dash after the patch version and the following specifiers (in the order of release readiness):
* `alpha1`, `alpha2`, etc.
* `beta1`, `beta2`, etc.
* `rc1`, `rc2`, `rc3`, etc.
Expand Down Expand Up @@ -43,4 +43,4 @@ When the release branch is ready, a tag should be pushed with a name matching th
* The release notes and other fields can edited after the action completes. The description can be in Markdown.
* The pre-release flag will be set for any release with a pre-release specifier.
* The pre-built binaries are built from commit at the head of the release branch.
* The files are named `hora_<major>-<minor>-<patch>_<OS>_<ARCH>` with `.zip` files for Windows and `.tar.gz` for all others.
* The files are named `ratify_<major>-<minor>-<patch>_<OS>_<ARCH>` with `.zip` files for Windows and `.tar.gz` for all others.
15 changes: 0 additions & 15 deletions cmd/hora/main.go

This file was deleted.

8 changes: 4 additions & 4 deletions cmd/hora/cmd/discover.go → cmd/ratify/cmd/discover.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"os"
"strings"

"github.com/deislabs/hora/config"
"github.com/deislabs/hora/pkg/ocispecs"
sf "github.com/deislabs/hora/pkg/referrerstore/factory"
"github.com/deislabs/hora/pkg/utils"
"github.com/deislabs/ratify/config"
"github.com/deislabs/ratify/pkg/ocispecs"
sf "github.com/deislabs/ratify/pkg/referrerstore/factory"
"github.com/deislabs/ratify/pkg/utils"
"github.com/spf13/cobra"
"github.com/xlab/treeprint"
)
Expand Down
12 changes: 6 additions & 6 deletions cmd/hora/cmd/referrer.go → cmd/ratify/cmd/referrer.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import (
"os"
"strings"

"github.com/deislabs/hora/config"
"github.com/deislabs/hora/pkg/common"
"github.com/deislabs/hora/pkg/ocispecs"
"github.com/deislabs/hora/pkg/referrerstore"
sf "github.com/deislabs/hora/pkg/referrerstore/factory"
"github.com/deislabs/hora/pkg/utils"
"github.com/deislabs/ratify/config"
"github.com/deislabs/ratify/pkg/common"
"github.com/deislabs/ratify/pkg/ocispecs"
"github.com/deislabs/ratify/pkg/referrerstore"
sf "github.com/deislabs/ratify/pkg/referrerstore/factory"
"github.com/deislabs/ratify/pkg/utils"
v1 "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/spf13/cobra"
"github.com/xlab/treeprint"
Expand Down
4 changes: 2 additions & 2 deletions cmd/hora/cmd/root.go → cmd/ratify/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package cmd
import "github.com/spf13/cobra"

const (
use = "hora"
shortDesc = "Hora is a reference artifact tool for managing and verifying reference artifacts"
use = "ratify"
shortDesc = "Ratify is a reference artifact tool for managing and verifying reference artifacts"
)

var Root = New(use, shortDesc)
Expand Down
16 changes: 8 additions & 8 deletions cmd/hora/cmd/serve.go → cmd/ratify/cmd/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ package cmd
import (
"context"

"github.com/deislabs/hora/config"
"github.com/deislabs/hora/httpserver"
ef "github.com/deislabs/hora/pkg/executor/core"
pf "github.com/deislabs/hora/pkg/policyprovider/configpolicy"
sf "github.com/deislabs/hora/pkg/referrerstore/factory"
vf "github.com/deislabs/hora/pkg/verifier/factory"
"github.com/deislabs/ratify/config"
"github.com/deislabs/ratify/httpserver"
ef "github.com/deislabs/ratify/pkg/executor/core"
pf "github.com/deislabs/ratify/pkg/policyprovider/configpolicy"
sf "github.com/deislabs/ratify/pkg/referrerstore/factory"
vf "github.com/deislabs/ratify/pkg/verifier/factory"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
Expand All @@ -28,8 +28,8 @@ func NewCmdServe(argv ...string) *cobra.Command {

cmd := &cobra.Command{
Use: serveUse,
Short: "Run hora as a server",
Example: "hora server",
Short: "Run ratify as a server",
Example: "ratify server",
Args: cobra.NoArgs,
RunE: func(cmd *cobra.Command, args []string) error {
return serve(opts)
Expand Down
File renamed without changes.
12 changes: 6 additions & 6 deletions cmd/hora/cmd/verify.go → cmd/ratify/cmd/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import (
"context"
"errors"

"github.com/deislabs/hora/config"
e "github.com/deislabs/hora/pkg/executor"
ef "github.com/deislabs/hora/pkg/executor/core"
pf "github.com/deislabs/hora/pkg/policyprovider/configpolicy"
sf "github.com/deislabs/hora/pkg/referrerstore/factory"
vf "github.com/deislabs/hora/pkg/verifier/factory"
"github.com/deislabs/ratify/config"
e "github.com/deislabs/ratify/pkg/executor"
ef "github.com/deislabs/ratify/pkg/executor/core"
pf "github.com/deislabs/ratify/pkg/policyprovider/configpolicy"
sf "github.com/deislabs/ratify/pkg/referrerstore/factory"
vf "github.com/deislabs/ratify/pkg/verifier/factory"
"github.com/spf13/cobra"
)

Expand Down
15 changes: 15 additions & 0 deletions cmd/ratify/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package main

import (
"os"

"github.com/deislabs/ratify/cmd/ratify/cmd"
_ "github.com/deislabs/ratify/pkg/referrerstore/oras"
_ "github.com/deislabs/ratify/pkg/verifier/notaryv2"
)

func main() {
if err := cmd.Root.Execute(); err != nil {
os.Exit(1)
}
}
Loading

0 comments on commit 467ea25

Please sign in to comment.