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

fix: artifactory not working. Fixes #9681 #9782

Merged
merged 2 commits into from
Oct 10, 2022
Merged
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
8 changes: 8 additions & 0 deletions test/e2e/http_artifacts_test.go
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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