stoobly-agent 1.2.3__py3-none-any.whl → 1.3.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.
- stoobly_agent/__init__.py +1 -1
- stoobly_agent/app/cli/helpers/certificate_authority.py +1 -5
- stoobly_agent/app/cli/scaffold/app.py +14 -32
- stoobly_agent/app/cli/scaffold/app_command.py +4 -7
- stoobly_agent/app/cli/scaffold/app_config.py +15 -2
- stoobly_agent/app/cli/scaffold/app_create_command.py +18 -2
- stoobly_agent/app/cli/scaffold/command.py +1 -1
- stoobly_agent/app/cli/scaffold/constants.py +9 -3
- stoobly_agent/app/cli/scaffold/docker/app_builder.py +3 -7
- stoobly_agent/app/cli/scaffold/docker/constants.py +0 -1
- stoobly_agent/app/cli/scaffold/docker/service/builder.py +12 -11
- stoobly_agent/app/cli/scaffold/docker/workflow/builder.py +14 -31
- stoobly_agent/app/cli/scaffold/docker/workflow/mock_decorator.py +6 -2
- stoobly_agent/app/cli/scaffold/docker/workflow/reverse_proxy_decorator.py +6 -2
- stoobly_agent/app/cli/scaffold/service.py +1 -1
- stoobly_agent/app/cli/scaffold/service_command.py +1 -1
- stoobly_agent/app/cli/scaffold/service_workflow_validate_command.py +6 -8
- stoobly_agent/app/cli/scaffold/templates/app/.Dockerfile.context +2 -4
- stoobly_agent/app/cli/scaffold/templates/app/.Makefile +37 -21
- stoobly_agent/app/cli/scaffold/templates/app/.docker-compose.base.yml +8 -13
- stoobly_agent/app/cli/scaffold/templates/app/Makefile +1 -1
- stoobly_agent/app/cli/scaffold/templates/app/build/.docker-compose.base.yml +8 -4
- stoobly_agent/app/cli/scaffold/templates/app/build/mock/.docker-compose.mock.yml +2 -6
- stoobly_agent/app/cli/scaffold/templates/app/build/mock/bin/.configure +3 -0
- stoobly_agent/app/cli/scaffold/templates/app/build/mock/bin/.init +3 -0
- stoobly_agent/app/cli/scaffold/templates/app/build/record/.docker-compose.record.yml +2 -6
- stoobly_agent/app/cli/scaffold/templates/app/build/record/bin/.configure +3 -0
- stoobly_agent/app/cli/scaffold/templates/app/build/record/bin/.init +3 -0
- stoobly_agent/app/cli/scaffold/templates/app/build/test/.docker-compose.test.yml +2 -6
- stoobly_agent/app/cli/scaffold/templates/app/build/test/bin/.configure +3 -0
- stoobly_agent/app/cli/scaffold/templates/app/build/test/bin/.init +3 -0
- stoobly_agent/app/cli/scaffold/templates/app/entrypoint/.docker-compose.base.yml +2 -0
- stoobly_agent/app/cli/scaffold/templates/app/entrypoint/mock/.docker-compose.mock.yml +2 -8
- stoobly_agent/app/cli/scaffold/templates/app/entrypoint/record/.docker-compose.record.yml +2 -8
- stoobly_agent/app/cli/scaffold/templates/app/entrypoint/test/.docker-compose.test.yml +2 -8
- stoobly_agent/app/cli/scaffold/templates/app/stoobly-ui/exec/.docker-compose.exec.yml +2 -3
- stoobly_agent/app/cli/scaffold/templates/app/stoobly-ui/exec/bin/.logs +1 -0
- stoobly_agent/app/cli/scaffold/templates/app/stoobly-ui/mock/.docker-compose.mock.yml +1 -2
- stoobly_agent/app/cli/scaffold/templates/app/stoobly-ui/record/.docker-compose.record.yml +1 -2
- stoobly_agent/app/cli/scaffold/templates/workflow/mock/bin/.configure +3 -0
- stoobly_agent/app/cli/scaffold/templates/workflow/mock/bin/.init +7 -1
- stoobly_agent/app/cli/scaffold/templates/workflow/record/bin/.configure +3 -0
- stoobly_agent/app/cli/scaffold/templates/workflow/record/bin/.init +7 -1
- stoobly_agent/app/cli/scaffold/templates/workflow/test/bin/.configure +3 -0
- stoobly_agent/app/cli/scaffold/templates/workflow/test/bin/.init +7 -1
- stoobly_agent/app/cli/scaffold/validate_command.py +2 -2
- stoobly_agent/app/cli/scaffold/workflow.py +5 -4
- stoobly_agent/app/cli/scaffold/workflow_command.py +3 -3
- stoobly_agent/app/cli/scaffold/workflow_run_command.py +72 -36
- stoobly_agent/app/cli/scaffold_cli.py +51 -45
- stoobly_agent/app/cli/snapshot_cli.py +6 -2
- stoobly_agent/app/models/adapters/joined_request_adapter.py +6 -0
- stoobly_agent/app/models/factories/resource/local_db/helpers/scenario_snapshot.py +3 -1
- stoobly_agent/app/models/helpers/apply.py +34 -17
- stoobly_agent/app/models/helpers/create_request_params_service.py +4 -0
- stoobly_agent/app/proxy/replay/body_parser_service.py +11 -3
- stoobly_agent/config/data_dir.py +2 -1
- stoobly_agent/config/schema.yml +2 -2
- stoobly_agent/test/app/cli/scaffold/cli_invoker.py +1 -2
- stoobly_agent/test/app/cli/snapshot/snapshot_apply_test.py +162 -1
- stoobly_agent/test/app/models/schemas/.stoobly/db/VERSION +1 -1
- stoobly_agent/test/mock_data/scaffold/docker-compose-assets-service.yml +1 -3
- {stoobly_agent-1.2.3.dist-info → stoobly_agent-1.3.0.dist-info}/METADATA +1 -1
- {stoobly_agent-1.2.3.dist-info → stoobly_agent-1.3.0.dist-info}/RECORD +67 -68
- stoobly_agent/app/cli/scaffold/templates/app/.Dockerfile.proxy +0 -34
- {stoobly_agent-1.2.3.dist-info → stoobly_agent-1.3.0.dist-info}/LICENSE +0 -0
- {stoobly_agent-1.2.3.dist-info → stoobly_agent-1.3.0.dist-info}/WHEEL +0 -0
- {stoobly_agent-1.2.3.dist-info → stoobly_agent-1.3.0.dist-info}/entry_points.txt +0 -0
@@ -9,6 +9,8 @@
|
|
9
9
|
# Constants
|
10
10
|
DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
|
11
11
|
EXEC_WORKFLOW_NAME := exec
|
12
|
+
PULL_OPTION := $(if $(STOOBLY_IMAGE_USE_LOCAL),,--pull)
|
13
|
+
USER_ID := $(shell id -u)
|
12
14
|
|
13
15
|
CONTEXT_DIR_DEFAULT := $(realpath $(DIR)/../..)
|
14
16
|
|
@@ -17,32 +19,46 @@ app_dir=$$(realpath "$${STOOBLY_APP_DIR:-$(CONTEXT_DIR_DEFAULT)}")
|
|
17
19
|
ca_certs_dir=$$(realpath "$${STOOBLY_CA_CERTS_DIR:-$$(realpath ~)/.mitmproxy}")
|
18
20
|
certs_dir=$$(realpath "$${STOOBLY_CERTS_DIR:-$(app_data_dir)/certs}")
|
19
21
|
context_dir=$$(realpath "$${STOOBLY_CONTEXT_DIR:-$(CONTEXT_DIR_DEFAULT)}")
|
22
|
+
|
23
|
+
context_dir_option=--context-dir-path $(context_dir)
|
24
|
+
user_id_option=--user-id $(USER_ID)
|
25
|
+
stoobly_exec_options=--profile $(EXEC_WORKFLOW_NAME) -p $(EXEC_WORKFLOW_NAME)
|
26
|
+
workflow_down_options=$(user_id_option)
|
20
27
|
workflow_options=$${STOOBLY_WORKFLOW_OPTIONS:+$$STOOBLY_WORKFLOW_OPTIONS }
|
28
|
+
workflow_up_options=$(context_dir_option) --ca-certs-dir-path $(ca_certs_dir) --certs-dir-path $(certs_dir) --from-make $(user_id_option)
|
21
29
|
|
22
30
|
app_data_dir=$(app_dir)/.stoobly
|
23
|
-
|
31
|
+
app_namespace_dir=$(app_data_dir)/docker
|
24
32
|
app_tmp_dir=$(app_data_dir)/tmp
|
33
|
+
data_dir=$(context_dir)/.stoobly
|
34
|
+
dockerfile_path=$(app_namespace_dir)/.Dockerfile.context
|
35
|
+
docker_compose_file_path=$(app_namespace_dir)/stoobly-ui/exec/.docker-compose.exec.yml
|
36
|
+
workflow_run_script=$(app_data_dir)/tmp/run.sh
|
25
37
|
|
26
38
|
# Commands
|
27
|
-
|
39
|
+
docker_command=docker
|
40
|
+
docker_compose_command=$(docker_command) compose
|
41
|
+
exec_env=export CA_CERTS_DIR="$(ca_certs_dir)" && export USER_ID=$(USER_ID)
|
42
|
+
exec_up=$(docker_compose_command) -f "$(docker_compose_file_path)" $(stoobly_exec_options) up --remove-orphans
|
28
43
|
source_env=set -a; [ -f .env ] && source .env; set +a
|
29
44
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
stoobly_exec_build=$(docker_compose_command) -f "$(docker_compose_file_path)" $(stoobly_exec_build_args)
|
34
|
-
stoobly_exec_build_args=--profile $(EXEC_WORKFLOW_NAME) -p $(EXEC_WORKFLOW_NAME) build --pull --quiet
|
35
|
-
stoobly_exec_env=export CONTEXT_DIR=$(context_dir) && export USER_ID=$$UID && export CA_CERTS_DIR="$(ca_certs_dir)"
|
45
|
+
# Build base image
|
46
|
+
stoobly_exec_build=$(docker_command) build $(stoobly_exec_build_args) $(app_namespace_dir)
|
47
|
+
stoobly_exec_build_args=-f "$(dockerfile_path)" -t stoobly.$(USER_ID) --build-arg USER_ID=$(USER_ID) $(PULL_OPTION) --quiet
|
36
48
|
|
37
|
-
|
49
|
+
# Exec any
|
50
|
+
stoobly_exec=$(stoobly_exec_build) && $(stoobly_exec_env) && $(exec_up)
|
51
|
+
stoobly_exec_env=$(source_env) && $(exec_env) && export CONTEXT_DIR="$(context_dir)"
|
38
52
|
|
39
|
-
#
|
40
|
-
#
|
41
|
-
|
53
|
+
# Exec workflow run
|
54
|
+
# Because scaffold is stored in the application source code directory,
|
55
|
+
# when running a scaffold command from within a container,
|
56
|
+
# it needs access to $(app_dir) rather than $(context_dir)
|
57
|
+
stoobly_exec_run=$(stoobly_exec_build) && $(stoobly_exec_run_env) && $(exec_up)
|
58
|
+
stoobly_exec_run_env=$(source_env) && $(exec_env) && export CONTEXT_DIR="$(app_dir)"
|
42
59
|
|
43
|
-
|
44
|
-
|
45
|
-
workflow_run=$(workflow_run_env) && $(source_env) && bash "$(workflow_run_script)"
|
60
|
+
# Workflow run
|
61
|
+
workflow_run=$(source_env) && bash "$(workflow_run_script)"
|
46
62
|
|
47
63
|
certs:
|
48
64
|
@export EXEC_COMMAND=bin/.mkcert && \
|
@@ -67,7 +83,7 @@ intercept/enable:
|
|
67
83
|
$(stoobly_exec)
|
68
84
|
mock: nameservers
|
69
85
|
@export EXEC_COMMAND=bin/.up && \
|
70
|
-
export EXEC_OPTIONS="$(workflow_options)$(options)" && \
|
86
|
+
export EXEC_OPTIONS="$(workflow_up_options) $(workflow_options)$(options)" && \
|
71
87
|
export EXEC_ARGS="mock" && \
|
72
88
|
$(stoobly_exec_run) && \
|
73
89
|
$(workflow_run)
|
@@ -79,13 +95,13 @@ mock/logs:
|
|
79
95
|
$(workflow_run)
|
80
96
|
mock/down:
|
81
97
|
@export EXEC_COMMAND=bin/.down && \
|
82
|
-
export EXEC_OPTIONS="$(workflow_options)$(options)" && \
|
98
|
+
export EXEC_OPTIONS="$(workflow_down_options) $(workflow_options)$(options)" && \
|
83
99
|
export EXEC_ARGS="mock" && \
|
84
100
|
$(stoobly_exec_run) && \
|
85
101
|
$(workflow_run)
|
86
102
|
record: nameservers
|
87
103
|
@export EXEC_COMMAND=bin/.up && \
|
88
|
-
export EXEC_OPTIONS="$(workflow_options)$(options)" && \
|
104
|
+
export EXEC_OPTIONS="$(workflow_up_options) $(workflow_options)$(options)" && \
|
89
105
|
export EXEC_ARGS="record" && \
|
90
106
|
$(stoobly_exec_run) && \
|
91
107
|
$(workflow_run)
|
@@ -97,7 +113,7 @@ record/logs:
|
|
97
113
|
$(workflow_run)
|
98
114
|
record/down:
|
99
115
|
@export EXEC_COMMAND=bin/.down && \
|
100
|
-
export EXEC_OPTIONS="$(workflow_options)$(options)" && \
|
116
|
+
export EXEC_OPTIONS="$(workflow_down_options) $(workflow_options)$(options)" && \
|
101
117
|
export EXEC_ARGS="record" && \
|
102
118
|
$(stoobly_exec_run) && \
|
103
119
|
$(workflow_run)
|
@@ -132,7 +148,7 @@ scenario/snapshot:
|
|
132
148
|
$(stoobly_exec)
|
133
149
|
test:
|
134
150
|
@export EXEC_COMMAND=bin/.up && \
|
135
|
-
export EXEC_OPTIONS="$(workflow_options)$(options)" && \
|
151
|
+
export EXEC_OPTIONS="$(workflow_up_options) $(workflow_options)$(options)" && \
|
136
152
|
export EXEC_ARGS="test" && \
|
137
153
|
$(stoobly_exec_run) && \
|
138
154
|
$(workflow_run)
|
@@ -144,7 +160,7 @@ test/logs:
|
|
144
160
|
$(workflow_run)
|
145
161
|
test/down:
|
146
162
|
@export EXEC_COMMAND=bin/.down && \
|
147
|
-
export EXEC_OPTIONS="$(workflow_options)$(options)" && \
|
163
|
+
export EXEC_OPTIONS="$(workflow_down_options) $(workflow_options)$(options)" && \
|
148
164
|
export EXEC_ARGS="test" && \
|
149
165
|
$(stoobly_exec_run) && \
|
150
166
|
$(workflow_run)
|
@@ -1,18 +1,13 @@
|
|
1
1
|
services:
|
2
|
-
ui_base:
|
3
|
-
extends:
|
4
|
-
service: context_base
|
5
|
-
volumes:
|
6
|
-
- ${CA_CERTS_DIR}:/home/stoobly/.mitmproxy
|
7
2
|
context_base:
|
8
|
-
|
9
|
-
|
10
|
-
USER_ID: ${USER_ID}
|
11
|
-
dockerfile: ./.Dockerfile.context
|
3
|
+
extends:
|
4
|
+
service: stoobly_base
|
12
5
|
volumes:
|
13
6
|
- ${CONTEXT_DIR}/.stoobly:/home/stoobly/.stoobly
|
14
|
-
|
15
|
-
|
16
|
-
|
7
|
+
stoobly_base:
|
8
|
+
image: stoobly.${USER_ID}
|
9
|
+
ui_base:
|
17
10
|
extends:
|
18
|
-
service: context_base
|
11
|
+
service: context_base
|
12
|
+
volumes:
|
13
|
+
- ${CA_CERTS_DIR}:/home/stoobly/.mitmproxy
|
@@ -1,11 +1,15 @@
|
|
1
1
|
services:
|
2
2
|
build.init_base:
|
3
|
-
command:
|
3
|
+
command:
|
4
|
+
- bin/.init
|
4
5
|
extends:
|
5
6
|
file: ../.docker-compose.base.yml
|
6
|
-
service:
|
7
|
+
service: context_base
|
8
|
+
working_dir: /home/stoobly/.stoobly/docker/build/${WORKFLOW_NAME}
|
7
9
|
build.configure_base:
|
8
|
-
command:
|
10
|
+
command:
|
11
|
+
- bin/.configure
|
9
12
|
extends:
|
10
13
|
file: ../.docker-compose.base.yml
|
11
|
-
service:
|
14
|
+
service: context_base
|
15
|
+
working_dir: /home/stoobly/.stoobly/docker/build/${WORKFLOW_NAME}
|
@@ -1,22 +1,18 @@
|
|
1
1
|
services:
|
2
2
|
build.init:
|
3
|
-
build:
|
4
|
-
context: ./
|
5
|
-
dockerfile: ../../.Dockerfile.context
|
6
3
|
extends:
|
7
4
|
file: ../.docker-compose.base.yml
|
8
5
|
service: build.init_base
|
6
|
+
image: stoobly.${USER_ID}
|
9
7
|
profiles:
|
10
8
|
- mock
|
11
9
|
build.configure:
|
12
|
-
build:
|
13
|
-
context: ./
|
14
|
-
dockerfile: ../../.Dockerfile.context
|
15
10
|
depends_on:
|
16
11
|
build.init:
|
17
12
|
condition: service_completed_successfully
|
18
13
|
extends:
|
19
14
|
file: ../.docker-compose.base.yml
|
20
15
|
service: build.configure_base
|
16
|
+
image: stoobly.${USER_ID}
|
21
17
|
profiles:
|
22
18
|
- mock
|
@@ -1,22 +1,18 @@
|
|
1
1
|
services:
|
2
2
|
build.init:
|
3
|
-
build:
|
4
|
-
context: ./
|
5
|
-
dockerfile: ../../.Dockerfile.context
|
6
3
|
extends:
|
7
4
|
file: ../.docker-compose.base.yml
|
8
5
|
service: build.init_base
|
6
|
+
image: stoobly.${USER_ID}
|
9
7
|
profiles:
|
10
8
|
- record
|
11
9
|
build.configure:
|
12
|
-
build:
|
13
|
-
context: ./
|
14
|
-
dockerfile: ../../.Dockerfile.context
|
15
10
|
depends_on:
|
16
11
|
build.init:
|
17
12
|
condition: service_completed_successfully
|
18
13
|
extends:
|
19
14
|
file: ../.docker-compose.base.yml
|
20
15
|
service: build.configure_base
|
16
|
+
image: stoobly.${USER_ID}
|
21
17
|
profiles:
|
22
18
|
- record
|
@@ -1,22 +1,18 @@
|
|
1
1
|
services:
|
2
2
|
build.init:
|
3
|
-
build:
|
4
|
-
context: ./
|
5
|
-
dockerfile: ../../.Dockerfile.context
|
6
3
|
extends:
|
7
4
|
file: ../.docker-compose.base.yml
|
8
5
|
service: build.init_base
|
6
|
+
image: stoobly.${USER_ID}
|
9
7
|
profiles:
|
10
8
|
- test
|
11
9
|
build.configure:
|
12
|
-
build:
|
13
|
-
context: ./
|
14
|
-
dockerfile: ../../.Dockerfile.context
|
15
10
|
depends_on:
|
16
11
|
build.init:
|
17
12
|
condition: service_completed_successfully
|
18
13
|
extends:
|
19
14
|
file: ../.docker-compose.base.yml
|
20
15
|
service: build.configure_base
|
16
|
+
image: stoobly.${USER_ID}
|
21
17
|
profiles:
|
22
18
|
- test
|
@@ -7,6 +7,7 @@ services:
|
|
7
7
|
extends:
|
8
8
|
file: ../.docker-compose.base.yml
|
9
9
|
service: context_base
|
10
|
+
working_dir: /home/stoobly/.stoobly/docker/entrypoint/${WORKFLOW_NAME}
|
10
11
|
entrypoint.init_base:
|
11
12
|
command:
|
12
13
|
- bin/.init
|
@@ -14,3 +15,4 @@ services:
|
|
14
15
|
extends:
|
15
16
|
file: ../.docker-compose.base.yml
|
16
17
|
service: context_base
|
18
|
+
working_dir: /home/stoobly/.stoobly/docker/entrypoint/${WORKFLOW_NAME}
|
@@ -3,9 +3,6 @@ networks:
|
|
3
3
|
name: entrypoint
|
4
4
|
services:
|
5
5
|
entrypoint.configure:
|
6
|
-
build:
|
7
|
-
context: ./
|
8
|
-
dockerfile: ../../.Dockerfile.context
|
9
6
|
depends_on:
|
10
7
|
entrypoint.init:
|
11
8
|
condition: service_completed_successfully
|
@@ -13,19 +10,16 @@ services:
|
|
13
10
|
extends:
|
14
11
|
file: ../.docker-compose.base.yml
|
15
12
|
service: entrypoint.configure_base
|
13
|
+
image: stoobly.${USER_ID}
|
16
14
|
profiles:
|
17
15
|
- mock
|
18
16
|
volumes: []
|
19
17
|
entrypoint.init:
|
20
|
-
build:
|
21
|
-
context: ./
|
22
|
-
dockerfile: ../../.Dockerfile.context
|
23
18
|
environment: {}
|
24
19
|
extends:
|
25
20
|
file: ../.docker-compose.base.yml
|
26
21
|
service: entrypoint.init_base
|
22
|
+
image: stoobly.${USER_ID}
|
27
23
|
profiles:
|
28
24
|
- mock
|
29
|
-
volumes:
|
30
|
-
- ./dist:/home/stoobly/dist
|
31
25
|
volumes: {}
|
@@ -3,9 +3,6 @@ networks:
|
|
3
3
|
name: entrypoint
|
4
4
|
services:
|
5
5
|
entrypoint.configure:
|
6
|
-
build:
|
7
|
-
context: ./
|
8
|
-
dockerfile: ../../.Dockerfile.context
|
9
6
|
depends_on:
|
10
7
|
entrypoint.init:
|
11
8
|
condition: service_completed_successfully
|
@@ -13,19 +10,16 @@ services:
|
|
13
10
|
extends:
|
14
11
|
file: ../.docker-compose.base.yml
|
15
12
|
service: entrypoint.configure_base
|
13
|
+
image: stoobly.${USER_ID}
|
16
14
|
profiles:
|
17
15
|
- record
|
18
16
|
volumes: []
|
19
17
|
entrypoint.init:
|
20
|
-
build:
|
21
|
-
context: ./
|
22
|
-
dockerfile: ../../.Dockerfile.context
|
23
18
|
environment: {}
|
24
19
|
extends:
|
25
20
|
file: ../.docker-compose.base.yml
|
26
21
|
service: entrypoint.init_base
|
22
|
+
image: stoobly.${USER_ID}
|
27
23
|
profiles:
|
28
24
|
- record
|
29
|
-
volumes:
|
30
|
-
- ./dist:/home/stoobly/dist
|
31
25
|
volumes: {}
|
@@ -3,9 +3,6 @@ networks:
|
|
3
3
|
name: entrypoint
|
4
4
|
services:
|
5
5
|
entrypoint.configure:
|
6
|
-
build:
|
7
|
-
context: ./
|
8
|
-
dockerfile: ../../.Dockerfile.context
|
9
6
|
depends_on:
|
10
7
|
entrypoint.init:
|
11
8
|
condition: service_completed_successfully
|
@@ -13,19 +10,16 @@ services:
|
|
13
10
|
extends:
|
14
11
|
file: ../.docker-compose.base.yml
|
15
12
|
service: entrypoint.configure_base
|
13
|
+
image: stoobly.${USER_ID}
|
16
14
|
profiles:
|
17
15
|
- test
|
18
16
|
volumes: []
|
19
17
|
entrypoint.init:
|
20
|
-
build:
|
21
|
-
context: ./
|
22
|
-
dockerfile: ../../.Dockerfile.context
|
23
18
|
environment: {}
|
24
19
|
extends:
|
25
20
|
file: ../.docker-compose.base.yml
|
26
21
|
service: entrypoint.init_base
|
22
|
+
image: stoobly.${USER_ID}
|
27
23
|
profiles:
|
28
24
|
- test
|
29
|
-
volumes:
|
30
|
-
- ./dist:/home/stoobly/dist
|
31
25
|
volumes: {}
|
@@ -1,12 +1,11 @@
|
|
1
1
|
services:
|
2
2
|
stoobly_ui.command:
|
3
|
-
|
4
|
-
dockerfile: ../../.Dockerfile.context
|
5
|
-
command: ['${EXEC_COMMAND}', '${EXEC_ARGS}']
|
3
|
+
command: ['.stoobly/docker/stoobly-ui/exec/${EXEC_COMMAND}', '${EXEC_ARGS}']
|
6
4
|
environment:
|
7
5
|
EXEC_OPTIONS: ${EXEC_OPTIONS}
|
8
6
|
extends:
|
9
7
|
file: ../.docker-compose.base.yml
|
10
8
|
service: stoobly_ui.base
|
9
|
+
image: stoobly.${USER_ID}
|
11
10
|
profiles:
|
12
11
|
- exec
|
@@ -1,7 +1,13 @@
|
|
1
1
|
#!/bin/bash
|
2
2
|
|
3
|
-
|
3
|
+
# This file was automatically generated. DO NOT EDIT.
|
4
|
+
# Any changes made to this file will be overwritten.
|
5
|
+
|
6
|
+
if [ -n "$SERVICE_HOSTNAME" ] && [ "$SERVICE_SCHEME" = "https" ]; then
|
7
|
+
stoobly-agent ca-cert mkcert $SERVICE_HOSTNAME
|
8
|
+
fi
|
4
9
|
|
10
|
+
entrypoint=$(dirname -- "$0")/init
|
5
11
|
if [ -e "$entrypoint" ]; then
|
6
12
|
"$entrypoint"
|
7
13
|
fi
|
@@ -1,7 +1,13 @@
|
|
1
1
|
#!/bin/bash
|
2
2
|
|
3
|
-
|
3
|
+
# This file was automatically generated. DO NOT EDIT.
|
4
|
+
# Any changes made to this file will be overwritten.
|
5
|
+
|
6
|
+
if [ -n "$SERVICE_HOSTNAME" ] && [ "$SERVICE_SCHEME" = "https" ] ; then
|
7
|
+
stoobly-agent ca-cert mkcert $SERVICE_HOSTNAME
|
8
|
+
fi
|
4
9
|
|
10
|
+
entrypoint=$(dirname -- "$0")/init
|
5
11
|
if [ -e "$entrypoint" ]; then
|
6
12
|
"$entrypoint"
|
7
13
|
fi
|
@@ -1,7 +1,13 @@
|
|
1
1
|
#!/bin/bash
|
2
2
|
|
3
|
-
|
3
|
+
# This file was automatically generated. DO NOT EDIT.
|
4
|
+
# Any changes made to this file will be overwritten.
|
5
|
+
|
6
|
+
if [ -n "$SERVICE_HOSTNAME" ] && [ "$SERVICE_SCHEME" = "https" ]; then
|
7
|
+
stoobly-agent ca-cert mkcert $SERVICE_HOSTNAME
|
8
|
+
fi
|
4
9
|
|
10
|
+
entrypoint=$(dirname -- "$0")/init
|
5
11
|
if [ -e "$entrypoint" ]; then
|
6
12
|
"$entrypoint"
|
7
13
|
fi
|
@@ -35,7 +35,7 @@ class ValidateCommand():
|
|
35
35
|
if logs and re.search('error', str(logs), re.IGNORECASE):
|
36
36
|
raise ScaffoldValidateException(f"Error logs potentially detected in: {init_container_name}")
|
37
37
|
if init_container.status != 'exited' or init_container.attrs['State']['ExitCode'] != 0:
|
38
|
-
raise ScaffoldValidateException(f"init container
|
38
|
+
raise ScaffoldValidateException(f"init container {init_container_name} exited with: {init_container.attrs['State']['ExitCode']}")
|
39
39
|
|
40
40
|
configure_container = self.__get_container(configure_container_name)
|
41
41
|
|
@@ -43,7 +43,7 @@ class ValidateCommand():
|
|
43
43
|
if configure_container.status == 'exited' and configure_container.attrs['State']['ExitCode'] == 0:
|
44
44
|
configure_container_ran = True
|
45
45
|
if not configure_container_ran:
|
46
|
-
raise ScaffoldValidateException(f"
|
46
|
+
raise ScaffoldValidateException(f"configure container {configure_container_name} exited with: {configure_container.attrs['State']['ExitCode']}")
|
47
47
|
|
48
48
|
def validate_detached(self, container: Container) -> None:
|
49
49
|
print(f"Validating detached for: {container.name}")
|
@@ -33,14 +33,15 @@ class Workflow():
|
|
33
33
|
|
34
34
|
@property
|
35
35
|
def service_paths(self):
|
36
|
-
|
36
|
+
all_service_paths = self.app.service_paths
|
37
|
+
return list(filter(lambda path: os.path.exists(os.path.join(path, self.workflow_name)), all_service_paths))
|
37
38
|
|
38
39
|
# TODO: merge into 1 services property
|
39
40
|
|
40
41
|
# Returns services that run in this specific workflow
|
41
42
|
@property
|
42
43
|
def services_ran(self) -> List[str]:
|
43
|
-
services_dir = os.path.join(self.app.
|
44
|
+
services_dir = os.path.join(self.app.data_dir_path, self.app.scaffold_namespace)
|
44
45
|
|
45
46
|
services = []
|
46
47
|
for filename in os.listdir(services_dir):
|
@@ -56,5 +57,5 @@ class Workflow():
|
|
56
57
|
return services
|
57
58
|
|
58
59
|
def service_paths_from_services(self, services: List[str]):
|
59
|
-
|
60
|
-
return list(map(lambda service: os.path.join(
|
60
|
+
scaffold_namespace_path = self.app.scaffold_namespace_path
|
61
|
+
return list(map(lambda service: os.path.join(scaffold_namespace_path, service), services))
|
@@ -26,7 +26,7 @@ class WorkflowCommand(ServiceCommand):
|
|
26
26
|
@property
|
27
27
|
def compose_path(self):
|
28
28
|
return os.path.join(
|
29
|
-
self.
|
29
|
+
self.data_dir_path,
|
30
30
|
self.compose_relative_path
|
31
31
|
)
|
32
32
|
|
@@ -70,7 +70,7 @@ class WorkflowCommand(ServiceCommand):
|
|
70
70
|
@property
|
71
71
|
def custom_compose_path(self):
|
72
72
|
return os.path.join(
|
73
|
-
self.
|
73
|
+
self.data_dir_path,
|
74
74
|
self.custom_compose_relative_path
|
75
75
|
)
|
76
76
|
|
@@ -114,7 +114,7 @@ class WorkflowCommand(ServiceCommand):
|
|
114
114
|
@property
|
115
115
|
def workflow_path(self):
|
116
116
|
return os.path.join(
|
117
|
-
self.
|
117
|
+
self.data_dir_path,
|
118
118
|
self.workflow_relative_path
|
119
119
|
)
|
120
120
|
|