-
Notifications
You must be signed in to change notification settings - Fork 57
82 lines (69 loc) · 2.24 KB
/
Copy pathdocker-optional.yml
File metadata and controls
82 lines (69 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Optional Docker Workbench
on:
workflow_dispatch:
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
permissions:
contents: read
jobs:
dev-smoke:
name: dev-smoke
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Build dev image
run: docker build -f docker/dev/Dockerfile -t spark-cli-dev:ci .
- name: Run dev smoke
run: docker run --rm spark-cli-dev:ci
sandbox-smoke:
name: sandbox-smoke
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Build sandbox image
run: docker build -f docker/sandbox/Dockerfile -t spark-cli-sandbox:ci .
- name: Run sandbox help with hardened flags
run: |
docker run --rm \
--user 1000:1000 \
--network none \
--read-only \
--cap-drop ALL \
--security-opt no-new-privileges \
--pids-limit 128 \
--memory 512m \
--memory-swap 512m \
--cpus 1.0 \
--tmpfs /tmp:rw,noexec,nosuid,size=256m \
--tmpfs /sandbox:rw,noexec,nosuid,uid=1000,gid=1000,size=512m \
spark-cli-sandbox:ci \
--help
live-smoke:
name: live-smoke
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Build live image
run: docker build -f docker/live/Dockerfile -t spark-live:ci .
- name: Run live CLI smoke
run: docker run --rm --user spark --entrypoint spark spark-live:ci --help
- name: Verify live entrypoint fails closed without hosted env
run: |
set +e
docker run --rm spark-live:ci >spark-live-entrypoint.out 2>&1
status="$?"
set -e
test "$status" -eq 2
grep -q "SPARK_LLM_PROVIDER is required" spark-live-entrypoint.out