Skip to content

Commit

Permalink
fix: artifactory not working. Fixes #9681 (#9782)
Browse files Browse the repository at this point in the history
* fix: artifactory not working. Fixes #9681

Signed-off-by: Alexander Dittmann <alexander.dittmann@sap.com>

* fix: make pre-commit -B

Signed-off-by: Alex Collins <alex_collins@intuit.com>

Signed-off-by: Alexander Dittmann <alexander.dittmann@sap.com>
Signed-off-by: Alex Collins <alex_collins@intuit.com>
Co-authored-by: Alex Collins <alex_collins@intuit.com>
  • Loading branch information
alexdittmann and alexec committed Oct 10, 2022
1 parent 1fc6460 commit f767f39
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/e2e/http_artifacts_test.go
Expand Up @@ -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))
}
35 changes: 35 additions & 0 deletions 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"]
1 change: 1 addition & 0 deletions workflow/artifacts/artifacts.go
Expand Up @@ -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

Expand Down

0 comments on commit f767f39

Please sign in to comment.