diff --git a/pkg/client/clientset/versioned/fake/register.go b/pkg/client/clientset/versioned/fake/register.go index 4c790e1ce86b..06d337c7b878 100644 --- a/pkg/client/clientset/versioned/fake/register.go +++ b/pkg/client/clientset/versioned/fake/register.go @@ -21,14 +21,14 @@ var localSchemeBuilder = runtime.SchemeBuilder{ // AddToScheme adds all types of this clientset into the given scheme. This allows composition // of clientsets, like in: // -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) // -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) // // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // correctly. diff --git a/pkg/client/clientset/versioned/scheme/register.go b/pkg/client/clientset/versioned/scheme/register.go index e97269603976..bcaf8ea64712 100644 --- a/pkg/client/clientset/versioned/scheme/register.go +++ b/pkg/client/clientset/versioned/scheme/register.go @@ -21,14 +21,14 @@ var localSchemeBuilder = runtime.SchemeBuilder{ // AddToScheme adds all types of this clientset into the given scheme. This allows composition // of clientsets, like in: // -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) // -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) // // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // correctly. diff --git a/test/e2e/http_artifacts_test.go b/test/e2e/http_artifacts_test.go index dc63ff8edab8..fe5fb829bb23 100644 --- a/test/e2e/http_artifacts_test.go +++ b/test/e2e/http_artifacts_test.go @@ -55,6 +55,14 @@ func (s *HttpArtifactsSuite) TestClientCertAuthArtifactHttp() { WaitForWorkflow(fixtures.ToBeSucceeded) } +func (s *HttpArtifactsSuite) TestArtifactoryArtifacts() { + s.Given(). + Workflow("@testdata/http/artifactory-artifact.yaml"). + When(). + SubmitWorkflow(). + WaitForWorkflow(fixtures.ToBeSucceeded) +} + func TestHttpArtifactsSuite(t *testing.T) { suite.Run(t, new(HttpArtifactsSuite)) } diff --git a/test/e2e/testdata/http/artifactory-artifact.yaml b/test/e2e/testdata/http/artifactory-artifact.yaml new file mode 100644 index 000000000000..bc9fc04a8835 --- /dev/null +++ b/test/e2e/testdata/http/artifactory-artifact.yaml @@ -0,0 +1,35 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Workflow +metadata: + generateName: artifactory-artifact-http- +spec: + entrypoint: main + templates: + - name: main + inputs: + artifacts: + - name: my-art + path: /my-artifact + artifactory: + url: http://httpbin:9100/basic-auth/admin/password + usernameSecret: + name: my-httpbin-cred + key: user + passwordSecret: + name: my-httpbin-cred + key: pass + outputs: + artifacts: + - name: my-art + path: /my-artifact + artifactory: + url: http://httpbin:9100/put + usernameSecret: + name: my-httpbin-cred + key: user + passwordSecret: + name: my-httpbin-cred + key: pass + container: + image: argoproj/argosay:v2 + command: [cat, "/my-artifact"] diff --git a/workflow/artifacts/artifacts.go b/workflow/artifacts/artifacts.go index f06695a6256a..b143a7b03617 100644 --- a/workflow/artifacts/artifacts.go +++ b/workflow/artifacts/artifacts.go @@ -181,6 +181,7 @@ func newDriver(ctx context.Context, art *wfv1.Artifact, ri resource.Interface) ( driver := http.ArtifactDriver{ Username: usernameBytes, Password: passwordBytes, + Client: &gohttp.Client{}, } return &driver, nil