Skip to content

Commit b19e67d

Browse files
committed
Revert "Building frontend only once (netobserv#718) (netobserv#722)"
This reverts commit a323538.
1 parent 8426750 commit b19e67d

5 files changed

+26
-77
lines changed

.tekton/network-observability-console-plugin-1-8-pull-request.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ spec:
2828
value: 5d
2929
- name: dockerfile
3030
value: Dockerfile.downstream
31+
- name: build-platforms
32+
value:
33+
- linux/x86_64
34+
- linux/ppc64le
3135
pipelineRef:
3236
name: build-pipeline
3337
taskRunTemplate: {}

.tekton/network-observability-console-plugin-1-8-push.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ spec:
2626
value: quay.io/redhat-user-workloads/ocp-network-observab-tenant/netobserv-operator/network-observability-console-plugin:{{revision}}
2727
- name: dockerfile
2828
value: Dockerfile.downstream
29+
- name: build-platforms
30+
value:
31+
- linux/x86_64
32+
- linux/ppc64le
2933
pipelineRef:
3034
name: build-pipeline
3135
taskRunTemplate: {}

.tekton/pipeline-ref.yaml

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,6 @@ spec:
4242
path-context
4343
name: dockerfile
4444
type: string
45-
- default: "Dockerfile.front.downstream"
46-
description: Path to the frontend Dockerfile inside the context specified by parameter
47-
path-context
48-
name: front-dockerfile
49-
type: string
5045
- default: "false"
5146
description: Force rebuild image
5247
name: rebuild
@@ -178,52 +173,6 @@ spec:
178173
workspace: git-auth
179174
- name: netrc
180175
workspace: netrc
181-
- name: build-front-container
182-
params:
183-
- name: IMAGE
184-
value: "$(params.output-image)-front"
185-
- name: DOCKERFILE
186-
value: $(params.front-dockerfile)
187-
- name: CONTEXT
188-
value: $(params.path-context)
189-
- name: HERMETIC
190-
value: $(params.hermetic)
191-
- name: PREFETCH_INPUT
192-
value: $(params.prefetch-input)
193-
- name: IMAGE_EXPIRES_AFTER
194-
value: $(params.image-expires-after)
195-
- name: COMMIT_SHA
196-
value: $(tasks.clone-repository.results.commit)
197-
- name: BUILD_ARGS
198-
value:
199-
- $(params.build-args[*])
200-
- "COMMIT=$(tasks.clone-repository.results.commit)"
201-
- "BUILDVERSION=$(params.build-version)"
202-
- "DATE=$(tasks.clone-repository.results.commit-timestamp)"
203-
- name: BUILD_ARGS_FILE
204-
value: $(params.build-args-file)
205-
- name: SOURCE_ARTIFACT
206-
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
207-
- name: CACHI2_ARTIFACT
208-
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
209-
- name: PLATFORM
210-
value: "linux/x86_64"
211-
runAfter:
212-
- prefetch-dependencies
213-
taskRef:
214-
params:
215-
- name: name
216-
value: buildah-remote-oci-ta
217-
- name: bundle
218-
value: quay.io/konflux-ci/tekton-catalog/task-buildah-remote-oci-ta:0.3@sha256:3070ee1a75e9a5a0a082008e1f9b3d2df7a9508ca107678b2613dc201eb2e279
219-
- name: kind
220-
value: task
221-
resolver: bundles
222-
when:
223-
- input: $(tasks.init.results.build)
224-
operator: in
225-
values:
226-
- "true"
227176
- name: build-container
228177
matrix:
229178
params:
@@ -251,7 +200,6 @@ spec:
251200
- "COMMIT=$(tasks.clone-repository.results.commit)"
252201
- "BUILDVERSION=$(params.build-version)"
253202
- "DATE=$(tasks.clone-repository.results.commit-timestamp)"
254-
- "FRONTBUILD=$(params.output-image)-front"
255203
- name: BUILD_ARGS_FILE
256204
value: $(params.build-args-file)
257205
- name: SOURCE_ARTIFACT
@@ -262,7 +210,6 @@ spec:
262210
value: "true"
263211
runAfter:
264212
- prefetch-dependencies
265-
- build-front-container
266213
taskRef:
267214
params:
268215
- name: name

Dockerfile.downstream

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,23 @@
11
ARG COMMIT
2-
ARG FRONTBUILD
32

4-
FROM $FRONTBUILD as web-builder
3+
FROM registry.access.redhat.com/ubi9/nodejs-18:1-108.1716477799 as web-builder
4+
5+
ARG BUILDSCRIPT
6+
WORKDIR /opt/app-root
7+
8+
COPY --chown=default web/package.json web/package.json
9+
COPY --chown=default web/package-lock.json web/package-lock.json
10+
WORKDIR /opt/app-root/web
11+
12+
RUN CYPRESS_INSTALL_BINARY=0 node --max-old-space-size=6000 $(which npm) --legacy-peer-deps ci
13+
14+
WORKDIR /opt/app-root
15+
COPY --chown=default web web
16+
COPY --chown=default mocks mocks
17+
18+
WORKDIR /opt/app-root/web
19+
RUN npm run format-all
20+
RUN npm run build$BUILDSCRIPT
521

622
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.23 as go-builder
723

Dockerfile.front.downstream

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)