Skip to content
This repository has been archived by the owner on Feb 20, 2020. It is now read-only.

Commit

Permalink
Merge pull request #129 from mraethel/master
Browse files Browse the repository at this point in the history
Bug 1495732 - support inline content when mounting files/directories
  • Loading branch information
petemoore committed Nov 29, 2018
2 parents 6406fc3 + 5cb2876 commit c5e8e70
Show file tree
Hide file tree
Showing 7 changed files with 323 additions and 12 deletions.
37 changes: 37 additions & 0 deletions all-unix-style.yml
Expand Up @@ -377,3 +377,40 @@ definitions:
additionalProperties: false
required:
- url
- title: Raw Content
description: |-
Byte-for-byte literal inline content of file/archive, up to 64KB in size.
Since: generic-worker 11.1.0
type: object
properties:
raw:
type: string
maxLength: 65536
title: Raw
description: |-
Byte-for-byte literal inline content of file/archive, up to 64KB in size.
Since: generic-worker 11.1.0
additionalProperties: false
required:
- raw
- title: Base64 Content
description: |-
Base64 encoded content of file/archive, up to 64KB (encoded) in size.
Since: generic-worker 11.1.0
type: object
properties:
base64:
type: string
maxLength: 65536
title: Base64
description: |-
Base64 encoded content of file/archive, up to 64KB (encoded) in size.
Since: generic-worker 11.1.0
pattern: '^[A-Za-z0-9/+]+[=]{0,2}$'
additionalProperties: false
required:
- base64
68 changes: 68 additions & 0 deletions generated_all-unix-style.go
Expand Up @@ -78,6 +78,20 @@ type (
TaskID string `json:"taskId"`
}

// Base64 encoded content of file/archive, up to 64KB (encoded) in size.
//
// Since: generic-worker 11.1.0
Base64Content struct {

// Base64 encoded content of file/archive, up to 64KB (encoded) in size.
//
// Since: generic-worker 11.1.0
//
// Syntax: ^[A-Za-z0-9/+]+[=]{0,2}$
// Max length: 65536
Base64 string `json:"base64"`
}

// By default tasks will be resolved with `state/reasonResolved`: `completed/completed`
// if all task commands have a zero exit code, or `failed/failed` if any command has a
// non-zero exit code. This payload property allows customsation of the task resolution
Expand Down Expand Up @@ -124,6 +138,8 @@ type (
// One of:
// * ArtifactContent
// * URLContent
// * RawContent
// * Base64Content
Content json.RawMessage `json:"content"`

// The filesystem location to mount the file.
Expand Down Expand Up @@ -216,11 +232,26 @@ type (
SupersederURL string `json:"supersederUrl,omitempty"`
}

// Byte-for-byte literal inline content of file/archive, up to 64KB in size.
//
// Since: generic-worker 11.1.0
RawContent struct {

// Byte-for-byte literal inline content of file/archive, up to 64KB in size.
//
// Since: generic-worker 11.1.0
//
// Max length: 65536
Raw string `json:"raw"`
}

ReadOnlyDirectory struct {

// One of:
// * ArtifactContent
// * URLContent
// * RawContent
// * Base64Content
Content json.RawMessage `json:"content"`

// The filesystem location to mount the directory volume.
Expand Down Expand Up @@ -271,6 +302,8 @@ type (
// One of:
// * ArtifactContent
// * URLContent
// * RawContent
// * Base64Content
Content json.RawMessage `json:"content,omitempty"`

// The filesystem location to mount the directory volume.
Expand Down Expand Up @@ -358,6 +391,41 @@ func taskPayloadSchema() string {
],
"title": "URL Content",
"type": "object"
},
{
"additionalProperties": false,
"description": "Byte-for-byte literal inline content of file/archive, up to 64KB in size.\n\nSince: generic-worker 11.1.0",
"properties": {
"raw": {
"description": "Byte-for-byte literal inline content of file/archive, up to 64KB in size.\n\nSince: generic-worker 11.1.0",
"maxLength": 65536,
"title": "Raw",
"type": "string"
}
},
"required": [
"raw"
],
"title": "Raw Content",
"type": "object"
},
{
"additionalProperties": false,
"description": "Base64 encoded content of file/archive, up to 64KB (encoded) in size.\n\nSince: generic-worker 11.1.0",
"properties": {
"base64": {
"description": "Base64 encoded content of file/archive, up to 64KB (encoded) in size.\n\nSince: generic-worker 11.1.0",
"maxLength": 65536,
"pattern": "^[A-Za-z0-9/+]+[=]{0,2}$",
"title": "Base64",
"type": "string"
}
},
"required": [
"base64"
],
"title": "Base64 Content",
"type": "object"
}
]
},
Expand Down
68 changes: 68 additions & 0 deletions generated_windows.go
Expand Up @@ -76,6 +76,20 @@ type (
TaskID string `json:"taskId"`
}

// Base64 encoded content of file/archive, up to 64KB (encoded) in size.
//
// Since: generic-worker 11.1.0
Base64Content struct {

// Base64 encoded content of file/archive, up to 64KB (encoded) in size.
//
// Since: generic-worker 11.1.0
//
// Syntax: ^[A-Za-z0-9/+]+[=]{0,2}$
// Max length: 65536
Base64 string `json:"base64"`
}

// By default tasks will be resolved with `state/reasonResolved`: `completed/completed`
// if all task commands have a zero exit code, or `failed/failed` if any command has a
// non-zero exit code. This payload property allows customsation of the task resolution
Expand Down Expand Up @@ -142,6 +156,8 @@ type (
// One of:
// * ArtifactContent
// * URLContent
// * RawContent
// * Base64Content
Content json.RawMessage `json:"content"`

// The filesystem location to mount the file.
Expand Down Expand Up @@ -268,11 +284,26 @@ type (
SupersederURL string `json:"supersederUrl,omitempty"`
}

// Byte-for-byte literal inline content of file/archive, up to 64KB in size.
//
// Since: generic-worker 11.1.0
RawContent struct {

// Byte-for-byte literal inline content of file/archive, up to 64KB in size.
//
// Since: generic-worker 11.1.0
//
// Max length: 65536
Raw string `json:"raw"`
}

ReadOnlyDirectory struct {

// One of:
// * ArtifactContent
// * URLContent
// * RawContent
// * Base64Content
Content json.RawMessage `json:"content"`

// The filesystem location to mount the directory volume.
Expand Down Expand Up @@ -323,6 +354,8 @@ type (
// One of:
// * ArtifactContent
// * URLContent
// * RawContent
// * Base64Content
Content json.RawMessage `json:"content,omitempty"`

// The filesystem location to mount the directory volume.
Expand Down Expand Up @@ -410,6 +443,41 @@ func taskPayloadSchema() string {
],
"title": "URL Content",
"type": "object"
},
{
"additionalProperties": false,
"description": "Byte-for-byte literal inline content of file/archive, up to 64KB in size.\n\nSince: generic-worker 11.1.0",
"properties": {
"raw": {
"description": "Byte-for-byte literal inline content of file/archive, up to 64KB in size.\n\nSince: generic-worker 11.1.0",
"maxLength": 65536,
"title": "Raw",
"type": "string"
}
},
"required": [
"raw"
],
"title": "Raw Content",
"type": "object"
},
{
"additionalProperties": false,
"description": "Base64 encoded content of file/archive, up to 64KB (encoded) in size.\n\nSince: generic-worker 11.1.0 ",
"properties": {
"base64": {
"description": "Base64 encoded content of file/archive, up to 64KB (encoded) in size.\n\nSince: generic-worker 11.1.0 ",
"maxLength": 65536,
"pattern": "^[A-Za-z0-9/+]+[=]{0,2}$",
"title": "Base64",
"type": "string"
}
},
"required": [
"base64"
],
"title": "Base64 Content",
"type": "object"
}
]
},
Expand Down
Binary file added generic-worker
Binary file not shown.

0 comments on commit c5e8e70

Please sign in to comment.