peak-sdk 1.9.0__py3-none-any.whl → 1.10.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- peak/_version.py +1 -1
- peak/cli/press/blocks/specs.py +252 -7
- peak/cli/resources/workflows.py +320 -18
- peak/press/blocks.py +305 -1
- peak/resources/workflows.py +476 -8
- peak/sample_yaml/press/blocks/specs/workflow/create_block_spec.yaml +49 -1
- peak/sample_yaml/press/blocks/specs/workflow/create_block_spec_release.yaml +49 -1
- peak/sample_yaml/resources/images/dockerfile/create_image.yaml +2 -2
- peak/sample_yaml/resources/images/dockerfile/create_image_version.yaml +1 -1
- peak/sample_yaml/resources/images/dockerfile/update_version.yaml +1 -1
- peak/sample_yaml/resources/images/github/create_image.yaml +1 -1
- peak/sample_yaml/resources/images/github/create_image_version.yaml +1 -1
- peak/sample_yaml/resources/images/github/update_version.yaml +1 -1
- peak/sample_yaml/resources/images/upload/create_image.yaml +3 -3
- peak/sample_yaml/resources/images/upload/create_image_version.yaml +4 -4
- peak/sample_yaml/resources/images/upload/create_or_update_image.yaml +4 -4
- peak/sample_yaml/resources/images/upload/update_version.yaml +4 -4
- peak/sample_yaml/resources/services/test_service.yaml +1 -1
- peak/sample_yaml/resources/workflows/create_or_update_workflow.yaml +36 -3
- peak/sample_yaml/resources/workflows/create_workflow.yaml +33 -4
- peak/sample_yaml/resources/workflows/patch_workflow.yaml +16 -4
- peak/sample_yaml/resources/workflows/update_workflow.yaml +35 -2
- peak/sample_yaml/resources/workflows/workflow_auto_retry.yaml +59 -12
- peak/sample_yaml/resources/workflows/workflow_execution_parameters.yaml +75 -10
- peak/sample_yaml/resources/workflows/workflow_input_parameters.yaml +42 -2
- peak/sample_yaml/resources/workflows/workflow_input_parameters_inherit.yaml +64 -0
- peak/sample_yaml/resources/workflows/workflow_output_parameters.yaml +20 -3
- peak/sample_yaml/resources/workflows/workflow_skippable_steps.yaml +45 -12
- {peak_sdk-1.9.0.dist-info → peak_sdk-1.10.0.dist-info}/METADATA +1 -1
- {peak_sdk-1.9.0.dist-info → peak_sdk-1.10.0.dist-info}/RECORD +33 -32
- {peak_sdk-1.9.0.dist-info → peak_sdk-1.10.0.dist-info}/LICENSE +0 -0
- {peak_sdk-1.9.0.dist-info → peak_sdk-1.10.0.dist-info}/WHEEL +0 -0
- {peak_sdk-1.9.0.dist-info → peak_sdk-1.10.0.dist-info}/entry_points.txt +0 -0
@@ -6,7 +6,7 @@ body:
|
|
6
6
|
notes: This is a new release
|
7
7
|
config:
|
8
8
|
steps:
|
9
|
-
|
9
|
+
step1:
|
10
10
|
command: echo 1
|
11
11
|
type: standard
|
12
12
|
image:
|
@@ -17,6 +17,54 @@ body:
|
|
17
17
|
git_token: random_token_1
|
18
18
|
npm_token: random_token_2
|
19
19
|
useCache: "@param:use_cache"
|
20
|
+
resources:
|
21
|
+
instanceTypeId: 21
|
22
|
+
storage: 10GB
|
23
|
+
stepTimeout: 30
|
24
|
+
clearImageCache: true
|
25
|
+
parameters:
|
26
|
+
env:
|
27
|
+
key: value
|
28
|
+
secrets:
|
29
|
+
- secret-1
|
30
|
+
- secret-2
|
31
|
+
repository:
|
32
|
+
branch: main
|
33
|
+
token: random_token
|
34
|
+
url: "https://github.com/org/repo"
|
35
|
+
step2:
|
36
|
+
type: http
|
37
|
+
method: post
|
38
|
+
url: "https://peak.ai"
|
39
|
+
payload: "{}"
|
40
|
+
auth:
|
41
|
+
type: no-auth
|
42
|
+
headers:
|
43
|
+
absolute:
|
44
|
+
Content-Type: application/json
|
45
|
+
secrets:
|
46
|
+
token: some-token
|
47
|
+
step3:
|
48
|
+
type: sql
|
49
|
+
repository:
|
50
|
+
branch: main
|
51
|
+
token: random_token
|
52
|
+
url: "https://example.com"
|
53
|
+
filePath: "path/to/file.sql"
|
54
|
+
parameters:
|
55
|
+
env:
|
56
|
+
key1: value1
|
57
|
+
key2: value2
|
58
|
+
inherit:
|
59
|
+
key3: value3
|
60
|
+
key4: value4
|
61
|
+
step5:
|
62
|
+
type: export
|
63
|
+
schema: schema_name
|
64
|
+
table: table_name
|
65
|
+
sortBy: column_name
|
66
|
+
sortOrder: asc
|
67
|
+
compression: false
|
20
68
|
triggers:
|
21
69
|
- cron: "0 0 * * *"
|
22
70
|
watchers:
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
body:
|
4
4
|
name: dockerfile-image
|
5
|
-
version:
|
5
|
+
version: 0.0.1-test
|
6
6
|
description: Creating a new dockerfile type image
|
7
7
|
type: workflow
|
8
8
|
buildDetails:
|
@@ -16,4 +16,4 @@ body:
|
|
16
16
|
secrets:
|
17
17
|
- SECRET1
|
18
18
|
- SECRET2
|
19
|
-
dockerfile:
|
19
|
+
dockerfile: FROM nginx
|
@@ -5,7 +5,7 @@ body:
|
|
5
5
|
description: Creating a new image version
|
6
6
|
buildDetails:
|
7
7
|
source: upload
|
8
|
-
context:
|
8
|
+
context: .
|
9
9
|
dockerfilePath: Dockerfile
|
10
10
|
buildArguments:
|
11
11
|
- name: PARAM1
|
@@ -17,7 +17,7 @@ body:
|
|
17
17
|
- SECRET2
|
18
18
|
useCache: true
|
19
19
|
artifact:
|
20
|
-
path:
|
20
|
+
path: .
|
21
21
|
ignore_files:
|
22
|
-
-
|
23
|
-
-
|
22
|
+
- .gitignore
|
23
|
+
- .dockerignore
|
@@ -6,7 +6,7 @@ body:
|
|
6
6
|
description: Creating a new image version
|
7
7
|
buildDetails:
|
8
8
|
source: upload
|
9
|
-
context:
|
9
|
+
context: .
|
10
10
|
dockerfilePath: Dockerfile
|
11
11
|
buildArguments:
|
12
12
|
- name: PARAM1
|
@@ -18,7 +18,7 @@ body:
|
|
18
18
|
- SECRET2
|
19
19
|
useCache: true
|
20
20
|
artifact:
|
21
|
-
path:
|
21
|
+
path: .
|
22
22
|
ignore_files:
|
23
|
-
-
|
24
|
-
-
|
23
|
+
- .gitignore
|
24
|
+
- .dockerignore
|
@@ -4,7 +4,7 @@ body:
|
|
4
4
|
description: Updating the image version
|
5
5
|
buildDetails:
|
6
6
|
source: upload
|
7
|
-
context:
|
7
|
+
context: .
|
8
8
|
dockerfilePath: Dockerfile
|
9
9
|
buildArguments:
|
10
10
|
- name: PARAM1
|
@@ -14,7 +14,7 @@ body:
|
|
14
14
|
- SECRET2
|
15
15
|
useCache: true
|
16
16
|
artifact:
|
17
|
-
path:
|
17
|
+
path: .
|
18
18
|
ignore_files:
|
19
|
-
-
|
20
|
-
-
|
19
|
+
- .gitignore
|
20
|
+
- .dockerignore
|
@@ -26,7 +26,7 @@ body:
|
|
26
26
|
fail: true
|
27
27
|
runtimeExceeded: 10
|
28
28
|
- email:
|
29
|
-
name:
|
29
|
+
name: email-watcher-1
|
30
30
|
recipients:
|
31
31
|
to:
|
32
32
|
- user1@peak.ai
|
@@ -37,7 +37,9 @@ body:
|
|
37
37
|
runtimeExceeded: 10
|
38
38
|
retryOptions:
|
39
39
|
duration: 5
|
40
|
-
exitCodes:
|
40
|
+
exitCodes:
|
41
|
+
- 1
|
42
|
+
- 2
|
41
43
|
exponentialBackoff: true
|
42
44
|
numberOfRetries: 3
|
43
45
|
tags:
|
@@ -49,7 +51,7 @@ body:
|
|
49
51
|
repository:
|
50
52
|
branch: main
|
51
53
|
token: random_token
|
52
|
-
url: https://example.com
|
54
|
+
url: "https://example.com"
|
53
55
|
imageId: 100
|
54
56
|
imageVersionId: 100
|
55
57
|
resources:
|
@@ -63,3 +65,34 @@ body:
|
|
63
65
|
resources:
|
64
66
|
instanceTypeId: 21
|
65
67
|
storage: 40GB
|
68
|
+
step3:
|
69
|
+
type: http
|
70
|
+
method: post
|
71
|
+
url: "https://peak.ai"
|
72
|
+
payload: "{}"
|
73
|
+
auth:
|
74
|
+
type: no-auth
|
75
|
+
headers:
|
76
|
+
absolute:
|
77
|
+
Content-Type: application/json
|
78
|
+
step4:
|
79
|
+
type: sql
|
80
|
+
repository:
|
81
|
+
branch: main
|
82
|
+
token: random_token
|
83
|
+
url: "https://example.com"
|
84
|
+
filePath: "path/to/file.sql"
|
85
|
+
parameters:
|
86
|
+
env:
|
87
|
+
key1: value1
|
88
|
+
key2: value2
|
89
|
+
inherit:
|
90
|
+
key3: value3
|
91
|
+
key4: value4
|
92
|
+
step5:
|
93
|
+
type: export
|
94
|
+
schema: schema_name
|
95
|
+
table: table_name
|
96
|
+
sortBy: column_name
|
97
|
+
sortOrder: asc
|
98
|
+
compression: false
|
@@ -3,7 +3,7 @@
|
|
3
3
|
body:
|
4
4
|
name: new-workflow
|
5
5
|
triggers:
|
6
|
-
- cron:
|
6
|
+
- cron: 0 0 * * *
|
7
7
|
watchers:
|
8
8
|
- user: abc@peak.ai
|
9
9
|
events:
|
@@ -26,7 +26,7 @@ body:
|
|
26
26
|
fail: true
|
27
27
|
runtimeExceeded: 10
|
28
28
|
- email:
|
29
|
-
name:
|
29
|
+
name: email-watcher-1
|
30
30
|
recipients:
|
31
31
|
to:
|
32
32
|
- user1@peak.ai
|
@@ -37,7 +37,9 @@ body:
|
|
37
37
|
runtimeExceeded: 10
|
38
38
|
retryOptions:
|
39
39
|
duration: 5
|
40
|
-
exitCodes:
|
40
|
+
exitCodes:
|
41
|
+
- 1
|
42
|
+
- 2
|
41
43
|
exponentialBackoff: true
|
42
44
|
numberOfRetries: 3
|
43
45
|
tags:
|
@@ -48,7 +50,7 @@ body:
|
|
48
50
|
type: standard
|
49
51
|
imageId: 100
|
50
52
|
imageVersionId: 100
|
51
|
-
command:
|
53
|
+
command: python script.py
|
52
54
|
resources:
|
53
55
|
instanceTypeId: 21
|
54
56
|
storage: 10GB
|
@@ -65,3 +67,30 @@ body:
|
|
65
67
|
branch: main
|
66
68
|
token: random_token
|
67
69
|
url: "https://github.com/org/repo"
|
70
|
+
stepName2:
|
71
|
+
type: http
|
72
|
+
method: post
|
73
|
+
url: "https://peak.ai"
|
74
|
+
payload: "{}"
|
75
|
+
auth:
|
76
|
+
type: no-auth
|
77
|
+
headers:
|
78
|
+
absolute:
|
79
|
+
Content-Type: application/json
|
80
|
+
stepName3:
|
81
|
+
type: sql
|
82
|
+
sqlQueryPath: path/to/sql
|
83
|
+
parameters:
|
84
|
+
env:
|
85
|
+
key1: value1
|
86
|
+
key2: value2
|
87
|
+
inherit:
|
88
|
+
key3: value3
|
89
|
+
key4: value4
|
90
|
+
stepName4:
|
91
|
+
type: export
|
92
|
+
schema: schema_name
|
93
|
+
table: table_name
|
94
|
+
sortBy: column_name
|
95
|
+
sortOrder: asc
|
96
|
+
compression: false
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# patch-workflow.yaml
|
2
2
|
|
3
3
|
body:
|
4
|
-
name:
|
4
|
+
name: updated-workflow
|
5
5
|
triggers:
|
6
6
|
- {}
|
7
7
|
watchers:
|
@@ -26,7 +26,7 @@ body:
|
|
26
26
|
fail: true
|
27
27
|
runtimeExceeded: 10
|
28
28
|
- email:
|
29
|
-
name:
|
29
|
+
name: email-watcher-1
|
30
30
|
recipients:
|
31
31
|
to:
|
32
32
|
- user1@peak.ai
|
@@ -37,17 +37,29 @@ body:
|
|
37
37
|
runtimeExceeded: 10
|
38
38
|
retryOptions:
|
39
39
|
duration: 5
|
40
|
-
exitCodes:
|
40
|
+
exitCodes:
|
41
|
+
- 1
|
42
|
+
- 2
|
41
43
|
exponentialBackoff: true
|
42
44
|
numberOfRetries: 3
|
43
45
|
steps:
|
44
46
|
step1:
|
45
47
|
imageId: 100
|
46
48
|
imageVersionId: 100
|
49
|
+
step2:
|
50
|
+
type: http
|
51
|
+
method: post
|
52
|
+
url: "https://peak.ai"
|
53
|
+
payload: "{}"
|
54
|
+
auth:
|
55
|
+
type: no-auth
|
56
|
+
headers:
|
57
|
+
absolute:
|
58
|
+
Content-Type: application/json
|
47
59
|
step3:
|
48
60
|
imageId: 400
|
49
61
|
imageVersionId: 400
|
50
|
-
command:
|
62
|
+
command: python test4.py
|
51
63
|
resources:
|
52
64
|
instanceTypeId: 24
|
53
65
|
repository:
|
@@ -26,7 +26,7 @@ body:
|
|
26
26
|
fail: true
|
27
27
|
runtimeExceeded: 10
|
28
28
|
- email:
|
29
|
-
name:
|
29
|
+
name: email-watcher-1
|
30
30
|
recipients:
|
31
31
|
to:
|
32
32
|
- user1@peak.ai
|
@@ -37,7 +37,9 @@ body:
|
|
37
37
|
runtimeExceeded: 10
|
38
38
|
retryOptions:
|
39
39
|
duration: 5
|
40
|
-
exitCodes:
|
40
|
+
exitCodes:
|
41
|
+
- 1
|
42
|
+
- 2
|
41
43
|
exponentialBackoff: true
|
42
44
|
numberOfRetries: 3
|
43
45
|
tags:
|
@@ -63,3 +65,34 @@ body:
|
|
63
65
|
resources:
|
64
66
|
instanceTypeId: 21
|
65
67
|
storage: 40GB
|
68
|
+
step3:
|
69
|
+
type: http
|
70
|
+
method: post
|
71
|
+
url: "https://peak.ai"
|
72
|
+
payload: "{}"
|
73
|
+
auth:
|
74
|
+
type: no-auth
|
75
|
+
headers:
|
76
|
+
absolute:
|
77
|
+
Content-Type: application/json
|
78
|
+
step4:
|
79
|
+
type: sql
|
80
|
+
repository:
|
81
|
+
branch: main
|
82
|
+
token: random_token
|
83
|
+
url: "https://example.com"
|
84
|
+
filePath: "path/to/file.sql"
|
85
|
+
parameters:
|
86
|
+
env:
|
87
|
+
key1: value1
|
88
|
+
key2: value2
|
89
|
+
inherit:
|
90
|
+
key3: value3
|
91
|
+
key4: value4
|
92
|
+
step5:
|
93
|
+
type: export
|
94
|
+
schema: schema_name
|
95
|
+
table: table_name
|
96
|
+
sortBy: column_name
|
97
|
+
sortOrder: asc
|
98
|
+
compression: false
|
@@ -3,10 +3,12 @@
|
|
3
3
|
body:
|
4
4
|
name: new-workflow
|
5
5
|
triggers:
|
6
|
-
- cron:
|
6
|
+
- cron: 0 0 * * *
|
7
7
|
retryOptions:
|
8
8
|
duration: 5
|
9
|
-
exitCodes:
|
9
|
+
exitCodes:
|
10
|
+
- 1
|
11
|
+
- 2
|
10
12
|
exponentialBackoff: true
|
11
13
|
numberOfRetries: 3
|
12
14
|
steps:
|
@@ -24,17 +26,62 @@ body:
|
|
24
26
|
runConfiguration:
|
25
27
|
retryOptions:
|
26
28
|
duration: 5
|
27
|
-
exitCodes:
|
29
|
+
exitCodes:
|
30
|
+
- 1
|
31
|
+
- 137
|
32
|
+
- 143
|
28
33
|
exponentialBackoff: true
|
29
34
|
numberOfRetries: 3
|
30
35
|
step-2:
|
31
|
-
type:
|
32
|
-
imageId: 100
|
33
|
-
imageVersionId: 100
|
34
|
-
command: echo world
|
35
|
-
resources:
|
36
|
-
instanceTypeId: 21
|
37
|
-
storage: 10GB
|
36
|
+
type: http
|
38
37
|
parents: []
|
39
|
-
|
40
|
-
|
38
|
+
url: "https://peak.ai"
|
39
|
+
payload: "{}"
|
40
|
+
auth:
|
41
|
+
type: bearer-token
|
42
|
+
bearerToken: token
|
43
|
+
headers:
|
44
|
+
absolute:
|
45
|
+
Content-Type: application/json
|
46
|
+
runConfiguration:
|
47
|
+
retryOptions:
|
48
|
+
duration: 2
|
49
|
+
exitCodes:
|
50
|
+
- 1
|
51
|
+
exponentialBackoff: true
|
52
|
+
numberOfRetries: 3
|
53
|
+
step-3:
|
54
|
+
type: sql
|
55
|
+
repository:
|
56
|
+
branch: main
|
57
|
+
token: random_token
|
58
|
+
url: "https://example.com"
|
59
|
+
filePath: "path/to/file.sql"
|
60
|
+
parameters:
|
61
|
+
env:
|
62
|
+
key1: value1
|
63
|
+
key2: value2
|
64
|
+
inherit:
|
65
|
+
key3: value3
|
66
|
+
key4: value4
|
67
|
+
runConfiguration:
|
68
|
+
retryOptions:
|
69
|
+
duration: 2
|
70
|
+
exitCodes:
|
71
|
+
- 1
|
72
|
+
exponentialBackoff: true
|
73
|
+
numberOfRetries: 3
|
74
|
+
step-4:
|
75
|
+
type: export
|
76
|
+
schema: schema_name
|
77
|
+
table: table_name
|
78
|
+
sortBy: column_name
|
79
|
+
sortOrder: asc
|
80
|
+
compression: false
|
81
|
+
runConfiguration:
|
82
|
+
retryOptions:
|
83
|
+
duration: 2
|
84
|
+
exitCodes:
|
85
|
+
- 1
|
86
|
+
exponentialBackoff: true
|
87
|
+
numberOfRetries: 3
|
@@ -3,13 +3,13 @@
|
|
3
3
|
body:
|
4
4
|
name: new-workflow
|
5
5
|
triggers:
|
6
|
-
- cron:
|
6
|
+
- cron: 0 0 * * *
|
7
7
|
steps:
|
8
8
|
step-1:
|
9
9
|
type: standard
|
10
10
|
imageId: 100
|
11
11
|
imageVersionId: 100
|
12
|
-
command:
|
12
|
+
command: python script1.py > output.txt
|
13
13
|
resources:
|
14
14
|
instanceTypeId: 21
|
15
15
|
storage: 10GB
|
@@ -21,16 +21,17 @@ body:
|
|
21
21
|
token: random_token
|
22
22
|
url: "https://github.com/org/repo"
|
23
23
|
outputParameters:
|
24
|
-
scriptOutput:
|
24
|
+
scriptOutput: output.txt
|
25
25
|
step-2:
|
26
26
|
type: standard
|
27
27
|
imageId: 100
|
28
28
|
imageVersionId: 100
|
29
|
-
command:
|
29
|
+
command: python script2.py
|
30
30
|
resources:
|
31
31
|
instanceTypeId: 21
|
32
32
|
storage: 10GB
|
33
|
-
parents:
|
33
|
+
parents:
|
34
|
+
- step-1
|
34
35
|
stepTimeout: 30
|
35
36
|
clearImageCache: true
|
36
37
|
repository:
|
@@ -39,13 +40,77 @@ body:
|
|
39
40
|
url: "https://github.com/org/repo"
|
40
41
|
executionParameters:
|
41
42
|
conditional:
|
42
|
-
- condition:
|
43
|
-
paramName:
|
44
|
-
stepName:
|
45
|
-
value:
|
43
|
+
- condition: equals
|
44
|
+
paramName: scriptOutput
|
45
|
+
stepName: step-1
|
46
|
+
value: output-value
|
46
47
|
parentStatus:
|
47
|
-
- condition:
|
48
|
+
- condition: one-of
|
48
49
|
parents:
|
49
50
|
- step-1
|
50
51
|
status:
|
51
52
|
- success
|
53
|
+
step-3:
|
54
|
+
type: http
|
55
|
+
parents:
|
56
|
+
- step-1
|
57
|
+
url: "https://peak.ai"
|
58
|
+
payload: "{}"
|
59
|
+
auth:
|
60
|
+
type: bearer-token
|
61
|
+
bearerToken: token
|
62
|
+
headers:
|
63
|
+
absolute:
|
64
|
+
Content-Type: application/json
|
65
|
+
executionParameters:
|
66
|
+
conditional:
|
67
|
+
- condition: equals
|
68
|
+
paramName: scriptOutput
|
69
|
+
stepName: step-1
|
70
|
+
value: output-value
|
71
|
+
parentStatus:
|
72
|
+
- condition: all-of
|
73
|
+
parents:
|
74
|
+
- step-1
|
75
|
+
status:
|
76
|
+
- success
|
77
|
+
step-4:
|
78
|
+
type: sql
|
79
|
+
repository:
|
80
|
+
branch: main
|
81
|
+
token: random_token
|
82
|
+
url: "https://example.com"
|
83
|
+
filePath: "path/to/file.sql"
|
84
|
+
parameters:
|
85
|
+
env:
|
86
|
+
key1: value1
|
87
|
+
key2: value2
|
88
|
+
inherit:
|
89
|
+
key3: value3
|
90
|
+
key4: value4
|
91
|
+
executionParameters:
|
92
|
+
conditional:
|
93
|
+
- condition: equals
|
94
|
+
paramName: scriptOutput
|
95
|
+
stepName: step-1
|
96
|
+
value: output-value
|
97
|
+
parentStatus:
|
98
|
+
- condition: all-of
|
99
|
+
parents:
|
100
|
+
- step-1
|
101
|
+
status:
|
102
|
+
- success
|
103
|
+
step-5:
|
104
|
+
type: export
|
105
|
+
schema: schema_name
|
106
|
+
table: table_name
|
107
|
+
sortBy: column_name
|
108
|
+
sortOrder: asc
|
109
|
+
compression: false
|
110
|
+
executionParameters:
|
111
|
+
parentStatus:
|
112
|
+
- condition: all-of
|
113
|
+
parents:
|
114
|
+
- step-4
|
115
|
+
status:
|
116
|
+
- success
|