Skip to content

Commit 6b91852

Browse files
authored
Merge pull request #229 from code0-tech/3-setup-sculptor-builds
Setup sculptor builds
2 parents 415bbb6 + 266a46f commit 6b91852

File tree

8 files changed

+150
-0
lines changed

8 files changed

+150
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
# generated dockerfiles
55
container/sagittarius/Dockerfile
6+
container/sculptor/Dockerfile
67

78
# downloaded projects
89
projects

.gitlab/ci/container-boot.gitlab-ci.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,23 @@ container:boot:draco:
106106
- docker compose logs draco -f &
107107
- support/grpc_check_health --host docker:8083 --service liveness --retries 20
108108
- support/grpc_check_health --host docker:8083 --service readiness --retries 20
109+
110+
container:boot:sculptor:
111+
extends:
112+
- .container:boot
113+
needs:
114+
- manifest:sculptor
115+
parallel:
116+
matrix:
117+
- SCULPTOR_VARIANT:
118+
- ce
119+
- ee
120+
- cloud
121+
PLATFORM:
122+
- amd64
123+
- arm64
124+
script:
125+
- docker compose up sculptor -d
126+
- docker ps --all
127+
- docker compose logs sculptor -f &
128+
- docker compose run curl-sculptor

.gitlab/ci/container-build.gitlab-ci.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,3 +197,50 @@ manifest:sagittarius:
197197
PLATFORM:
198198
- amd64
199199
- arm64
200+
201+
container:node:
202+
extends:
203+
- .single-image-build-base
204+
needs:
205+
- manifest:mise
206+
207+
manifest:node:
208+
extends:
209+
- .manifest-create-base
210+
needs:
211+
- container:node
212+
213+
container:sculptor:
214+
extends:
215+
- .variant-image-build-base
216+
needs:
217+
- manifest:node
218+
variables:
219+
NEED_PROJECT_DOWNLOAD: 'true'
220+
parallel:
221+
matrix:
222+
- VARIANT:
223+
- ce
224+
- ee
225+
- cloud
226+
PLATFORM:
227+
- amd64
228+
- arm64
229+
230+
manifest:sculptor:
231+
extends:
232+
- .manifest-create-base
233+
parallel:
234+
matrix:
235+
- VARIANT:
236+
- ce
237+
- ee
238+
- cloud
239+
needs:
240+
- job: container:sculptor
241+
parallel:
242+
matrix:
243+
- VARIANT: [ '$[[ matrix.VARIANT ]]' ]
244+
PLATFORM:
245+
- amd64
246+
- arm64

container/node/Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
ARG RETICULUM_IMAGE_TAG=local
2+
ARG NODE_VERSION=24.8.0
3+
4+
FROM node:$NODE_VERSION-alpine AS node_image
5+
FROM ghcr.io/code0-tech/reticulum/ci-builds/mise:$RETICULUM_IMAGE_TAG
6+
7+
COPY --from=node_image /usr/lib /usr/lib
8+
COPY --from=node_image /usr/local/lib /usr/local/lib
9+
COPY --from=node_image /usr/local/include /usr/local/include
10+
COPY --from=node_image /usr/local/bin /usr/local/bin
11+
ENV PATH=/usr/local/bin:$PATH

container/sculptor/Dockerfile.erb

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
ARG RETICULUM_IMAGE_TAG=local
2+
3+
FROM ghcr.io/code0-tech/reticulum/ci-builds/node:$RETICULUM_IMAGE_TAG
4+
5+
WORKDIR /sculptor
6+
7+
COPY projects/sculptor/edition.mjs \
8+
projects/sculptor/next.config.ts \
9+
projects/sculptor/package-lock.json \
10+
projects/sculptor/package.json \
11+
projects/sculptor/tsconfig.json \
12+
.
13+
14+
RUN npm ci
15+
16+
COPY projects/sculptor/src/app src/app
17+
COPY projects/sculptor/src/packages/ce src/packages/ce
18+
19+
<% if ee? || cloud? %>
20+
COPY projects/sculptor/src/packages/ee src/packages/ee
21+
<% end %>
22+
23+
<% if cloud? %>
24+
COPY projects/sculptor/src/packages/cloud src/packages/cloud
25+
<% end %>
26+
27+
ENV EDITION=<%= variant %>
28+
29+
RUN npm run build
30+
31+
ENTRYPOINT ["npm", "run", "start"]
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/env ruby
2+
3+
require 'erb'
4+
require 'fileutils'
5+
6+
def ee?
7+
ENV['VARIANT'].eql?('ee')
8+
end
9+
10+
def cloud?
11+
ENV['VARIANT'].eql?('cloud')
12+
end
13+
14+
def variant
15+
ENV['VARIANT']
16+
end
17+
18+
template = ERB.new(File.read("#{__dir__}/Dockerfile.erb"), trim_mode: '-')
19+
File.write("#{__dir__}/Dockerfile", template.result)

support/docker-compose.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,25 @@ services:
8787
ports:
8888
- "8083:8083"
8989

90+
sculptor:
91+
image: ghcr.io/code0-tech/reticulum/ci-builds/sculptor:${CI_PIPELINE_ID}-${SCULPTOR_VARIANT}
92+
networks:
93+
- boot
94+
95+
curl-sculptor:
96+
image: curlimages/curl:8.16.0
97+
networks:
98+
- boot
99+
command:
100+
- curl
101+
- --fail
102+
- -sv
103+
- --retry
104+
- "20"
105+
- --retry-delay
106+
- "3"
107+
- --retry-connrefused
108+
- http://sculptor:3000/
109+
90110
networks:
91111
boot:

versions/sculptor

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
5cd6432f166b416449b5eed50005e4fe703b6913

0 commit comments

Comments
 (0)