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

[WIP]added storage interface #351

Merged
merged 1 commit into from
Oct 26, 2021
Merged

[WIP]added storage interface #351

merged 1 commit into from
Oct 26, 2021

Conversation

jasmingacic
Copy link
Contributor

@jasmingacic jasmingacic commented Oct 1, 2021

Storage interface with implementation for minio storage provider.

To bootstrap minio locally

 docker run   -p 9000:9000   -p 9001:9001   minio/minio server /data --console-address ":9001"

@jasmingacic jasmingacic changed the title added storage interface [WIP]added storage interface Oct 1, 2021
Copy link
Member

@exu exu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good for now :)

@jasmingacic
Copy link
Contributor Author

The idea is that, in case of k8s jobs, we have a "scrapper" that would collect artifacts from predefined locations. Specifically cypress always stores artifacts in the executing project in the same location "[project_root]/cypress". We can focus on that

@jasmingacic
Copy link
Contributor Author

as a proof of concept i used this to setup minio in a single pod https://faun.pub/minio-object-storage-deployment-on-kubernetes-83f81fba1d03

Also I built a file "scrapper" (leaving it here for posterity)

	cli, err := minio.NewClient("localhost:9000", "api", "minioadmin", "minioadmin", "minioadmin", false)

	err = cli.CreateBucket("test")
	if err != nil {
		fmt.Println(err)
		return
	}
	err = filepath.Walk(".",
		func(path string, info os.FileInfo, err error) error {
			if err != nil {
				return err
			}

			if !info.IsDir() {
				fmt.Println(path, info.Size())
				err = cli.SaveFile("test", path)
				if err != nil {
					fmt.Println(err)
				}
			}

			return nil
		})
	if err != nil {
		log.Println(err)
	}

Signed-off-by: Jasmin Gacic <jasmin.gacic@gmail.com>
@jasmingacic jasmingacic merged commit 381a462 into main Oct 26, 2021
@jasmingacic jasmingacic deleted the storage_interface branch October 26, 2021 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants