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

forward port of native GCS support to argo 2.2 #2

Merged
merged 7 commits into from
Oct 31, 2018
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
90 changes: 90 additions & 0 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 34 additions & 0 deletions api/openapi-spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@
"description": "From allows an artifact to reference an artifact from a previous step",
"type": "string"
},
"gcs": {
"description": "GCS contains GCS artifact location details",
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.GCSArtifact"
},
"git": {
"description": "Git contains git artifact location details",
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.GitArtifact"
Expand Down Expand Up @@ -104,6 +108,10 @@
"description": "Artifactory contains artifactory artifact location details",
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.ArtifactoryArtifact"
},
"gcs": {
"description": "GCS contains GCS artifact location details",
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.GCSArtifact"
},
"git": {
"description": "Git contains git artifact location details",
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.GitArtifact"
Expand Down Expand Up @@ -221,6 +229,32 @@
}
}
},
"io.argoproj.workflow.v1alpha1.GCSArtifact": {
"description": "GCSArtifact is the location of a GCS artifact",
"required": [
"bucket",
"key"
],
"properties": {
"bucket": {
"type": "string"
},
"key": {
"type": "string"
}
}
},
"io.argoproj.workflow.v1alpha1.GCSBucket": {
"description": "GCSBucket contains the access information required for acting with a GCS bucket",
"required": [
"bucket"
],
"properties": {
"bucket": {
"type": "string"
}
}
},
"io.argoproj.workflow.v1alpha1.GitArtifact": {
"description": "GitArtifact is the location of an git artifact",
"required": [
Expand Down
64 changes: 62 additions & 2 deletions pkg/apis/workflow/v1alpha1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 19 additions & 1 deletion pkg/apis/workflow/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,9 @@ type ArtifactLocation struct {

// Raw contains raw artifact location details
Raw *RawArtifact `json:"raw,omitempty"`

// GCS contains GCS artifact location details
GCS *GCSArtifact `json:"gcs,omitempty"`
}

// Outputs hold parameters, artifacts, and results from a step
Expand Down Expand Up @@ -594,6 +597,21 @@ func (s *S3Artifact) String() string {
return fmt.Sprintf("%s://%s/%s/%s", protocol, s.Endpoint, s.Bucket, s.Key)
}

// GCSBucket contains the access information required for acting with a GCS bucket
type GCSBucket struct {
Bucket string `json:"bucket"`
}

// GCSArtifact is the location of a GCS artifact
type GCSArtifact struct {
GCSBucket `json:",inline"`
Key string `json:"key"`
}

func (s *GCSArtifact) String() string {
return fmt.Sprintf("gs://%s/%s", s.Bucket, s.Key)
}

// GitArtifact is the location of an git artifact
type GitArtifact struct {
// Repo is the git repository
Expand Down Expand Up @@ -818,7 +836,7 @@ func (args *Arguments) GetParameterByName(name string) *Parameter {

// HasLocation whether or not an artifact has a location defined
func (a *Artifact) HasLocation() bool {
return a.S3 != nil || a.Git != nil || a.HTTP != nil || a.Artifactory != nil || a.Raw != nil
return a.S3 != nil || a.Git != nil || a.HTTP != nil || a.Artifactory != nil || a.Raw != nil || a.GCS != nil
}

// GetTemplate retrieves a defined template by its name
Expand Down
38 changes: 38 additions & 0 deletions pkg/apis/workflow/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading