Skip to content

Commit

Permalink
fix: cli-client paths
Browse files Browse the repository at this point in the history
  • Loading branch information
clay-lake committed Aug 20, 2024
1 parent 7275a84 commit e7e319f
Show file tree
Hide file tree
Showing 21 changed files with 30 additions and 30 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/_CLI-Client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: CLI-Client
on:
push:
paths:
- "src/cli-client/**"
- "tools/cli-client/**"
pull_request:
paths:
- "src/cli-client/**"
- "tools/cli-client/**"

jobs:
test:
Expand All @@ -18,7 +18,7 @@ jobs:
with:
go-version: 1.22
- name: Test
working-directory: src/cli-client
working-directory: tools/cli-client
run: |
go test ./...
Expand All @@ -30,7 +30,7 @@ jobs:
- uses: snapcore/action-build@v1
id: snapcraft
with:
path: src/cli-client
path: tools/cli-client
- uses: actions/upload-artifact@v3
with:
name: snap
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/_Test-OCI-Factory.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
- "oci/mock*"
- "src/**"
- "!src/workflow-engine/**"
- "!src/cli-client/**"
- "!tools/cli-client/**"

jobs:
test-workflows:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ multiple images;
#### 2. With the CLI Client

Maintainers can use the OCI Factory's CLI Client to interact with the OCI
Factory. The CLI Client is a Go module at [src/cli-client](src/cli-client).
Factory. The CLI Client is a Go module at [tools/cli-client](tools/cli-client).

Here's what you should do and know before you use the CLI Client:

Expand All @@ -106,7 +106,7 @@ i.e. you can ask the OCI Factory to build one version of the image, upload and
release it to GHCR, Docker Hub, and ECR with different tracks, risks and EOL with
a single command, but **not** multiple versions of the same image.

Further documentation regarding the CLI Client can be found [here](src/cli-client/README.md).
Further documentation regarding the CLI Client can be found [here](tools/cli-client/README.md).

Refer to the diagram below to understand the oci-factory workflow:
![OCI Factory Workflow](assets/img/oci-factory-workflow.png)
Expand Down
2 changes: 1 addition & 1 deletion tools/cli-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ sudo snap install go --classic

#### Install the CLI client
```bash
go install github.com/canonical/oci-factory/src/cli-client/cmd/oci-factory
go install github.com/canonical/oci-factory/tools/cli-client/cmd/oci-factory
```

# Triggering workflows
Expand Down
4 changes: 2 additions & 2 deletions tools/cli-client/cmd/oci-factory/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"os"

"github.com/canonical/oci-factory/src/cli-client/internals/cli"
"github.com/canonical/oci-factory/src/cli-client/internals/logger"
"github.com/canonical/oci-factory/tools/cli-client/internals/cli"
"github.com/canonical/oci-factory/tools/cli-client/internals/logger"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion tools/cli-client/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/canonical/oci-factory/src/cli-client
module github.com/canonical/oci-factory/tools/cli-client

go 1.22

Expand Down
4 changes: 2 additions & 2 deletions tools/cli-client/internals/cli/cli_upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"slices"
"strings"

"github.com/canonical/oci-factory/src/cli-client/internals/client"
"github.com/canonical/oci-factory/src/cli-client/internals/trigger"
"github.com/canonical/oci-factory/tools/cli-client/internals/client"
"github.com/canonical/oci-factory/tools/cli-client/internals/trigger"
)

type UploadRelease struct {
Expand Down
2 changes: 1 addition & 1 deletion tools/cli-client/internals/cli/cli_upload_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cli_test
import (
. "gopkg.in/check.v1"

"github.com/canonical/oci-factory/src/cli-client/internals/cli"
"github.com/canonical/oci-factory/tools/cli-client/internals/cli"
)

// `func Test(t *testing.T) { TestingT(t) }` defined in validator_test.go
Expand Down
2 changes: 1 addition & 1 deletion tools/cli-client/internals/cli/validator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

. "gopkg.in/check.v1"

"github.com/canonical/oci-factory/src/cli-client/internals/cli"
"github.com/canonical/oci-factory/tools/cli-client/internals/cli"
)

func Test(t *testing.T) { TestingT(t) }
Expand Down
2 changes: 1 addition & 1 deletion tools/cli-client/internals/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"os"
"time"

"github.com/canonical/oci-factory/src/cli-client/internals/logger"
"github.com/canonical/oci-factory/tools/cli-client/internals/logger"
)

const NumRetries = 2
Expand Down
4 changes: 2 additions & 2 deletions tools/cli-client/internals/client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (

. "gopkg.in/check.v1"

"github.com/canonical/oci-factory/src/cli-client/internals/client"
"github.com/canonical/oci-factory/src/cli-client/internals/token"
"github.com/canonical/oci-factory/tools/cli-client/internals/client"
"github.com/canonical/oci-factory/tools/cli-client/internals/token"
)

type ClientSuite struct{}
Expand Down
4 changes: 2 additions & 2 deletions tools/cli-client/internals/client/wf_dispatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"net/http"
"time"

"github.com/canonical/oci-factory/src/cli-client/internals/logger"
"github.com/canonical/oci-factory/src/cli-client/internals/token"
"github.com/canonical/oci-factory/tools/cli-client/internals/logger"
"github.com/canonical/oci-factory/tools/cli-client/internals/token"
)

var workflowDispatchURL = "https://api.github.com/repos/canonical/oci-factory/actions/workflows/Image.yaml/dispatches"
Expand Down
4 changes: 2 additions & 2 deletions tools/cli-client/internals/client/wf_dispatcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (

. "gopkg.in/check.v1"

"github.com/canonical/oci-factory/src/cli-client/internals/client"
"github.com/canonical/oci-factory/src/cli-client/internals/token"
"github.com/canonical/oci-factory/tools/cli-client/internals/client"
"github.com/canonical/oci-factory/tools/cli-client/internals/token"
)

type DispatcherSuite struct{}
Expand Down
2 changes: 1 addition & 1 deletion tools/cli-client/internals/client/wf_poller.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"time"

"github.com/briandowns/spinner"
"github.com/canonical/oci-factory/src/cli-client/internals/logger"
"github.com/canonical/oci-factory/tools/cli-client/internals/logger"
)

const workflowRunsURL = "https://api.github.com/repos/canonical/oci-factory/actions/workflows/Image.yaml/runs"
Expand Down
2 changes: 1 addition & 1 deletion tools/cli-client/internals/client/wf_poller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package client_test
import (
. "gopkg.in/check.v1"

"github.com/canonical/oci-factory/src/cli-client/internals/client"
"github.com/canonical/oci-factory/tools/cli-client/internals/client"
)

type PollerSuite struct{}
Expand Down
2 changes: 1 addition & 1 deletion tools/cli-client/internals/token/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"os"

"github.com/canonical/oci-factory/src/cli-client/internals/logger"
"github.com/canonical/oci-factory/tools/cli-client/internals/logger"
"golang.org/x/term"
)

Expand Down
2 changes: 1 addition & 1 deletion tools/cli-client/internals/token/token_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"os"
"testing"

"github.com/canonical/oci-factory/src/cli-client/internals/token"
"github.com/canonical/oci-factory/tools/cli-client/internals/token"
)

func TestReadAccessTokenEnv(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion tools/cli-client/internals/trigger/build_metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"regexp"
"strings"

"github.com/canonical/oci-factory/src/cli-client/internals/logger"
"github.com/canonical/oci-factory/tools/cli-client/internals/logger"
git "github.com/go-git/go-git/v5"
"gopkg.in/yaml.v3"
)
Expand Down
2 changes: 1 addition & 1 deletion tools/cli-client/internals/trigger/build_metadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

. "gopkg.in/check.v1"

"github.com/canonical/oci-factory/src/cli-client/internals/trigger"
"github.com/canonical/oci-factory/tools/cli-client/internals/trigger"
)

type BuildMetadataSuite struct {
Expand Down
2 changes: 1 addition & 1 deletion tools/cli-client/internals/trigger/trigger.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package trigger

import (
"github.com/canonical/oci-factory/src/cli-client/internals/logger"
"github.com/canonical/oci-factory/tools/cli-client/internals/logger"
"gopkg.in/yaml.v3"
)

Expand Down
2 changes: 1 addition & 1 deletion tools/cli-client/internals/trigger/trigger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

. "gopkg.in/check.v1"

"github.com/canonical/oci-factory/src/cli-client/internals/trigger"
"github.com/canonical/oci-factory/tools/cli-client/internals/trigger"
"gopkg.in/yaml.v3"
)

Expand Down

0 comments on commit e7e319f

Please sign in to comment.