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

Commit

Permalink
added features requested in Bug 1495732
Browse files Browse the repository at this point in the history
  • Loading branch information
mraethel committed Nov 11, 2018
1 parent 28e23cf commit 501349a
Show file tree
Hide file tree
Showing 7 changed files with 317 additions and 37 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: |-
Import raw content.
Since: generic-worker 10.11.3
type: object
properties:
raw:
type: string
maxLength: 8000
title: Raw
description: |-
Raw content.
Since: generic-worker 10.11.3
additionalProperties: false
required:
- raw
- title: Base64 Content
description: |-
Import Base64 encoded content.
Since: generic-worker 10.11.3
type: object
properties:
base64:
type: string
maxLength: 8000
title: Base64
description: |-
Base64 content.
Since: generic-worker 10.11.3
pattern: '^[A-Za-z0-9/+]+[=]{0,2}$'
additionalProperties: false
required:
- base64
84 changes: 68 additions & 16 deletions generated_all-unix-style.go
Expand Up @@ -78,6 +78,20 @@ type (
TaskID string `json:"taskId"`
}

// Import Base64 encoded content.
//
// Since: generic-worker 10.11.3
Base64Content struct {

// Base64 content.
//
// Since: generic-worker 10.11.3
//
// Syntax: ^[A-Za-z0-9/+]+[=]{0,2}$
// Max length: 8000
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 All @@ -92,9 +106,6 @@ type (
// See [itermittent tasks](https://docs.taskcluster.net/docs/reference/platform/taskcluster-queue/docs/worker-interaction#intermittent-tasks) for more detail.
//
// Since: generic-worker 10.10.0
//
// Array items:
// Mininum: 1
Retry []int64 `json:"retry,omitempty"`
}

Expand Down Expand Up @@ -124,6 +135,8 @@ type (
// One of:
// * ArtifactContent
// * URLContent
// * RawContent
// * Base64Content
Content json.RawMessage `json:"content"`

// The filesystem location to mount the file.
Expand All @@ -145,9 +158,6 @@ type (
// for several commands.
//
// Since: generic-worker 0.0.1
//
// Array items:
// Array items:
Command [][]string `json:"command"`

// Env vars must be string to __string__ mappings (not number or boolean). For example:
Expand All @@ -161,8 +171,6 @@ type (
// ```
//
// Since: generic-worker 0.0.1
//
// Map entries:
Env map[string]string `json:"env,omitempty"`

// Feature flags enable additional functionality.
Expand All @@ -181,12 +189,6 @@ type (
// Directories and/or files to be mounted.
//
// Since: generic-worker 5.4.0
//
// Array items:
// One of:
// * FileMount
// * WritableDirectoryCache
// * ReadOnlyDirectory
Mounts []json.RawMessage `json:"mounts,omitempty"`

// By default tasks will be resolved with `state/reasonResolved`: `completed/completed`
Expand All @@ -200,8 +202,6 @@ type (
// provided.
//
// Since: generic-worker 6.0.0
//
// Array items:
OSGroups []string `json:"osGroups,omitempty"`

// URL of a service that can indicate tasks superseding this one; the current `taskId`
Expand All @@ -216,11 +216,26 @@ type (
SupersederURL string `json:"supersederUrl,omitempty"`
}

// Import raw content.
//
// Since: generic-worker 10.11.3
RawContent struct {

// Raw content.
//
// Since: generic-worker 10.11.3
//
// Max length: 8000
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 +286,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 +375,41 @@ func taskPayloadSchema() string {
],
"title": "URL Content",
"type": "object"
},
{
"additionalProperties": false,
"description": "Import raw content.\n\nSince: generic-worker 10.11.3",
"properties": {
"raw": {
"description": "Raw content.\n\nSince: generic-worker 10.11.3",
"maxLength": 8000,
"title": "Raw",
"type": "string"
}
},
"required": [
"raw"
],
"title": "Raw Content",
"type": "object"
},
{
"additionalProperties": false,
"description": "Import Base64 encoded content.\n\nSince: generic-worker 10.11.3",
"properties": {
"base64": {
"description": "Base64 content.\n\nSince: generic-worker 10.11.3",
"maxLength": 8000,
"pattern": "^[A-Za-z0-9/+]+[=]{0,2}$",
"title": "Base64",
"type": "string"
}
},
"required": [
"base64"
],
"title": "Base64 Content",
"type": "object"
}
]
},
Expand Down
83 changes: 68 additions & 15 deletions generated_windows.go
Expand Up @@ -76,6 +76,20 @@ type (
TaskID string `json:"taskId"`
}

// Import Base64 encoded content.
//
// Since: generic-worker 10.11.3
Base64Content struct {

// Base64 content.
//
// Since: generic-worker 10.11.3
//
// Syntax: ^[A-Za-z0-9/+]+[=]{0,2}$
// Max length: 8000
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 All @@ -90,9 +104,6 @@ type (
// See [itermittent tasks](https://docs.taskcluster.net/docs/reference/platform/taskcluster-queue/docs/worker-interaction#intermittent-tasks) for more detail.
//
// Since: generic-worker 10.10.0
//
// Array items:
// Mininum: 1
Retry []int64 `json:"retry,omitempty"`
}

Expand Down Expand Up @@ -142,6 +153,8 @@ type (
// One of:
// * ArtifactContent
// * URLContent
// * RawContent
// * Base64Content
Content json.RawMessage `json:"content"`

// The filesystem location to mount the file.
Expand Down Expand Up @@ -170,8 +183,6 @@ type (
// ```
//
// Since: generic-worker 0.0.1
//
// Array items:
Command []string `json:"command"`

// Env vars must be string to __string__ mappings (not number or boolean). For example:
Expand All @@ -185,8 +196,6 @@ type (
// ```
//
// Since: generic-worker 0.0.1
//
// Map entries:
Env map[string]string `json:"env,omitempty"`

// Feature flags enable additional functionality.
Expand All @@ -205,12 +214,6 @@ type (
// Directories and/or files to be mounted.
//
// Since: generic-worker 5.4.0
//
// Array items:
// One of:
// * FileMount
// * WritableDirectoryCache
// * ReadOnlyDirectory
Mounts []json.RawMessage `json:"mounts,omitempty"`

// By default tasks will be resolved with `state/reasonResolved`: `completed/completed`
Expand All @@ -224,8 +227,6 @@ type (
// group listed.
//
// Since: generic-worker 6.0.0
//
// Array items:
OSGroups []string `json:"osGroups,omitempty"`

// Specifies an artifact name for publishing RDP connection information.
Expand Down Expand Up @@ -268,11 +269,26 @@ type (
SupersederURL string `json:"supersederUrl,omitempty"`
}

// Import raw content.
//
// Since: generic-worker 10.11.3
RawContent struct {

// Raw content.
//
// Since: generic-worker 10.11.3
//
// Max length: 8000
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 +339,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 +428,41 @@ func taskPayloadSchema() string {
],
"title": "URL Content",
"type": "object"
},
{
"additionalProperties": false,
"description": "Import raw content.\n\nSince: generic-worker 10.11.3",
"properties": {
"raw": {
"description": "Raw content.\n\nSince: generic-worker 10.11.3",
"maxLength": 8000,
"title": "Raw",
"type": "string"
}
},
"required": [
"raw"
],
"title": "Raw Content",
"type": "object"
},
{
"additionalProperties": false,
"description": "Import Base64 encoded content.\n\nSince: generic-worker 10.11.3",
"properties": {
"base64": {
"description": "Base64 content.\n\nSince: generic-worker 10.11.3",
"maxLength": 8000,
"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 501349a

Please sign in to comment.