Skip to content

Commit 268b41a

Browse files
committed
build: Build from shared build files
Uses shared build scripts from owned Containerfile.
1 parent d2f86ae commit 268b41a

File tree

3 files changed

+32
-124
lines changed

3 files changed

+32
-124
lines changed

.tekton/provisioning-frontend-pull-request.yaml

Lines changed: 1 addition & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ spec:
2727
- name: image-expires-after
2828
value: 5d
2929
- name: dockerfile
30-
value: Dockerfile
30+
value: deploy/Containerfile
3131
- name: path-context
3232
value: .
3333
pipelineSpec:
@@ -214,66 +214,6 @@ spec:
214214
workspace: git-auth
215215
- name: netrc
216216
workspace: netrc
217-
- name: parse-build-deploy-script
218-
params:
219-
- name: path-context
220-
value: $(params.path-context)
221-
taskRef:
222-
resolver: git
223-
params:
224-
- name: url
225-
value: https://github.com/RedHatInsights/konflux-consoledot-frontend-build
226-
- name: revision
227-
value: 2fcdfa9b4858ac941b50ad37317c4f9aaabf91b4
228-
- name: pathInRepo
229-
value: tasks/parse-build-deploy-script/parse-build-deploy-script.yaml
230-
workspaces:
231-
- name: source
232-
workspace: workspace
233-
runAfter:
234-
- clone-repository
235-
- name: create-frontend-dockerfile
236-
taskRef:
237-
resolver: git
238-
params:
239-
- name: url
240-
value: https://github.com/RedHatInsights/konflux-consoledot-frontend-build
241-
- name: revision
242-
value: 2fcdfa9b4858ac941b50ad37317c4f9aaabf91b4
243-
- name: pathInRepo
244-
value: tasks/create-frontend-dockerfile/create-frontend-dockerfile.yaml
245-
workspaces:
246-
- name: source
247-
workspace: workspace
248-
params:
249-
- name: path-context
250-
value: $(params.path-context)
251-
- name: component
252-
value: $(tasks.parse-build-deploy-script.results.component)
253-
- name: image
254-
value: $(tasks.parse-build-deploy-script.results.image)
255-
- name: node-build-version
256-
value: $(tasks.parse-build-deploy-script.results.node-build-version)
257-
- name: quay-expire-time
258-
value: $(tasks.parse-build-deploy-script.results.quay-expire-time)
259-
- name: npm-build-script
260-
value: $(tasks.parse-build-deploy-script.results.npm-build-script)
261-
- name: yarn-build-script
262-
value: $(tasks.parse-build-deploy-script.results.yarn-build-script)
263-
- name: route-path
264-
value: $(tasks.parse-build-deploy-script.results.route-path)
265-
- name: beta-route-path
266-
value: $(tasks.parse-build-deploy-script.results.beta-route-path)
267-
- name: preview-route-path
268-
value: $(tasks.parse-build-deploy-script.results.preview-route-path)
269-
- name: ci-root
270-
value: $(tasks.parse-build-deploy-script.results.ci-root)
271-
- name: server-name
272-
value: $(tasks.parse-build-deploy-script.results.server-name)
273-
- name: dist-folder
274-
value: $(tasks.parse-build-deploy-script.results.dist-folder)
275-
runAfter:
276-
- parse-build-deploy-script
277217
- name: clone-repository-oci-ta
278218
params:
279219
- name: url
@@ -366,7 +306,6 @@ spec:
366306
value: $(params.build-args-file)
367307
runAfter:
368308
- prefetch-dependencies
369-
- create-frontend-dockerfile
370309
taskRef:
371310
params:
372311
- name: name

.tekton/provisioning-frontend-push.yaml

Lines changed: 1 addition & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ spec:
2424
- name: output-image
2525
value: quay.io/redhat-user-workloads/insights-management-tenant/insights-provisioning/provisioning-frontend:{{revision}}
2626
- name: dockerfile
27-
value: Dockerfile
27+
value: deploy/Containerfile
2828
- name: path-context
2929
value: .
3030
pipelineSpec:
@@ -211,66 +211,6 @@ spec:
211211
workspace: git-auth
212212
- name: netrc
213213
workspace: netrc
214-
- name: parse-build-deploy-script
215-
params:
216-
- name: path-context
217-
value: $(params.path-context)
218-
taskRef:
219-
resolver: git
220-
params:
221-
- name: url
222-
value: https://github.com/RedHatInsights/konflux-consoledot-frontend-build
223-
- name: revision
224-
value: 2fcdfa9b4858ac941b50ad37317c4f9aaabf91b4
225-
- name: pathInRepo
226-
value: tasks/parse-build-deploy-script/parse-build-deploy-script.yaml
227-
workspaces:
228-
- name: source
229-
workspace: workspace
230-
runAfter:
231-
- clone-repository
232-
- name: create-frontend-dockerfile
233-
taskRef:
234-
resolver: git
235-
params:
236-
- name: url
237-
value: https://github.com/RedHatInsights/konflux-consoledot-frontend-build
238-
- name: revision
239-
value: 2fcdfa9b4858ac941b50ad37317c4f9aaabf91b4
240-
- name: pathInRepo
241-
value: tasks/create-frontend-dockerfile/create-frontend-dockerfile.yaml
242-
workspaces:
243-
- name: source
244-
workspace: workspace
245-
params:
246-
- name: path-context
247-
value: $(params.path-context)
248-
- name: component
249-
value: $(tasks.parse-build-deploy-script.results.component)
250-
- name: image
251-
value: $(tasks.parse-build-deploy-script.results.image)
252-
- name: node-build-version
253-
value: $(tasks.parse-build-deploy-script.results.node-build-version)
254-
- name: quay-expire-time
255-
value: $(tasks.parse-build-deploy-script.results.quay-expire-time)
256-
- name: npm-build-script
257-
value: $(tasks.parse-build-deploy-script.results.npm-build-script)
258-
- name: yarn-build-script
259-
value: $(tasks.parse-build-deploy-script.results.yarn-build-script)
260-
- name: route-path
261-
value: $(tasks.parse-build-deploy-script.results.route-path)
262-
- name: beta-route-path
263-
value: $(tasks.parse-build-deploy-script.results.beta-route-path)
264-
- name: preview-route-path
265-
value: $(tasks.parse-build-deploy-script.results.preview-route-path)
266-
- name: ci-root
267-
value: $(tasks.parse-build-deploy-script.results.ci-root)
268-
- name: server-name
269-
value: $(tasks.parse-build-deploy-script.results.server-name)
270-
- name: dist-folder
271-
value: $(tasks.parse-build-deploy-script.results.dist-folder)
272-
runAfter:
273-
- parse-build-deploy-script
274214
- name: clone-repository-oci-ta
275215
params:
276216
- name: url
@@ -363,7 +303,6 @@ spec:
363303
value: $(params.build-args-file)
364304
runAfter:
365305
- prefetch-dependencies
366-
- create-frontend-dockerfile
367306
taskRef:
368307
params:
369308
- name: name

deploy/Containerfile

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
FROM registry.access.redhat.com/ubi9/nodejs-22:9.5-1731603585 as builder
2+
3+
USER root
4+
5+
RUN dnf install jq -y
6+
7+
ADD https://raw.githubusercontent.com/RedHatInsights/insights-frontend-builder-common/refs/heads/master/universal_build.sh \
8+
https://raw.githubusercontent.com/RedHatInsights/insights-frontend-builder-common/refs/heads/master/build_app_info.sh \
9+
https://raw.githubusercontent.com/RedHatInsights/insights-frontend-builder-common/refs/heads/master/server_config_gen.sh \
10+
/opt/app-root/bin/
11+
RUN chown default /opt/app-root/bin/universal_build.sh /opt/app-root/bin/build_app_info.sh /opt/app-root/bin/server_config_gen.sh; \
12+
chmod a+x /opt/app-root/bin/universal_build.sh /opt/app-root/bin/build_app_info.sh /opt/app-root/bin/server_config_gen.sh
13+
14+
USER default
15+
16+
RUN npm i -g yarn
17+
18+
COPY --chown=default . .
19+
20+
RUN universal_build.sh
21+
22+
FROM quay.io/redhat-services-prod/hcm-eng-prod-tenant/caddy-ubi:0d6954b
23+
24+
COPY LICENSE /licenses/
25+
26+
ENV CADDY_TLS_MODE http_port 8000
27+
28+
COPY --from=builder /opt/app-root/src/Caddyfile /etc/caddy/Caddyfile
29+
COPY --from=builder /opt/app-root/src/dist dist
30+
COPY package.json .

0 commit comments

Comments
 (0)