Skip to content

Commit

Permalink
(fleet) switch from docker.io to install.datad0g.com for staging pack…
Browse files Browse the repository at this point in the history
…ages (#30218)
  • Loading branch information
arbll authored Nov 5, 2024
1 parent d533cc2 commit 5918f4e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkg/fleet/internal/oci/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ func (d *DownloadedPackage) WriteOCILayout(dir string) error {
func PackageURL(env *env.Env, pkg string, version string) string {
switch env.Site {
case "datad0g.com":
return fmt.Sprintf("oci://docker.io/datadog/%s-package-dev:%s", strings.TrimPrefix(pkg, "datadog-"), version)
return fmt.Sprintf("oci://install.datad0g.com/%s-package-dev:%s", strings.TrimPrefix(pkg, "datadog-"), version)
default:
return fmt.Sprintf("oci://gcr.io/datadoghq/%s-package:%s", strings.TrimPrefix(pkg, "datadog-"), version)
}
Expand Down
8 changes: 4 additions & 4 deletions pkg/fleet/internal/oci/download_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,12 @@ func TestGetRefAndKeychain(t *testing.T) {
}

tests := []test{
{url: "docker.io/datadog/agent-package-dev:latest", expectedRef: "docker.io/datadog/agent-package-dev:latest", expectedKeychain: authn.DefaultKeychain},
{url: "install.datad0g.com/agent-package-dev:latest", expectedRef: "install.datad0g.com/agent-package-dev:latest", expectedKeychain: authn.DefaultKeychain},
{url: "gcr.io/datadoghq/agent-package@sha256:1234", expectedRef: "gcr.io/datadoghq/agent-package@sha256:1234", expectedKeychain: authn.DefaultKeychain},
{url: "docker.io/datadog/agent-package-dev:latest", registryOverride: "fake.io", expectedRef: "fake.io/agent-package-dev:latest", expectedKeychain: authn.DefaultKeychain},
{url: "install.datad0g.com/agent-package-dev:latest", registryOverride: "fake.io", expectedRef: "fake.io/agent-package-dev:latest", expectedKeychain: authn.DefaultKeychain},
{url: "gcr.io/datadoghq/agent-package@sha256:1234", registryOverride: "fake.io", expectedRef: "fake.io/agent-package@sha256:1234", expectedKeychain: authn.DefaultKeychain},
{
url: "docker.io/datadog/agent-package-dev:latest",
url: "install.datad0g.com/agent-package-dev:latest",
regOverrideByImage: map[string]string{"agent-package-dev": "fake.io"},
expectedRef: "fake.io/agent-package-dev:latest",
expectedKeychain: authn.DefaultKeychain,
Expand Down Expand Up @@ -200,7 +200,7 @@ func TestPackageURL(t *testing.T) {
}

tests := []test{
{site: "datad0g.com", pkg: "datadog-agent", version: "latest", expected: "oci://docker.io/datadog/agent-package-dev:latest"},
{site: "datad0g.com", pkg: "datadog-agent", version: "latest", expected: "oci://install.datad0g.com/agent-package-dev:latest"},
{site: "datadoghq.com", pkg: "datadog-agent", version: "1.2.3", expected: "oci://gcr.io/datadoghq/agent-package:1.2.3"},
}

Expand Down

0 comments on commit 5918f4e

Please sign in to comment.