-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Converted GCS and S3 to use VFS Library
GCS and S3 now uses vfs library GCS also archive instead of doing per file operations. This reduces class B operations for fetch and A operation for upload.
- Loading branch information
Showing
14 changed files
with
232 additions
and
301 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
apiVersion: tekton.dev/v1 | ||
kind: PipelineRun | ||
metadata: | ||
generateName: pipelinerun-s3- | ||
spec: | ||
pipelineRef: | ||
name: pipeline | ||
params: | ||
- name: repo_url | ||
value: https://github.com/chmouel/go-helloworld | ||
- name: revision | ||
value: main | ||
- name: registry | ||
value: gs://tekton-cache-assdfsdfdsvbdor0934o5 | ||
- name: buildCommand | ||
value: go build -v ./ | ||
- name: image | ||
value: golang:1.21 | ||
workspaces: | ||
- name: cred | ||
secret: | ||
secretName: aws-cred | ||
- name: source | ||
emptyDir: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package gcs | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/c2fo/vfs/v6" | ||
"github.com/c2fo/vfs/v6/backend" | ||
"github.com/c2fo/vfs/v6/backend/gs" | ||
"github.com/c2fo/vfs/v6/vfssimple" | ||
) | ||
|
||
func File(ctx context.Context, file string) (vfs.File, error) { | ||
bucketAuth := gs.NewFileSystem() | ||
bucketAuth = bucketAuth.WithContext(ctx) | ||
backend.Register("gs://", bucketAuth) | ||
|
||
return vfssimple.NewFile(file) | ||
} |
Oops, something went wrong.