Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ WORKDIR /opt/app-root

USER 0

RUN npm install --global yarn

ENV HUSKY=0

COPY web/package.json web/yarn.lock web/
COPY web/package.json web/package-lock.json web/
COPY Makefile Makefile
RUN make install-frontend
RUN make install-frontend-ci

COPY web/ web/
RUN make build-frontend
Expand Down
11 changes: 1 addition & 10 deletions Dockerfile.art
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,13 @@ COPY $REMOTE_SOURCES $REMOTE_SOURCES_DIR
COPY . /usr/src/app
WORKDIR /usr/src/app

# bootstrap yarn so we can install and run the other tools.
USER 0
ARG YARN_VERSION=v1.22.19
RUN CACHED_YARN=./artifacts/yarn-${YARN_VERSION}.tar.gz; \
if [ -f ${CACHED_YARN} ]; then \
npm install -g ${CACHED_YARN}; \
else \
echo "need yarn at ${CACHED_YARN}"; \
exit 1; \
fi

# use dependencies provided by Cachito
ENV HUSKY=0
RUN test -d ${REMOTE_SOURCES_DIR}/cachito-gomod-with-deps || exit 1; \
cp -f $REMOTE_SOURCES_DIR/cachito-gomod-with-deps/app/registry-ca.pem . \
&& cp -f $REMOTE_SOURCES_DIR/cachito-gomod-with-deps/app/web/{.npmrc,.yarnrc,yarn.lock} web/ \
&& cp -f $REMOTE_SOURCES_DIR/cachito-gomod-with-deps/app/web/{.npmrc,package-lock.json} web/ \
&& source ${REMOTE_SOURCES_DIR}/cachito-gomod-with-deps/cachito.env \
&& make install-frontend-ci \
&& make build-frontend
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile.cypress
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ WORKDIR /usr/src/app

ENV HUSKY=0

COPY web/package.json web/yarn.lock ./
COPY web/package.json web/package-lock.json ./

RUN yarn install --frozen-lockfile
RUN npm ci

COPY web/console-extensions.json web/cypress.config.ts web/tsconfig.json web/webpack.config.ts ./
COPY web/cypress/ ./cypress
COPY web/locales/ ./locales
COPY web/src/ ./src
RUN yarn build
RUN npm run build

ENTRYPOINT ["yarn", "cypress:run:ci"]
ENTRYPOINT ["npm", "run", "cypress:run:ci"]
4 changes: 1 addition & 3 deletions Dockerfile.local
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@ FROM registry.redhat.io/ubi9/nodejs-20-minimal:1-51 AS web-builder

WORKDIR /opt/app-root

RUN npm install --global yarn

ENV HUSKY=0

COPY Makefile Makefile
COPY web/ web/

RUN make install-frontend
RUN make install-frontend-ci
RUN make build-frontend

FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_golang_1.23 as go-builder
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ FROM registry.redhat.io/rhel8/nodejs-18:1-71.1698060565

WORKDIR /usr/src/app

RUN npm install --global yarn
ENV HUSKY=0

COPY web/package.json web/yarn.lock ./
RUN yarn
COPY web/package.json web/package-lock.json ./
RUN npm ci

COPY web/. .

ENTRYPOINT ["yarn", "lint"]
ENTRYPOINT ["npm", "run", "lint"]
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
.PHONY: install-frontend
install-frontend:
cd web && yarn install
cd web && npm install

.PHONY: install-frontend-ci
install-frontend-ci:
cd web && yarn install --frozen-lockfile
cd web && npm ci

.PHONY: install-frontend-ci-clean
install-frontend-ci-clean: install-frontend-ci
cd web && yarn cache clean
cd web && npm cache clean --force

.PHONY: build-frontend
build-frontend:
cd web && yarn build
cd web && npm run build

.PHONY: start-frontend
start-frontend:
cd web && yarn start
cd web && npm run start

.PHONY: start-console
start-console:
./scripts/start-console.sh

.PHONY: lint-frontend
lint-frontend:
cd web && yarn lint
cd web && npm run lint

.PHONY: install-backend
install-backend:
Expand Down
Loading