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

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,15 @@ image: clean-image
docker build \
-t ${IMAGE_PREFIX}${IMAGE_NAME}:${IMAGE_TAG} \
--pull \
-f Dockerfile \
.

.PHONY: multiarch-image
multiarch-image:
docker buildx build \
-t ${IMAGE_PREFIX}${IMAGE_NAME}:${IMAGE_TAG} \
--progress plain \
-f Dockerfile \
--pull \
--platform ${RELEASE_IMAGE_PLATFORMS} ${DOCKERX_PUSH} \
.
Expand All @@ -106,8 +108,9 @@ multiarch-image-push:
docker buildx build \
-t ${IMAGE_PREFIX}${IMAGE_NAME}:${IMAGE_TAG} \
--progress plain \
-f Dockerfile \
--pull \
--push \
# --push \
--platform ${RELEASE_IMAGE_PLATFORMS} ${DOCKERX_PUSH} \
.

Expand Down
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
3 changes: 2 additions & 1 deletion 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.0
github.com/argoproj-labs/argocd-image-updater/registry-scanner v0.0.0-20241204160458-8076d2005ea6
github.com/argoproj/argo-cd/v2 v2.13.0
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 @@ -175,7 +176,7 @@ require (
)

replace (
github.com/argoproj-labs/argocd-image-updater/registry-scanner => ../registry-scanner
// github.com/argoproj-labs/argocd-image-updater/registry-scanner => ./registry-scanner
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-20241204160458-8076d2005ea6 h1:S0ezzzv85HF2ayGYsMA7v28FaNgRO3bctHAFnl8xzBk=
github.com/argoproj-labs/argocd-image-updater/registry-scanner v0.0.0-20241204160458-8076d2005ea6/go.mod h1:o1vNJv+ZrjvOq3PnSr1b6/ug7cfXMPv85yS84l/0bFs=
github.com/argoproj/argo-cd/v2 v2.13.0 h1:arfqqaSmvDBF6KBQtSR/zsF9TIipO4Ns2jHB2q8x62s=
github.com/argoproj/argo-cd/v2 v2.13.0/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