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

Unable to run artifact private git test #8953

Closed
tczhao opened this issue Jun 12, 2022 · 3 comments · Fixed by #9838
Closed

Unable to run artifact private git test #8953

tczhao opened this issue Jun 12, 2022 · 3 comments · Fixed by #9838

Comments

@tczhao
Copy link
Member

tczhao commented Jun 12, 2022

Summary

			if os.Getenv("CI") == "true" {
				t.SkipNow()
			}
			privateKey, err := os.ReadFile(homedir.HomeDir() + "/.ssh/id_rsa")
			assert.NoError(t, err)
			driver := &ArtifactDriver{SSHPrivateKey: string(privateKey)}
			assert.NoError(t, load(driver, &wfv1.GitArtifact{Repo: "git@github.com:argoproj-labs/private-test-repo.git"}))
			assert.FileExists(t, path+"/README.md")

https://github.com/argoproj/argo-workflows/blob/master/workflow/artifacts/git/git_test.go#L29-L36

Most of the contributors don't have access to this private repo
perhaps we should guard this test in a different way

@alexec


Message from the maintainers:

Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.

@ibotdotout
Copy link
Contributor

ibotdotout commented Oct 16, 2022

I faced this issue too. I would like to help to clean it up.
Do you have any suggest approach ?

@tczhao
Copy link
Member Author

tczhao commented Oct 16, 2022

I'm thinking for these steps that require private key
skip them if certain environmental variable are not present
https://docs.github.com/en/actions/learn-github-actions/environment-variables

@alexec
Copy link
Contributor

alexec commented Oct 18, 2022

We can’t run this test locally, or on CI. The only place it can be run is my laptop. Let’s skip this test for everyone.

terrytangyuan pushed a commit that referenced this issue Nov 2, 2022
Signed-off-by: ibotdotout <tkroputa@gmail.com>
juchaosong pushed a commit to juchaosong/argo-workflows that referenced this issue Nov 3, 2022
…oproj#9838)

Signed-off-by: ibotdotout <tkroputa@gmail.com>
Signed-off-by: juchao <juchao@coscene.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants