Skip to content

Commit

Permalink
Update agent to use latest version of gooci downloader
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-cmsoft committed Dec 2, 2024
1 parent acd63ea commit d14105b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
8 changes: 7 additions & 1 deletion cmd/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import (
"github.com/coreos/go-systemd/v22/daemon"
"github.com/fsnotify/fsnotify"
"github.com/google/go-containerregistry/pkg/name"
v1 "github.com/google/go-containerregistry/pkg/v1"
"github.com/google/go-containerregistry/pkg/v1/remote"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-plugin"
"github.com/nats-io/nats.go"
Expand All @@ -21,6 +23,7 @@ import (
"os/exec"
"os/signal"
"path"
"runtime"
"sync"
"syscall"
"time"
Expand Down Expand Up @@ -459,7 +462,10 @@ func (ar *AgentRunner) DownloadPlugins() error {
if err != nil {
return err
}
err = downloaderImpl.Download()
err = downloaderImpl.Download(remote.WithPlatform(v1.Platform{
Architecture: runtime.GOARCH,
OS: runtime.GOOS,
}))
if err != nil {
return err
}
Expand Down
5 changes: 1 addition & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/chris-cmsoft/concom
go 1.23.2

require (
github.com/compliance-framework/gooci v0.0.0-20241121151741-8c713064df64
github.com/compliance-framework/gooci v0.0.0-20241202153413-08c411c3ce33
github.com/coreos/go-systemd/v22 v22.5.0
github.com/fsnotify/fsnotify v1.7.0
github.com/google/go-containerregistry v0.20.2
Expand All @@ -14,7 +14,6 @@ require (
github.com/open-policy-agent/opa v0.69.0
github.com/spf13/cobra v1.8.1
github.com/spf13/viper v1.19.0
github.com/stretchr/testify v1.9.0
google.golang.org/grpc v1.67.0
google.golang.org/protobuf v1.34.2
gopkg.in/yaml.v2 v2.4.0
Expand All @@ -26,7 +25,6 @@ require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.14.3 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/docker/cli v27.1.1+incompatible // indirect
github.com/docker/distribution v2.8.2+incompatible // indirect
github.com/docker/docker-credential-helpers v0.7.0 // indirect
Expand Down Expand Up @@ -56,7 +54,6 @@ require (
github.com/opencontainers/image-spec v1.1.0 // indirect
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_golang v1.20.4 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.57.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/compliance-framework/gooci v0.0.0-20241121151741-8c713064df64 h1:DIQC1QqJxzJb/nx/IMb/Lj4U55ziCkyEACnaQS747Hs=
github.com/compliance-framework/gooci v0.0.0-20241121151741-8c713064df64/go.mod h1:UAxtWl/zNG1LxUYUxCbDAvJgJhY5KChnw+xZbXIquAY=
github.com/compliance-framework/gooci v0.0.0-20241202153413-08c411c3ce33 h1:y/vO/R5hiv14gp0PrKHStbmkPQkpZwUpFLL9beFfny0=
github.com/compliance-framework/gooci v0.0.0-20241202153413-08c411c3ce33/go.mod h1:UAxtWl/zNG1LxUYUxCbDAvJgJhY5KChnw+xZbXIquAY=
github.com/containerd/stargz-snapshotter/estargz v0.14.3 h1:OqlDCK3ZVUO6C3B/5FSkDwbkEETK84kQgEeFwDC+62k=
github.com/containerd/stargz-snapshotter/estargz v0.14.3/go.mod h1:KY//uOCIkSuNAHhJogcZtrNHdKrA99/FCCRjE3HD36o=
github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs=
Expand Down

0 comments on commit d14105b

Please sign in to comment.