Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update references of pkg/tag pkg/log pkg/options to use modules from registry-scanner #962

2 changes: 1 addition & 1 deletion cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import (
"github.com/argoproj-labs/argocd-image-updater/pkg/common"
"github.com/argoproj-labs/argocd-image-updater/pkg/env"
"github.com/argoproj-labs/argocd-image-updater/pkg/health"
"github.com/argoproj-labs/argocd-image-updater/pkg/log"
"github.com/argoproj-labs/argocd-image-updater/pkg/metrics"
"github.com/argoproj-labs/argocd-image-updater/pkg/registry"
"github.com/argoproj-labs/argocd-image-updater/pkg/version"
"github.com/argoproj-labs/argocd-image-updater/registry-scanner/pkg/log"

"github.com/argoproj/argo-cd/v2/reposerver/askpass"

Expand Down
2 changes: 1 addition & 1 deletion cmd/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/argoproj-labs/argocd-image-updater/pkg/argocd"
"github.com/argoproj-labs/argocd-image-updater/pkg/common"
"github.com/argoproj-labs/argocd-image-updater/pkg/image"
"github.com/argoproj-labs/argocd-image-updater/pkg/tag"
"github.com/argoproj-labs/argocd-image-updater/registry-scanner/pkg/tag"

"github.com/spf13/cobra"
)
Expand Down
4 changes: 2 additions & 2 deletions cmd/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (

"github.com/argoproj-labs/argocd-image-updater/pkg/image"
"github.com/argoproj-labs/argocd-image-updater/pkg/kube"
"github.com/argoproj-labs/argocd-image-updater/pkg/log"
"github.com/argoproj-labs/argocd-image-updater/pkg/options"
"github.com/argoproj-labs/argocd-image-updater/pkg/registry"
"github.com/argoproj-labs/argocd-image-updater/registry-scanner/pkg/log"
"github.com/argoproj-labs/argocd-image-updater/registry-scanner/pkg/options"

"github.com/spf13/cobra"
"github.com/spf13/pflag"
Expand Down
2 changes: 1 addition & 1 deletion cmd/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"time"

"github.com/argoproj-labs/argocd-image-updater/pkg/kube"
"github.com/argoproj-labs/argocd-image-updater/pkg/log"
"github.com/argoproj-labs/argocd-image-updater/registry-scanner/pkg/log"
)

func getPrintableInterval(interval time.Duration) string {
Expand Down
2 changes: 1 addition & 1 deletion ext/git/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strconv"
"strings"

"github.com/argoproj-labs/argocd-image-updater/pkg/log"
"github.com/argoproj-labs/argocd-image-updater/registry-scanner/pkg/log"
)

// CommitOptions holds options for a git commit operation
Expand Down
11 changes: 5 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ toolchain go1.23.0

require (
github.com/Masterminds/semver/v3 v3.3.1
github.com/argoproj-labs/argocd-image-updater/registry-scanner v0.0.0-20241213191436-f55eeef5df63
github.com/argoproj/argo-cd/v2 v2.13.1
github.com/argoproj/gitops-engine v0.7.1-0.20240905010810-bd7681ae3f8b
github.com/argoproj/pkg v0.13.7-0.20230627120311-a4dd357b057e
Expand Down Expand Up @@ -36,11 +37,6 @@ require (
sigs.k8s.io/kustomize/kyaml v0.17.1
)

require (
google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect
)

require (
cloud.google.com/go/compute/metadata v0.5.0 // indirect
dario.cat/mergo v1.0.1 // indirect
Expand Down Expand Up @@ -152,6 +148,8 @@ require (
golang.org/x/time v0.6.0 // indirect
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
Expand All @@ -175,7 +173,8 @@ require (
)

replace (
github.com/argoproj-labs/argocd-image-updater/registry-scanner => ../registry-scanner
// Uncomment for local testing
// github.com/argoproj-labs/argocd-image-updater/registry-scanner => ./registry-scanner/
Comment on lines +176 to +177
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a comment for stating that we need to uncomment this line for local testing if we have changes in registry-scanner module.

github.com/docker/distribution => github.com/docker/distribution v2.8.1+incompatible
github.com/golang/protobuf => github.com/golang/protobuf v1.5.4

Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ github.com/alicebob/miniredis/v2 v2.33.0/go.mod h1:MhP4a3EU7aENRi9aO+tHfTBZicLqQ
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8=
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/argoproj-labs/argocd-image-updater/registry-scanner v0.0.0-20241213191436-f55eeef5df63 h1:XG/3UqAQmNqTCyinX8dGF/exFIkV5RqyXJgcVPHVGRg=
github.com/argoproj-labs/argocd-image-updater/registry-scanner v0.0.0-20241213191436-f55eeef5df63/go.mod h1:GJD+hNHt9KbYFo1+OddD3vvqys7ct5ZIOx5yHFCBAXg=
github.com/argoproj/argo-cd/v2 v2.13.1 h1:qoa8LD5suPCAYtoDNHp+BuqODf46hl5gCuXNj2oiAy0=
github.com/argoproj/argo-cd/v2 v2.13.1/go.mod h1:RC23V2744nhZstZVpLCWTQLT2gR0+IXGC3GTBCI6M+I=
github.com/argoproj/gitops-engine v0.7.1-0.20240905010810-bd7681ae3f8b h1:wOPWJ5MBScQO767WpU55oUJDXObfvPL0EfAYWxogbSw=
Expand Down
2 changes: 1 addition & 1 deletion pkg/argocd/argocd.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"github.com/argoproj-labs/argocd-image-updater/pkg/env"
"github.com/argoproj-labs/argocd-image-updater/pkg/image"
"github.com/argoproj-labs/argocd-image-updater/pkg/kube"
"github.com/argoproj-labs/argocd-image-updater/pkg/log"
"github.com/argoproj-labs/argocd-image-updater/pkg/metrics"
"github.com/argoproj-labs/argocd-image-updater/registry-scanner/pkg/log"

argocdclient "github.com/argoproj/argo-cd/v2/pkg/apiclient"
"github.com/argoproj/argo-cd/v2/pkg/apiclient/application"
Expand Down
2 changes: 1 addition & 1 deletion pkg/argocd/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"github.com/argoproj-labs/argocd-image-updater/pkg/image"

"github.com/argoproj-labs/argocd-image-updater/ext/git"
"github.com/argoproj-labs/argocd-image-updater/pkg/log"
"github.com/argoproj-labs/argocd-image-updater/registry-scanner/pkg/log"

"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/argocd/git_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/argoproj-labs/argocd-image-updater/pkg/common"
"github.com/argoproj-labs/argocd-image-updater/pkg/image"
"github.com/argoproj-labs/argocd-image-updater/pkg/tag"
"github.com/argoproj-labs/argocd-image-updater/registry-scanner/pkg/tag"

"sigs.k8s.io/kustomize/api/types"
kyaml "sigs.k8s.io/kustomize/kyaml/yaml"
Expand Down
2 changes: 1 addition & 1 deletion pkg/argocd/gitcreds.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

"github.com/argoproj-labs/argocd-image-updater/ext/git"
"github.com/argoproj-labs/argocd-image-updater/pkg/kube"
"github.com/argoproj-labs/argocd-image-updater/pkg/log"
"github.com/argoproj-labs/argocd-image-updater/registry-scanner/pkg/log"
)

// getGitCredsSource returns git credentials source that loads credentials from the secret or from Argo CD settings
Expand Down
4 changes: 2 additions & 2 deletions pkg/argocd/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import (
"github.com/argoproj-labs/argocd-image-updater/pkg/common"
"github.com/argoproj-labs/argocd-image-updater/pkg/image"
"github.com/argoproj-labs/argocd-image-updater/pkg/kube"
"github.com/argoproj-labs/argocd-image-updater/pkg/log"
"github.com/argoproj-labs/argocd-image-updater/pkg/registry"
"github.com/argoproj-labs/argocd-image-updater/pkg/tag"
"github.com/argoproj-labs/argocd-image-updater/registry-scanner/pkg/log"
"github.com/argoproj-labs/argocd-image-updater/registry-scanner/pkg/tag"

"github.com/argoproj/argo-cd/v2/pkg/apiclient/application"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
Expand Down
2 changes: 1 addition & 1 deletion pkg/argocd/update_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"github.com/argoproj-labs/argocd-image-updater/pkg/kube"
"github.com/argoproj-labs/argocd-image-updater/pkg/registry"
regmock "github.com/argoproj-labs/argocd-image-updater/pkg/registry/mocks"
"github.com/argoproj-labs/argocd-image-updater/pkg/tag"
"github.com/argoproj-labs/argocd-image-updater/registry-scanner/pkg/tag"
"github.com/argoproj-labs/argocd-image-updater/test/fake"
"github.com/argoproj-labs/argocd-image-updater/test/fixture"

Expand Down
2 changes: 1 addition & 1 deletion pkg/cache/cache.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cache

import (
"github.com/argoproj-labs/argocd-image-updater/pkg/tag"
"github.com/argoproj-labs/argocd-image-updater/registry-scanner/pkg/tag"
)

type ImageTagCache interface {
Expand Down
2 changes: 1 addition & 1 deletion pkg/cache/memcache.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cache
import (
"fmt"

"github.com/argoproj-labs/argocd-image-updater/pkg/tag"
"github.com/argoproj-labs/argocd-image-updater/registry-scanner/pkg/tag"

memcache "github.com/patrickmn/go-cache"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/cache/memcache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/argoproj-labs/argocd-image-updater/pkg/tag"
"github.com/argoproj-labs/argocd-image-updater/registry-scanner/pkg/tag"
)

func Test_MemCache(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/env/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strconv"
"strings"

"github.com/argoproj-labs/argocd-image-updater/pkg/log"
"github.com/argoproj-labs/argocd-image-updater/registry-scanner/pkg/log"
)

// Package env provides some utility functions to interact with the environment
Expand Down
2 changes: 1 addition & 1 deletion pkg/health/health.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"net/http"

"github.com/argoproj-labs/argocd-image-updater/pkg/log"
"github.com/argoproj-labs/argocd-image-updater/registry-scanner/pkg/log"
)

func StartHealthServer(port int) chan error {
Expand Down
2 changes: 1 addition & 1 deletion pkg/image/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
argoexec "github.com/argoproj/pkg/exec"

"github.com/argoproj-labs/argocd-image-updater/pkg/kube"
"github.com/argoproj-labs/argocd-image-updater/pkg/log"
"github.com/argoproj-labs/argocd-image-updater/registry-scanner/pkg/log"
)

type CredentialSourceType int
Expand Down
4 changes: 2 additions & 2 deletions pkg/image/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (

"github.com/distribution/distribution/v3/reference"

"github.com/argoproj-labs/argocd-image-updater/pkg/log"
"github.com/argoproj-labs/argocd-image-updater/pkg/tag"
"github.com/argoproj-labs/argocd-image-updater/registry-scanner/pkg/log"
"github.com/argoproj-labs/argocd-image-updater/registry-scanner/pkg/tag"
)

type ContainerImage struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/image/image_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/stretchr/testify/require"
"golang.org/x/exp/slices"

"github.com/argoproj-labs/argocd-image-updater/pkg/tag"
"github.com/argoproj-labs/argocd-image-updater/registry-scanner/pkg/tag"
)

func Test_ParseImageTags(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/image/matchfunc.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package image
import (
"regexp"

"github.com/argoproj-labs/argocd-image-updater/pkg/log"
"github.com/argoproj-labs/argocd-image-updater/registry-scanner/pkg/log"
)

// MatchFuncAny matches any pattern, i.e. always returns true
Expand Down
2 changes: 1 addition & 1 deletion pkg/image/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strings"

"github.com/argoproj-labs/argocd-image-updater/pkg/common"
"github.com/argoproj-labs/argocd-image-updater/pkg/options"
"github.com/argoproj-labs/argocd-image-updater/registry-scanner/pkg/options"
)

// GetParameterHelmImageName gets the value for image-name option for the image
Expand Down
2 changes: 1 addition & 1 deletion pkg/image/options_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/stretchr/testify/require"

"github.com/argoproj-labs/argocd-image-updater/pkg/common"
"github.com/argoproj-labs/argocd-image-updater/pkg/options"
"github.com/argoproj-labs/argocd-image-updater/registry-scanner/pkg/options"
)

func Test_GetHelmOptions(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions pkg/image/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package image
import (
"path/filepath"

"github.com/argoproj-labs/argocd-image-updater/pkg/log"
"github.com/argoproj-labs/argocd-image-updater/pkg/options"
"github.com/argoproj-labs/argocd-image-updater/pkg/tag"
"github.com/argoproj-labs/argocd-image-updater/registry-scanner/pkg/log"
"github.com/argoproj-labs/argocd-image-updater/registry-scanner/pkg/options"
"github.com/argoproj-labs/argocd-image-updater/registry-scanner/pkg/tag"

"github.com/Masterminds/semver/v3"
)
Expand Down
4 changes: 2 additions & 2 deletions pkg/image/version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/argoproj-labs/argocd-image-updater/pkg/options"
"github.com/argoproj-labs/argocd-image-updater/pkg/tag"
"github.com/argoproj-labs/argocd-image-updater/registry-scanner/pkg/options"
"github.com/argoproj-labs/argocd-image-updater/registry-scanner/pkg/tag"
)

func newImageTagList(tagNames []string) *tag.ImageTagList {
Expand Down
Loading
Loading